Add draw hierarchy setting interface #151
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description 📝
To get a snapshot of a Liquid Glass component, you need to modify the template and set
drawHierarchyInKeyWindowtotrueas mentioned in #136. However, this is a bit of a hassle, so we've made it possible to setdrawHierarchyInKeyWindowtotrueas an optional setting inprefire.yaml.Solution 📦
The use case we wanted to solve was making it easy to obtain Liquid Glass components. Because Liquid Glass affects the entire app, we determined that there was no setting to switch
drawHierarchyInKeyWindowfor each Preview. Therefore, our current solution makes it possible to specify a common setting fordrawHierarchyInKeyWindowfor all Previews.If there are some use cases where you want to set
drawHierarchyInKeyWindowtofalse, we believe that a separate solution would be to make it possible to specifydrawHierarchyInKeyWindowwith thesnapshotmodifier.Implementation 👩💻👨💻
test_configurationinExample/.prefire.ymlas follows:required_osto 26draw_hierarchy_in_key_window_default_enabled: trueExample/Shared/ExamplesPrefireExampleTeststest and confirm that the LiquidGlass snapshot has the LiquidGlass effect as shown below.