Repository navigation
fix(website): align the language picker chevron - #3805
Conversation
Replace the font-dependent down glyph with a fixed-size SVG mask that inherits the button color and aligns within its existing flex layout. Rotate the chevron when the native details menu is open. Refs morluto#3804
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge; no blocking findings remain. SummaryThe PR replaces the language picker's text arrow with a centered SVG chevron and rotates it when the menu opens.
Reviews (2) · Last reviewed commit: "fix(website): preserve the chevron in fo..." · Reviewed by Greptile |
CassieFox23
left a comment
There was a problem hiding this comment.
TL;DR: Main does not have this change, and I found no blocker at head ea98e97. The new chevron and its high-contrast fix both look right in the CSS. One small nit: a browser without mask support would show a solid block.
Findings
Nit
- The icon uses the plain mask shorthand with no
-webkit-maskcopy. A browser that skips that line would still paint the 0.75rem box withbackground-color. The picker would then show a solid square, not a chevron. Either add the prefixed line, or say in the body which browsers the site supports. I found no browser list for the site in the website folder, CONTRIBUTING.md or package.json.
Looks good
- In forced-colors mode, the chevron vanishes. That is what greptile-apps found. This head fixes it. The forced-colors rule sets
forced-color-adjust: noneandCanvasTexton the chevron only. That thread is resolved. Codex shows a failed run on 0f48ba3, the first commit. I found no Codex review comments on the thread. - The open-state rule keys on
[open]. The page builder on main writes the picker as a<details class="language-picker">. So the selector matches the markup (scripts/website_i18n.py, line 111 on main). - The change is one file and 16 added lines. Main has two commits since the merge base that touch this stylesheet. They are 48c3d2d (#3821) and a1ca8c7 (#3851). Neither touches these lines. On main, the
::afterrule still hascontent: "⌄". - The body follows the template and links issue #3804, which is still open. The required checks pass on this head, including the website checks.
Not run
- No build and no tests. This is a read-only review of the diff against main.
- I did not render the page. The author's before and after screenshots are not rechecked.
- The body says forced-colors was tested only for the closed picker in a light palette. I did not test the open state.
Thanks, hi2242, for testing the forced-colors case. The test ran before and after the fix, with both screenshots shown.
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
Summary
Fixes #3804. Replace the language picker's small, low-positioned text arrow with a centered chevron that points down when collapsed and up when expanded.
Problem and expected behavior
The shared stylesheet uses the font glyph
⌄without icon dimensions or an open-state override. The supplied screenshots show its small size and low alignment, and the unchanged down arrow when the menu is open. The disclosure indicator should be legible, centered, and reflect the menu state.Change and scope
Change only
website/public/assets/styles.css: use a 0.75rem-square SVG mask with rounded strokes andcurrentColor, then rotate it 180 degrees fordetails[open]. The existing flex alignment centers the icon. A follow-up for the high-contrast review adds@media (forced-colors: active)on the chevron pseudo-element only, withforced-color-adjust: noneandbackground-color: CanvasText. This preserves the masked icon's foreground paint using the user's system palette while leaving the rest of the control under normal forced-color handling. Native<details>interaction, labels, templates, and translations stay intact.This is an AI-assisted website usability fix within the contribution scope. The independent header-navigation wrapping report remains tracked by #3597 / #3598.
Before and after
Before-and-after screenshots of the collapsed and expanded picker. The original PNGs are preserved on a separate evidence branch. Different crops, widths, and star counts limit the comparison to the chevron's appearance and direction. Open an image for full size.
High-contrast review: before and after
After the review feedback, I tested the code before and after the fix with
forced-colors: activein DevTools. Before the fix, the chevron disappeared. After the fix, I could see the black downward chevron, aligned with the language name.I added
forced-color-adjust: noneandbackground-color: CanvasTextto the chevron in forced-colors mode so it keeps its visible paint using the system text color. I took these screenshots with the menu closed and a light background in DevTools emulation.Contract and boundary impact
Expected effects:
Evidence and regression coverage
summary::afteratd69acc3455c33f90a2fc4381db43d38b6af50622.Validation performed
Final head:
ea98e97c396ced13dd5f5a233515bb22fa64eefd. Windows, Python 3.13.1, pinned Node 24.18.0/npm 11.16.0, CairoSVG 2.9.1 and native Cairo 1.18.6 with DejaVu Sans 2.37.PYTHONUTF8=1applies to child Python processes; native Cairo is exposed through the local DLL directory. These results supersede the previous missing-Cairo and unrun-npm entries.website/.venv/Scripts/python.exe -X utf8 scripts/website.py check— passed: 380 reading pages generated in 20 languages, sharing PNG generated, 382 HTML pages/26,087 local references and metadata/assets verified, and all 16 regression tests passed.npm run check— passed: all 6 Turbo tasks and architecture guards; existing lint warnings remain, with 0 errors.npm run check:fast— passed in the pre-push hook: 2/2 tasks successful.tinycss2parsing — the shared stylesheet, nested forced-colors rule and declarations parse successfully; the override is scoped to.language-picker summary::after.git diff d69acc3455c33f90a2fc4381db43d38b6af50622..HEAD --check— passed.Source-derived reasoning: forced colors can replace background paint; the SVG-mask chevron previously depended only on
background-color: currentColorwhile the native marker was hidden. The new scoped override keeps that paint and usesCanvasText, rather than a fixed author color. The new screenshots establish the shown collapsed-state result in light-palette emulation; expanded-state emulation, a dark palette, and actual Windows contrast themes still need manual checks.Compatibility, safety, and release
Author readiness
Human owner: @hi2242
Before merge
type(scope): outcome.