-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comment component docs in Storybook cause the browser to hang #2003
Comments
This one is a bit of a challenge to figure out. 😅 First, I started by commenting out the Next, I moved the <Meta
title="Components/Comment"
decorators={[
(story) => {
useEffect(() => {
initCommentReplyForms();
}, []);
return story();
},
]}
/> But that didn't seem to do anything. My next thing to try is simplifying the export const makeComment = () => ({
approved: true,
comment_content: 'hello world',
}); And this seems to be making a difference! I don't understand why or what in |
I remember running into this when I was trying to switch to vite. I think I figured out a way to work around this... if I remember right? Here is the PR if you want to give it a shot and check if it is fixed there: #2012 I'd like to revisit that PR soon |
If it is fixed there, I can look into why if you'd like. |
Thanks, @calebeby, taking a look now! |
@calebeby It does seem like it is fixed there! If I start here: https://deploy-preview-2012--cloudfour-patterns.netlify.app/?path=/story/components-comment--single Then switch over to the "Docs" tab, Firefox doesn't freeze up like it's doing now. |
This is interesting, the |
@gerardo-rodriguez do you have a few minutes to meet and check in about that PR? I can try to explain how that works and where I left it so we can decide what to do |
@calebeby Sure! I have until about 11:30. |
If you view the Comment component in Storybook and attempt to switch to Docs view, the page completely tanks performance and appears to never resolve (at least in desktop Firefox as of this writing).
The story examples in this page are probably over-engineered (they predate Storybook Controls so it's been a while): If there isn't a quick fix, we may want to simplify things.
(My gut says this may have to do with the unique ID generation the stories are doing. If
useEffect
is running multiple times (see #1919) then maybe that's just constantly invalidating the stories and causing recompilation? But that's just a guess.)The text was updated successfully, but these errors were encountered: