-
-
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
Future - Rename Storybook DOM root IDs #10638
Conversation
Do we want to put this in v6.0.0? If we're not doing this now, it'll be 7.0.0 at the earliest. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4a605a4. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
What pain do you think users or us storybook maintainers would endure if we pushed this into 7.0? |
So the possible foreseeable pain for users is re seeing to portals that target #root. So I think breaking that is the right thing to do. Another point is that we don't document what div target storybook renders to at all. The fact we target #root is an implementation detail that's not supposed to be leveraged by users. I'd expect users to render portals to either document.body OR to use the canvasElement provided in docs OR wrap the story in a decorator setting up a selector to render to. I think there should be a task to make targeting the current story container real easy for users. |
So we need 2 things to get this merged/ready for release:
Additionally we should have a task to create a real api (on the storyContext?) to get the selector for the container of the current story. @shilman that is probably something the CSF team (possibly myself?) will have to do. Let's chat about that soon. |
@ndelangen - the Also @jmhobbs or @codykaup would be the ones to talk about changing Chromatic's capture to handle a different |
I changed #docs-root => #storybook-docs
fb578a2
to
36702eb
Compare
@tmeasday could I get a review on this? |
@yannbf we need a minor change in the test-runner so it checks both the IDs. |
Issue: #10403
What I did
I changed
#root
=>#storybook-root
I changed
#docs-root
=>#storybook-docs