Closed melanieseltzer closed 3 years ago
Hello @melanieseltzer
I thinks "Docs" have same issue with many plugins, like "responsive" or "a18y". All of them works only on "Canvas". Maybe "Docs" designed to ignore such changes
https://user-images.githubusercontent.com/98444/113569458-3c025000-961b-11eb-9f4a-767a028ca871.mp4
Thanks @le0pard, that makes sense 🙂 So when landing on the Docs page first, the root attribute panel itself doesn't exist yet (since the panel isn't on the Docs page at all), so it doesn't emit EVENTS.UPDATE
, and consequently updateRootAttribute doesn't run to set the attribute. Am I understanding it correctly?
@melanieseltzer correct
👍 I'll go ahead and close this then, thanks for the clarification!
Hey there! So, if I'm on the "Docs" tab and do a hard page refresh, the attribute doesn't get added until navigating away (via client-side nav). If I'm on the "Canvas" tab first and hit refresh, this doesn't happen - it successfully gets added on first page load.
You can see the behavior in the GIF below - here I'm trying to add
data-theme="light"
to the body. It doesn't get added until I navigate to the "Canvas" tab.Any way around this? I don't think "Docs" tab gets served by default, but it's a little jarring if I'm already on "Docs" and my browser window refreshes e.g. if Storybook gets rebuilt.