-
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
Fix Comment story performance issue #2048
Conversation
…terns into bugfix/comment-story-performance * 'main' of https://github.com/cloudfour/cloudfour.com-patterns: Publish Next Version (#2045) Fix alignment issue with o-deck (#2047) Add transparent avatar and PNG format (#2046)
🦋 Changeset detectedLatest commit: c606df2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Code looks good and works as described. Thank you!
…terns into feature/aspect-ratio * 'main' of https://github.com/cloudfour/cloudfour.com-patterns: Use CSS aspect-ratio property for Avatar (#2055) Publish Next Version (#2050) Update dependency @types/lodash to v4.14.185 Support more WordPress table styles (#2052) Fix nested rhythm object issue (#2051) Fix Comment story performance issue (#2048)
Overview
This PR fixes the Comment story performance issue that was causing the browser to freeze when viewing the "Docs" tab. The proposed fix is to generate random comments ahead of time instead of inline inside the
<Story>
elements.Thanks for the idea, @calebeby. It worked! 🎉
Screenshots
Before, navigating to the "Docs" tab would freeze the browser to the point where you couldn't scroll in Firefox. Now, you can scroll through the page:
Before
Before, there was a very long yellow JS block, over 10 seconds in the screenshot below:
After
After, the yellow JS block is not 10+ seconds long:
Testing
The bug was originally reported in Firefox but test in all browsers.