Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ac95096
Add CreateToDo files, organize PlannerAssembly
rh12 May 14, 2024
4db9333
Remove unused CalendarEventDetailsViewController from Core
rh12 May 14, 2024
ce8ff1d
Add loading overlay functionality to BaseScreen (from EditorForm)
rh12 May 14, 2024
453dd45
Add NavigationBarButton to InstUI
rh12 May 15, 2024
08d4062
Add TextFieldCell
rh12 May 16, 2024
4176908
Work on CreateToDo UI
rh12 May 16, 2024
56559b0
Add NavBar button disabling
rh12 May 16, 2024
7aa9049
Add Date cell
rh12 May 17, 2024
09e2041
Improve TextFieldCell
rh12 May 17, 2024
ae73c7e
Add padding style sets
rh12 May 22, 2024
a5de10c
Add InstUI.DisclosureIndicator
rh12 May 22, 2024
6b995b0
Add LabelValueCell
rh12 May 22, 2024
5e3ec1b
Add TextEditor cell
rh12 May 27, 2024
38cc452
Improve focus-defocus behaviour
rh12 May 27, 2024
f6a0cc2
Add RadioButtonCell
rh12 May 28, 2024
33f24dc
Add CalendarSelector screen
rh12 May 28, 2024
ccf641a
Refactor CalendarSelector
rh12 Jun 2, 2024
702774e
Implement adding the ToDo
rh12 Jun 3, 2024
5bc6aff
Add completion
rh12 Jun 3, 2024
516ffcb
Remove Group calendars from CreateToDo
rh12 Jun 3, 2024
2883deb
Minor improvements
rh12 Jun 3, 2024
72df0ba
Fix non dynamic text sizes
rh12 Jun 4, 2024
67770da
Fix VoiceOver issues
rh12 Jun 5, 2024
47ca01c
Update test
rh12 Jun 5, 2024
61134cd
Remove SelectCalendar tracking, update navigation to use router
rh12 Jun 6, 2024
1225396
Add tests
rh12 Jun 6, 2024
62af9a5
Add new & missing tests for colors & icons
rh12 Jun 7, 2024
52f2e11
Update schemes to calculate coverage for Core
rh12 Jun 7, 2024
ffdad68
Match DatePickerCells height with other cells
rh12 Jun 7, 2024
06b65fc
Cleanup
rh12 Jun 7, 2024
4bc935a
Refactor radio button cell.
vargaat Jun 13, 2024
fd73f87
Make view models call load on their interactors.
vargaat Jun 13, 2024
9c106eb
Fix create todo retry not working after a failure.
vargaat Jun 13, 2024
65d1aef
Make nav bar button generic.
vargaat Jun 14, 2024
d95355a
Move optional section header handling to InstUI component.
vargaat Jun 14, 2024
db235f0
Simplify padding handling.
vargaat Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Core/Core/Assets.xcassets/Colors/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB5",
"green" : "0xB1",
"red" : "0xAB"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x71",
"green" : "0x71",
"red" : "0x70"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "contrast",
"value" : "high"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB5",
"green" : "0xB1",
"red" : "0xAB"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
},
{
"appearance" : "contrast",
"value" : "high"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x71",
"green" : "0x71",
"red" : "0x70"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xC7",
"green" : "0xC5",
"red" : "0xC5"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xD0",
"green" : "0xCC",
"red" : "0xC7"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "contrast",
"value" : "high"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xC7",
"green" : "0xC5",
"red" : "0xC5"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
},
{
"appearance" : "contrast",
"value" : "high"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xD0",
"green" : "0xCC",
"red" : "0xC7"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "radio-button-selected.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "radio-button-unselected.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 15 additions & 4 deletions Core/Core/DeveloperMenu/BaseScreenTesterScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,24 @@ struct BaseScreenTesterScreen: View {

var body: some View {
InstUI.BaseScreen(state: state) { _ in
Text(verbatim: "Content")
VStack(spacing: 16) {
ForEach(0..<100) { index in
HStack {
Text(verbatim: "Content")
Spacer()
Text(verbatim: "Line #\(index)")
}
.padding(.horizontal, 16)
}
}
}
.overlay(alignment: .bottom) {
Picker("", selection: $state) {
ForEach(InstUI.ScreenState.allCases) { state in
Text(state.rawValue.capitalized).tag(state)
}
Text(verbatim: "Loading").tag(InstUI.ScreenState.loading)
Text(verbatim: "Error").tag(InstUI.ScreenState.error)
Text(verbatim: "Empty").tag(InstUI.ScreenState.empty)
Text(verbatim: "Data").tag(InstUI.ScreenState.data)
Text(verbatim: "Data with LoadingOverlay").tag(InstUI.ScreenState.data(loadingOverlay: true))
}
.padding()
}
Expand Down
4 changes: 4 additions & 0 deletions Core/Core/Extensions/InstColorExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ public extension UIColor {
static let borderSuccess = UIColor(named: "borderSuccess", in: .core, compatibleWith: nil)!
static let borderWarning = UIColor(named: "borderWarning", in: .core, compatibleWith: nil)!
static let crimson = UIColor(named: "crimson", in: .core, compatibleWith: nil)!
static let disabledGray = UIColor(named: "disabledGray", in: .core, compatibleWith: nil)!
static let electric = UIColor(named: "electric", in: .core, compatibleWith: nil)!
static let electricHighContrast = UIColor(named: "electricHighContrast", in: .core, compatibleWith: nil)!
static let fire = UIColor(named: "fire", in: .core, compatibleWith: nil)!
static let licorice = UIColor(named: "licorice", in: .core, compatibleWith: nil)!
static let oxford = UIColor(named: "oxford", in: .core, compatibleWith: nil)!
static let placeholderGray = UIColor(named: "placeholderGray", in: .core, compatibleWith: nil)!
static let porcelain = UIColor(named: "porcelain", in: .core, compatibleWith: nil)!
static let shamrock = UIColor(named: "shamrock", in: .core, compatibleWith: nil)!
static let tabBarBackground = UIColor(named: "tabBarBackground", in: .core, compatibleWith: nil)!
Expand Down Expand Up @@ -93,11 +95,13 @@ public extension Color {
static let borderSuccess = Color("borderSuccess", bundle: .core)
static let borderWarning = Color("borderWarning", bundle: .core)
static let crimson = Color("crimson", bundle: .core)
static let disabledGray = Color("disabledGray", bundle: .core)
static let electric = Color("electric", bundle: .core)
static let electricHighContrast = Color("electricHighContrast", bundle: .core)
static let fire = Color("fire", bundle: .core)
static let licorice = Color("licorice", bundle: .core)
static let oxford = Color("oxford", bundle: .core)
static let placeholderGray = Color("placeholderGray", bundle: .core)
static let porcelain = Color("porcelain", bundle: .core)
static let shamrock = Color("shamrock", bundle: .core)
static let tabBarBackground = Color("tabBarBackground", bundle: .core)
Expand Down
6 changes: 6 additions & 0 deletions Core/Core/Extensions/InstIconExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ public extension UIImage {
static var masteryLTI: UIImage { UIImage(named: "masteryLTI", in: .core, compatibleWith: nil)! }
static var offlineLine: UIImage { UIImage(named: "offlineLine", in: .core, compatibleWith: nil)! }
static var partialSolid: UIImage { UIImage(named: "partialSolid", in: .core, compatibleWith: nil)! }
static var radioButtonSelected: UIImage { UIImage(named: "radioButtonSelected", in: .core, compatibleWith: nil)! }
static var radioButtonUnselected: UIImage { UIImage(named: "radioButtonUnselected", in: .core, compatibleWith: nil)! }
static var qrCode: UIImage { UIImage(named: "qrCode", in: .core, compatibleWith: nil)! }
static var share: UIImage { UIImage(named: "share", in: .core, compatibleWith: nil)! }
static var todoTab: UIImage { UIImage(named: "todoTab", in: .core, compatibleWith: nil)! }
Expand Down Expand Up @@ -453,6 +455,7 @@ public extension Image {
static var warningBorderlessSolid: Image { Image("warningBorderlessSolid", bundle: .core) }
static var xLine: Image { Image("xLine", bundle: .core) }
static var xSolid: Image { Image("xSolid", bundle: .core) }

static var addAudioLine: Image { Image("addAudioLine", bundle: .core) }
static var addCameraLine: Image { Image("addCameraLine", bundle: .core) }
static var addDocumentLine: Image { Image("addDocumentLine", bundle: .core) }
Expand All @@ -472,6 +475,7 @@ public extension Image {
static var chatBubble: Image { Image("chatBubble", bundle: .core) }
static var checkbox: Image { Image("checkbox", bundle: .core) }
static var checkboxSelected: Image { Image("checkboxSelected", bundle: .core) }
static var chevronDown: Image { Image("chevronDown", bundle: .core) }
static var collaborations: Image { Image("collaborations", bundle: .core) }
static var conferences: Image { Image("conferences", bundle: .core) }
static var coursesTab: Image { Image("coursesTab", bundle: .core) }
Expand All @@ -498,6 +502,8 @@ public extension Image {
static var masteryLTI: Image { Image("masteryLTI", bundle: .core) }
static var offlineLine: Image { Image("offlineLine", bundle: .core) }
static var partialSolid: Image { Image("partialSolid", bundle: .core) }
static var radioButtonSelected: Image { Image("radioButtonSelected", bundle: .core) }
static var radioButtonUnselected: Image { Image("radioButtonUnselected", bundle: .core) }
static var qrCode: Image { Image("qrCode", bundle: .core) }
static var share: Image { Image("share", bundle: .core) }
static var todoTab: Image { Image("todoTab", bundle: .core) }
Expand Down
4 changes: 4 additions & 0 deletions Core/Core/Extensions/ResultExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ public extension Result {
return false
}
}

extension Result where Success == Void {
public static var success: Result { .success(()) }
}
4 changes: 4 additions & 0 deletions Core/Core/Extensions/StringExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ extension String {
public var isNotEmpty: Bool {
!isEmpty
}

public var nilIfEmpty: String? {
self.isEmpty ? nil : self
}
}

extension String: Error {
Expand Down
Loading