feat(speakers-teaser): randomize home wall order each load#230
Merged
Conversation
The home-page speakers teaser ordered the roster by `order` and always
opened on the same first four names, so repeat visitors saw an identical
lineup every time. Shuffle a copy of the roster (Fisher-Yates) client-side
so the starting window — and the rotation sequence — is random per load.
The Firestore query keeps `orderBy('order')` for a stable fetch; the
shuffle is memoized on the speaker id set so it only reshuffles when the
roster actually changes, not on every re-render or rotation tick. Reduced-
motion and small-roster visitors also get a random set rather than a fixed
one.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The home-page speakers teaser (
SpeakersTeaser.tsx) rendered the roster ordered byorderand always opened on the same first four names. Repeat visitors saw an identical lineup on every load. This shuffles a copy of the roster client-side so the starting window — and the rotation sequence — is random each load.Why
Requested: the home speakers panel should always start random so the list isn't the same on start.
Behavior
orderBy('order')for a stable fetch — only the display order is shuffled.Files
src/components/SpeakersTeaser.tsx🤖 Generated with Claude Code