wwt / SwiftCurrent

A library for managing complex workflows in Swift
https://wwt.github.io/SwiftCurrent/
Apache License 2.0
308 stars 19 forks source link

BETA RELEASE - SwiftUI support #72

Closed Tyler-Keith-Thompson closed 3 years ago

Tyler-Keith-Thompson commented 3 years ago

Linked Issue: #57

Checklist:


If Applicable:


If Public API Has Changed:

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

codecov-commenter commented 3 years ago

Codecov Report

Merging #72 (ff5763a) into main (ad04471) will increase coverage by 0.18%. The diff coverage is 96.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   97.25%   97.44%   +0.18%     
==========================================
  Files          35       42       +7     
  Lines         985     1211     +226     
==========================================
+ Hits          958     1180     +222     
- Misses         27       31       +4     
Impacted Files Coverage Δ
Sources/SwiftCurrent/TestOnly/TestOnly.swift 50.00% <0.00%> (+8.33%) :arrow_up:
...SwiftCurrent/TypeErased/AnyFlowRepresentable.swift 87.23% <ø> (ø)
Sources/SwiftCurrent/TypeErased/AnyWorkflow.swift 82.69% <77.77%> (-2.61%) :arrow_down:
..._SwiftUI/TypeErased/AnyFlowRepresentableView.swift 91.66% <91.66%> (ø)
...rces/SwiftCurrent_SwiftUI/Views/WorkflowView.swift 99.07% <99.07%> (ø)
...wiftCurrent/Models/FlowRepresentableMetadata.swift 100.00% <100.00%> (ø)
...ces/SwiftCurrent/Protocols/FlowRepresentable.swift 89.47% <100.00%> (+1.23%) :arrow_up:
...ent_SwiftUI/Extensions/AnyWorkflowExtensions.swift 100.00% <100.00%> (ø)
...urrent_SwiftUI/Extensions/WorkflowExtensions.swift 100.00% <100.00%> (ø)
...wiftCurrent_SwiftUI/Models/WorkflowViewModel.swift 100.00% <100.00%> (ø)
... and 9 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 5c2bc5c...ff5763a. Read the comment docs.

Richard-Gist commented 3 years ago

EOD: We got just about all of this in place. Everything is tested that can be tested, and that which is not covered is not testable. The last bit to do is protecting in a double launch situation. There are 2 warnings left: double launch and a bundle identifier warning.

Everything is set up as a BETA product and we should be able to go to trunk soon.

wiemerm commented 3 years ago

EOD: There are still some gaps with how onDisappear works in WorkflowView that we are working through. Some examples include relaunching a workflow after the isPresented binding Bool is toggled and handling when scrolled away within a ScrollView where onDisappear gets called.

Tyler-Keith-Thompson commented 3 years ago

@Richard-Gist Your comment wasn't a code review so I can't reply to it:

With this extension, do we need to put anything in UIKit or Core to test this?

No I don't think so, I mean we can but we have a test for it, so I'm satisfied. Any additional tests would be redundant. I much prefer the black-box style testing we've got because it allows for maximum refactoring but still gives confidence.