Closed Tyler-Keith-Thompson closed 3 years ago
Merging #111 (0a1aafd) into main (6bd6c86) will decrease coverage by
0.49%
. The diff coverage is95.81%
.
@@ Coverage Diff @@
## main #111 +/- ##
==========================================
- Coverage 94.48% 93.98% -0.50%
==========================================
Files 72 75 +3
Lines 1794 1813 +19
==========================================
+ Hits 1695 1704 +9
- Misses 99 109 +10
Impacted Files | Coverage Δ | |
---|---|---|
...ces/SwiftCurrent/Protocols/FlowRepresentable.swift | 85.00% <50.00%> (-3.89%) |
:arrow_down: |
...rces/SwiftCurrent_SwiftUI/Views/WorkflowItem.swift | 91.66% <91.66%> (ø) |
|
ExampleApps/SwiftUIExample/Views/ContentView.swift | 92.30% <100.00%> (ø) |
|
...Example/Views/Profile/AccountInformationView.swift | 100.00% <100.00%> (ø) |
|
Sources/SwiftCurrent/TypeErased/AnyWorkflow.swift | 83.33% <100.00%> (+0.64%) |
:arrow_up: |
...ftUI/Extensions/AnyWorkflowElementExtensions.swift | 100.00% <100.00%> (ø) |
|
...iftUI/Extensions/SwiftUILaunchStyleAdditions.swift | 100.00% <100.00%> (ø) |
|
...iftCurrent_SwiftUI/Extensions/ViewExtensions.swift | 100.00% <100.00%> (ø) |
|
Sources/SwiftCurrent_SwiftUI/Models/Launcher.swift | 100.00% <100.00%> (ø) |
|
...wiftCurrent_SwiftUI/Models/WorkflowViewModel.swift | 100.00% <100.00%> (ø) |
|
... and 6 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 13fe4f4...0a1aafd. Read the comment docs.
As of the time of writing the draft PR does not actually do anything with nav links yet, to get there we had to change the public API and a decent chunk of how SwiftUI actually works. Look at #101 for more details about what we did and why.
It'd be a good idea to dive into the changes, I'll try to give a brief summary:
View
that behaves much like ModifiedWorkflowItem
used toWorkflowItem
takes 3 generic specializations, the first is a FlowRepresentable
, the second is a View
that it wraps and the third is the type of View
(after any modification) being displayedWorkflowItem
builds it forward, example:
ModifiedWorkflowView<*, ModifiedWorkflowView<*, Never, FR1>, FR2>
. This means that wrapped
is FR1
the previous item. VS WorkflowItem: WorkflowItem<*, WorkflowItem<*, Never, FR2>, FR1>
meaning wrapped
if you're the outside view is FR2
. This makes working with nav stacks much easier.AnyView
still, which honestly was a ton of workNote: Cocoapods has a global namespace, so to get things working I created LaunchStyle.SwiftUI.PresentationType
. Consumers will almost always use .thing
so won't have to deal with the long name. I sorta wish I could do the same with UIKit but that would be a breaking change.
Something to watch out for, view re-use in a nav stack. FR1 -> FR2 -> FR3 -> FR1 -> FR4.
I think it's quite doable, but may not work with the first functional iteration of this PR and it is not in the checklist, because it's sorta SwiftUI specific as an issue.
Confirmed: I spiked it out and it is doable.
See #113 for more details
Linked Issue: #101
Checklist: