-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React: Don't show decorators in JSX snippets #21907
Conversation
This is a bit of a hacky way to acheive `excludeDecorators` without actually excluding them.
I think this is an interesting solution.
|
@JReinhold as far as we currently understand it, the issue is only a problem for react (well maybe there's an issue in that you see all the decorators in other frameworks but at least you see the story inside them). So we think as a patch release a localised fix like this is a good idea. Probably a better solution would be some 1st class way to declare a decorator as an "story inspector" or something so it gets wrapped inside the other decorators. Unless we can find a better solution I'd propose that as a 7.1 PR |
…orator-order React: Don't show decorators in JSX snippets
Telescoping on #21902
An alternate solution for #21649
What I did
Always move the JSX decorator to the end of the list, so it avoids all other decorators, as we can't see "inside" decorators in React. However we still need to actually render all the decorators as the story may depend on them.
TODO:
How to test
See stories in this PR:
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]