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

[Storybook] fix(useQuizWidget): run chromatic check for shuffling question set #13643

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Aug 15, 2024

Description

Fixes issue where the Chromatic Snapshot for the quiz modal kept updating because the first question rendered was always random. Uses the isChromatic() check to determine if shuffle() is triggered. The layer-2 quiz key is used, therefore the first question to appear should always be Layer 2 blockchain networks are for:

The shuffle will still run when viewing the story in the daskboard.

The question set should not be shuffled when rendered in the Chromatic snapshot. Snapshots should at least be stable if they are not rendering pure functions with static prop data.

Copy link

netlify bot commented Aug 15, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 0db6219
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66bd87dc495ed10008b857fb
😎 Deploy Preview https://deploy-preview-13643--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 48 (no change from production)
Accessibility: 93 (no change from production)
Best Practices: 83 (🔴 down 14 from production)
SEO: 93 (🟢 up 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@TylerAPfledderer TylerAPfledderer changed the title fix(useQuizWidget): run chromatic check for shuffling question set [Storybook] fix(useQuizWidget): run chromatic check for shuffling question set Aug 15, 2024
@TylerAPfledderer TylerAPfledderer marked this pull request as ready for review August 15, 2024 05:00
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! would love to not have to add this in the implementation detail but that would require a deeper refactor.

Thanks @TylerAPfledderer

@pettinarip pettinarip merged commit 710c864 into ethereum:dev Aug 15, 2024
10 of 11 checks passed
@TylerAPfledderer TylerAPfledderer deleted the fix/quiz-modal-story-no-question-shuffle branch August 15, 2024 14:26
This was referenced Aug 21, 2024
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

Successfully merging this pull request may close these issues.

2 participants