-
-
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
Disable play functions in docs mode, unless you set parameters.docs.autoplay
#19659
Disable play functions in docs mode, unless you set parameters.docs.autoplay
#19659
Conversation
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.
Nice one!!! 🚀
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.
In general I think this is good, but I don't understand why autoplay
and runPlayFunction
are different. As far as I understand they do the exact same thing, they're just applied in different places, so I would think it was simpler if they were both called autoplay
.
Co-authored-by: Michael Shilman <[email protected]>
I guess that's a fair point. I guess my thought process was that a pithy name makes more sense for a user facing parameter ( However, I agree, the confusion of having different names for the same thing is not worth the dubious benefit of the above. |
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.
I agree with @JReinhold 's comment on renaming runPlayFunction
to autoplay
. Otherwise LGTM!
Changes are made, this PR is just blocked on this now. |
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.
Looks good to me. I'll investigate the Svelte issue. It's been there for a while, I guess it's just now that we're catching it in our tests.
…ay-functions-in-docs-if-not
Thanks for the assist @JReinhold !! |
Issue: Play functions cause havoc on docs pages ;)
What I did
runPlayFunction
is set<Story>
doc block, unlessparameters.docs.autoplay
is setHow to test
See
autoplay
stories, or e2e/unit tests