Repository navigation
Restore the landing-page company marquee with a wide-screen fix - #1485
Conversation
The track held two logo copies and scrolled by one copy per cycle. When the viewport was wider than one copy, the track ran out of content near the end of each cycle and the band went blank. Measure the marquee and one logo list with a ResizeObserver, render enough copies to cover the widest viewport plus one, and translate by exactly one copy per cycle via --company-proof-copies. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
| function LandingPage() { | ||
| const [companyProofPaused, setCompanyProofPaused] = useState(false); | ||
| const [companyProofInView, setCompanyProofInView] = useState(false); | ||
| const [companyProofCopies, setCompanyProofCopies] = useState(2); |
There was a problem hiding this comment.
🚨 slopcop/review — Keep the static marquee full on wide screens
At 3440px with scripts disabled, two 1310px lists fill only 2621px. The last 819px stays empty.
Start with enough copies for supported wide screens, or add a static no-JavaScript layout. Test the server output at 3440px.
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
ELI5: The logo train works after the page wakes up. Before that, a very wide screen shows empty track.
I found one blocking issue:
companyProofCopiesstarts at two. Browser JavaScript raises the count only after hydration.- At 3440px without scripts, the lists cover 2621px. The last 819px stays empty.
- Render enough initial copies, or provide a static no-JavaScript layout.
- Add a server-output test for a 3440px view.
The other review areas passed:
- The security review found no unsafe SVG content, remote references, or untrusted data paths.
- The hydrated layout covered 3440px and 390px views without page errors.
- Pause, resume, offscreen pause, and reduced-motion behavior worked.
- The web type check, build, and all 68 web tests passed.
- All current GitHub checks passed.
- The codebase has no duplicate marquee implementation.
- A separate
CompanyProofcomponent could reduce page renders, but this refactor is optional.
I posted this as a normal comment. I did not approve the pull request or request changes.
The static HTML held two copies, so screens wider than one copy showed an empty track until JavaScript measured the viewport. Five copies cover a 5K display; the measurement trims the count after hydration. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Fixed in 3260740: the page now server-renders five logo copies, enough to cover a 5K display before hydration or without JavaScript. The |
Summary
Root cause
The track held exactly two logo copies and scrolled by one copy width per cycle. One copy is about 1307px wide. When the viewport is wider than one copy, the track runs out of content near the end of each cycle, and the band goes blank.
Fix
ResizeObserver. Renderceil(viewport / copyWidth) + 1copies, with a minimum of 2. Set the count as--company-proof-copieson the track.calc(-100% / var(--company-proof-copies, 2)), so one cycle always travels exactly one copy and the loop stays seamless at every width.transform, and the existingIntersectionObserverstill pauses it off screen. Resize re-renders occur only when the copy count crosses a threshold.Verification
pnpm exec turbo run typecheck --filter=@bb/web