Fix mobile search overflow and replace ADP home GIF with video#394
Conversation
- Add flex-wrap to the search autocomplete header (.aa-Header) so the context dropdown, Exact match toggle, and Ask AI button wrap instead of overflowing on mobile; wrap the standalone /search controls too. - Replace the 4.3 MB adp-infographic.gif on the home page with a <video> (WebM + MP4 fallback) and a lightweight JPG poster, cutting the home page LCP payload by ~98%. - Tidy pre-existing CSS (nav-toggle filter removals across home, component-home-v3, data-platform, labs-home, toolbar). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughFive landing-page CSS files ( Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Companion PR (content assets — adds the WebM/MP4/poster this bundle references): redpanda-data/docs-site#187 |
micheleRP
left a comment
There was a problem hiding this comment.
Review — looks good, one accessibility suggestion.
Verified:
home.hbsis the only consumer ofadp-infographic.gif(grepped content repos + docs-ui code search), so the companion deletion in redpanda-data/docs-site#187 is safe.- Asset paths (
./_images/adp-infographic.*) resolve tohome/modules/ROOT/images/, same as the old GIF. - The
.nav-toggleinvert removal looks correct:--toolbar-background=--body-background= white in light mode, and the dark-theme invert is retained, so the removed light-mode rule was white-on-white. (A quick mobile light-mode spot check on landing pages wouldn't hurt.)
Suggestion (non-blocking): the <video autoplay loop muted> plays indefinitely with no pause, which trips WCAG 2.2.2 (auto-playing >5s looping content must be pausable). Not a regression — the GIF behaved the same — but since this is a Lighthouse/a11y-driven change, consider gating autoplay behind @media (prefers-reduced-motion: no-preference) so reduced-motion users just see the poster.
Per accessibility review (WCAG 2.2.2): the looping ADP infographic video autoplayed indefinitely with no pause control. Remove the autoplay attribute and start playback from JS only when the user has not requested reduced motion. Reduced-motion users now see the static poster frame; the playback also responds to live changes in the preference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

What & why
Two issues from mobile testing + a Lighthouse audit of the home page.
1. Mobile search modal overflow
In the search autocomplete modal, the context dropdown, the Exact match toggle, and the Ask AI button sat on one non-wrapping row and overflowed horizontally on narrow screens.
src/css/search.css: addflex-wrap: wrapto.aa-Header./searchcontrols (.containerwrap + full-width searchbox) inside the existing mobile media query.2. Heavy animated GIF on the home page
adp-infographic.gif(~4.3 MB, 960×320) was the eager LCP element. Lighthouse flagged "Use video formats for animated content" (~3.96 MB potential saving) and "Properly size images".src/partials/home.hbs: replace the<img>with a<video autoplay loop muted playsinline preload="metadata" poster=...>(WebM source first, MP4 fallback).src/css/home.css: extend the visual sizing rule to also stylevideo.New assets (
adp-infographic.webm20 KB,.mp446 KB,-poster.jpg19 KB) are added in the content repo (docs-site) — see companion PR. Both PRs must land together, since this bundle references files that must exist in content.Net: ~4.3 MB → ~85 KB for the home page's largest asset (~98% reduction).
3. Minor CSS cleanup
Removes redundant
.nav-toggleinvert filters acrosshome,component-home-v3,data-platform,labs-home, andtoolbar.Testing
Built the UI bundle, pointed a local
docs-siteplaybook at it, rannpm run build-local, and verified in a browser:.aa-Headernow hasflex-wrap: wrapwith no horizontal overflow at 390px/320px; controls wrap to new rows.gulp lintpasses.🤖 Generated with Claude Code