wwt / SwiftCurrent

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

Fixes some issues with preserving state while view swapping #114

Closed Tyler-Keith-Thompson closed 3 years ago

Tyler-Keith-Thompson commented 3 years ago

Linked Issue:

Checklist:

Tyler-Keith-Thompson commented 3 years ago

While @Richard-Gist and I were working on marketing stuff we discovered a couple of issues with SwiftCurrent_SwiftUI. This PR addresses those issues.

NOTE: The issue of removing the cached content when .persistence(.removedAfterProceeding) is untestable as far as @Richard-Gist and I could tell. ViewInspector simply cannot get into the correct lifecycle methods to validate it.

codecov-commenter commented 3 years ago

Codecov Report

Merging #114 (c840ecb) into main (568758f) will increase coverage by 0.14%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   93.98%   94.13%   +0.14%     
==========================================
  Files          75       75              
  Lines        1813     1823      +10     
==========================================
+ Hits         1704     1716      +12     
+ Misses        109      107       -2     
Impacted Files Coverage Δ
...rces/SwiftCurrent_SwiftUI/Views/WorkflowItem.swift 93.51% <100.00%> (+1.85%) :arrow_up:
.../SwiftCurrent_SwiftUI/Views/WorkflowLauncher.swift 100.00% <100.00%> (ø)

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 96b1989...c840ecb. Read the comment docs.