Skip to content
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

Globals clobbered by parameters #91

Open
figmatom opened this issue Oct 10, 2023 · 0 comments
Open

Globals clobbered by parameters #91

figmatom opened this issue Oct 10, 2023 · 0 comments

Comments

@figmatom
Copy link

figmatom commented Oct 10, 2023

This line causes any parameters to overwrite the globals from the url. If I visit a url like :
http://localhost:6007/iframe.html?id=my-component&viewMode=story&globals=pseudo.active:!true, we render once with the globals passed in, then parameters come in and clobber them by passing an onGlobalsUpdated event on mount.

This might not be a bug, and be intended behavior, but curious if you have ideas on a path to getting around it? would love URL control of params. Happy to do the work, but I feel like any proposal I have will lack your context 😄

My use case here is I want to automate snapshot testing, but would prefer not to have actual stories for all of my states, it is a lot easier to generate story URLs for all states instead of a full story, just to show active state, which is irrelevant to most developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant