Closed Supereg closed 11 months ago
Merging #88 (6bbe89c) into main (e75ea4d) will decrease coverage by
2.13%
. The diff coverage is90.97%
.
CC: @PSchmiedmayer as codeql is now disabled, we need to remove CodeQL from the list of required actions.
Addressed the feedback, feel free to merge 😇
New
@Model
and@Modifier
property wrappers for Modules:recycle: Current situation & Problem
As motivated in #87, we have a desire to give Modules greater access to the SwiftUI view hierarchy an it's environment. Particularly, we want to provide a way to provide arbitrary
ViewModifier
implementations, modifying the global SwiftUI view hierarchy.We introduce several new property wrappers you can use within your
Module
:@Modifier
allows you to provide aViewModifier
implementation that is used to modify the global SwiftUI view hierarchy.@Model
allows you to provideObservable
model types that are added to the global SwiftUI view environment.Further, this PR preforms the following breaking changes:
ObservableObjectProvider
protocol.Module
protocols as removed and the currentComponent
protocol was renamed toModule
.:gear: Release Notes
@Modifier
property wrapper.@Model
property wrapper.Breaking Changes
ObservableObjectProvider
protocol. Ensure to rewrite your code to use the new@Model
property wrapper in combination with the Observation framework.Module
protocol. If you previously used theLifecycleHandler
protocol you need to manually add conformance now.Component
protocol was renamed toModule
.:books: Documentation
Documentation was added and updated to reflect all the above changes.
:white_check_mark: Testing
Testing was updated and added to cover newly added code.
:pencil: Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: