Closed philippzagar closed 10 months ago
Merging #24 (b3e7f2c) into main (eac4430) will increase coverage by
0.46%
. The diff coverage is100.00%
.
Left my initial thoughts for now. Feel free to share your views. Great work 🚀
Thanks for all the input regarding the implementation!
Map Operation States to View States
:recycle: Current situation & Problem
As developers within the Spezi framework and those building upon the Spezi ecosystem, we encounter a recurring problem in state management. Our workflow involves translating operational states — such as those from a Language Model or Download process, which often have defined beginning and end states — into a
ViewState
from SpeziViews which includes robust error handling handled through alterts, without defined start or end states (the mental model differs here). Currently, the procedure for this state transition is overly intricate and imperatively structured. We recognize the need for a more streamlined, declaratively designed solution that better complements the Spezi framework's ethos.:gear: Release Notes
OperationState
protocol which provides a broad meta-model for the current state of a specific action or task.SwiftUI/View/map(state:to:)
view modifier, enabelling the easy mapping ofOperationState
s to SpeziViewViewState
s:books: Documentation
In-line documentation and examples.
:white_check_mark: Testing
Added adequate UI Tests.
:pencil: Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: