-
-
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
Add a new throwPlayFunctionExceptions
parameter
#19143
Add a new throwPlayFunctionExceptions
parameter
#19143
Conversation
If true, it doesn't exhibit play function exceptions in the UI. Set it to true from the interactions addon.
@ghengeveld one thing: in this implementation, the sequence of events is changed if
I'm thinking in case 2, instead we probably want to show the error in the UI, but still end up completing the story without throwing a |
Question: why is the config set as a parameter (which could be changed at a story level for instance) and not as a |
Good question! I don't think it's a feature, but a core property might make sense. I guess the main reason to use a parameter is to allow Chromatic to change it easily, I'm not sure how you'd change a core property from outside the SB build (maybe you can just update |
Discussed with @shilman. In the future we might want to consider a proper "options store" in the preview, and also mechanisms/APIs for changing options at runtime. For now, it isn't really safe to change options at runtime, so we have to use parameter for this. We already have some other parameters that are really options so I guess we aren't exactly making things "worse" 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. I'd like to see it renamed to throwPlayFunctionExceptions
though.
hidePlayFunctionExceptions
parameterthrowPlayFunctionExceptions
parameter
Issue: Play function errors were swallowed if you didn't have the interactions addon installed.
What I did
parameters.hidePlayFunctionExceptions
How to test
How to set in external tools (e.g. Chromatic)
iframe.html
.