Docs: add detail to addon-contexts per-story settings #10112
Merged
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.
Issue:
The addon-contexts readme currently says, "...you may want to modify the default setups at per story level". But there's no example provided, and it appears that "modifying" is a stretch. You can create per-story contextual environments, and you can disable default setups, but there doesn't seem to be a way to actually modify a setup defined in context.js at the story level.
What I did
Clarified that you can create per-story contexts or disable default (global) contexts defined in contexts.js, and provided sample code for the latter. I also linked to my explanation on Discord of how I went about "modifying" a default setup at the story level, which involved disabling the default setup and creating a new, nearly identical setup with a different default option. Not a lovely solution (and maybe only relevant until addon-toolbars is released), which is why I didn't include the code here in the readme itself.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.