orbit-swiftui
orbit-swiftui copied to clipboard
Create `skeleton()` modifier
The modifier should behave like the native redacted()
modifier (iOS14+ only, otherwise we would simply use that one). Its purpose is to redact/skeletonize the content inside components and replace it with appropriate skeleton shapes (recursively, for all subcomponents).
If possible, the iOS14+ redactionReasons
environment should be used and supported, so that the skeleton()
acts as a iOS13 wrapper.
The easiler alternative is to purely use the redacted()
modifier and support this enhancement only for iOS14+.
Atomic components would act upon this environment value and use appropriate skeleton overlay.
Intermediate components could override this and create a specific skeleton overlay for customized parts.
This makes it easier to "skeletonize" the whole ListChoice etc. based on actual (mocked) data.