Skip to content

fix(website): align the language picker chevron - #3805

Merged
morluto merged 2 commits into
morluto:mainfrom
hi2242:fix/language-picker-chevron
Oct 22, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
hi2242:fix/language-picker-chevron

Conversation

@hi2242

@hi2242 hi2242 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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 and currentColor, then rotate it 180 degrees for details[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, with forced-color-adjust: none and background-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.

State Before After
Collapsed Before: small down glyph After: centered down chevron
Expanded Before: down glyph while menu is open After: upward chevron

High-contrast review: before and after

After the review feedback, I tested the code before and after the fix with forced-colors: active in DevTools. Before the fix, the chevron disappeared. After the fix, I could see the black downward chevron, aligned with the language name.

Before feedback fix After feedback fix
Forced-colors emulation before: collapsed English picker without a visible chevron Forced-colors emulation after: collapsed English picker with a visible black downward chevron

I added forced-color-adjust: none and background-color: CanvasText to 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

  • Semantic owner and earliest changed stage: the shared stylesheet's language-picker pseudo-element.
  • Contribution scope fit and linked maintainer decision: existing website usability; a provider/capability scope decision is not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: no provider changes. Manual device-emulation checks are listed below; compatibility across different browser engines remains unverified.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged. Original screenshot files are preserved.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable to this CSS-only change.
  • Generated metadata, package, or installation impact: none. Preview output and screenshots are outside the PR's source diff.

Expected effects:

  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added or updated: none for this reversible presentation change; existing source/catalog checks and a rendered preview were used.
  • Base evidence: before-and-after screenshots, manual device-toolbar checks, and inspection of summary::after at d69acc3455c33f90a2fc4381db43d38b6af50622.
  • User-visible CLI/MCP output: not applicable.
  • Remaining proof gaps: the new forced-colors screenshots cover the collapsed picker in an emulated light palette. Expanded-state forced-colors rendering, a dark forced-color palette, actual Windows contrast themes, physical-device coverage, and cross-browser-engine compatibility remain unverified. The automated tests alone do not establish icon visibility at paint time. Specific device presets, viewport sizes, browser/version, and zoom are not listed here. Real-provider verification is not applicable to this CSS change.

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=1 applies 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.
  • Python tinycss2 parsing — 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.
  • Local preview HTTP — the served stylesheet returned 200 and matched committed CSS byte-for-byte, including the forced-colors rule. This is transport/source verification, not a visual high-contrast reproduction.
  • Manual forced-colors emulation: the new before/after screenshots above show the collapsed chevron disappearing before the feedback fix and remaining visible after it, in the shown light palette. This updates the previous statement that forced-colors emulation had not been checked.
  • Ordinary-mode visual evidence remains the original before/after screenshots and my manual device-toolbar checks. The issue also includes a narrow-header screenshot showing language-label ellipsis and an aligned chevron.

Source-derived reasoning: forced colors can replace background paint; the SVG-mask chevron previously depended only on background-color: currentColor while the native marker was hidden. The new scoped override keeps that paint and uses CanvasText, 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

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows source/render checks, ordinary-mode screenshots/device-toolbar checks, and before/after developer-tools forced-colors emulation of the collapsed picker in a light palette. Actual Windows contrast themes, physical-device coverage, and cross-browser-engine compatibility remain unverified. No provider is involved.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: CSS-only website presentation; no target interaction or additional JavaScript.

Author readiness

Human owner: @hi2242

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T06:17:32.344780Z 0f48ba3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking findings remain.

Summary

The PR replaces the language picker's text arrow with a centered SVG chevron and rotates it when the menu opens.

  • The language picker shows a centered chevron that tracks its open state.

Reviews (2) · Last reviewed commit: "fix(website): preserve the chevron in fo..." · Reviewed by Greptile

Comment thread website/public/assets/styles.css Resolved

@CassieFox23 CassieFox23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-mask copy. A browser that skips that line would still paint the 0.75rem box with background-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: none and CanvasText on 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 ::after rule still has content: "⌄".
  • 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.

Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.11
  • Head / base: ea98e97 / d69acc3

🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

@morluto
morluto merged commit aa52137 into morluto:main Oct 22, 2026
29 checks passed
@morluto morluto added the bug Something isn't working label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Language-picker arrow is small, misaligned, and does not reflect open state

3 participants