-
Notifications
You must be signed in to change notification settings - Fork 63
Make random waveform peaks deterministic #1496
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/1496 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Size Change: +142 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Playwright Failure Test Results It looks like some of the Playwright tests failed. You can download the Playwright trace https://github.com/WordPress/openverse-frontend/actions/runs/2460668323 Read more about how to use this artifact here: https://github.com/WordPress/openverse-frontend/blob/main/test/playwright/README.md#debugging |
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.
LGTM! Checked it out locally and it runs great 👍
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.
Perfect! I tested by passing an empty array to the VWaveform
peaks
prop, and making sure that the generated waveforms were the same on multiple page refreshes in client and server side page navigation.
Fixes
Fixes #1494 by @obulat
Description
This PR uses
prng
to seed the random number generator that generates the peaks for the audio waveform. It uses the audio id hash as the prng seed.Testing Instructions
The audio waveforms should work fine. It's a base PR that is necessary for adding visual regression testing PRs for audio.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin