Repository navigation
feat(web): mirror the layout right to left - #3909
Conversation
|
Important Review skippedToo many files! This PR contains 321 files, which is 21 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files.
|
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2d12d8c3d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e2d12d8 to
bc54076
Compare
66e8285 to
c851c57
Compare
d930a45 to
d1936e7
Compare
7340f6b to
c98de7a
Compare
d1936e7 to
a14c66f
Compare
c98de7a to
f8f5944
Compare
…cn() tailwind-merge drops an earlier `pl-2` when a later `px-4` arrives, but keeps an earlier `ps-2`, which then wins in the CSS. Give the logical side groups the same overrides as the physical ones, so converting a class list to logical utilities merges the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With `dir="rtl"` (Arabic, or the `ar-XB` pseudo-locale) the web app now mirrors; left-to-right rendering is unchanged. - Logical utilities (`ps-`, `ms-`, `start-`, `text-start`, `rounded-s`, `border-s`…) and logical CSS properties replace physical ones, through a new ESLint rule (`eslint-rules/no-physical-direction.js`) whose autofix did the conversion and which flags new physical utilities. Files that draw physical geometry (media timeline, chart plots, poster overlays) are allowlisted. - Radix gets the applied direction from `LocaleProvider`; Embla carousels, the calendar, the toaster and scroll strips follow it, and the wheel-gesture plugin's end check works right to left. - Directional icons mirror through one CSS rule; disclosure carets, toggle thumbs, carousel fades, hero scrims and the sidebar collapse motion follow the direction. - Arrow keys in carousels, ratings, row pickers, the dashboard grid and the item Manage menu read along the direction; dashboard drag and resize do too. - The player's transport and timeline, chart plots, card artwork corners and code stay left to right. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… to right The ebook reader's page chevrons mirror right to left, so its arrow keys now read along the page direction too. Folder paths (the folder browser's current path, the path autocomplete input and its completion hint) read left to right in every language, so `/mnt/media` keeps its leading slash. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… fails to load A failed catalog load (a chunk a newer release replaced) left the page with English text but the failed language's lang, dir and plural rules, so an Arabic choice rendered English right to left. LocaleProvider now applies the English locale in that case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
a14c66f to
f4cad77
Compare
Problem
Related issue: #3188
Validation tasks: none (English and left-to-right rendering are pixel-identical)
Stacked on #3908; the full stack order is in #3723.
The web app sets
<html dir="rtl">for Arabic, but the layout was written in physical terms: about 1,050pl-/ml-/left-/text-leftutilities, carousels and scroll strips that assume left to right, Radix components without a direction, and arrows that point the left-to-right way. In Arabic the text flowed right to left inside a left-to-right layout. This mirrors the layout.Approach
ps-,ms-,start-,text-start,rounded-s,border-s) and logical CSS replace physical ones. A new ESLint rule converted them (--fix) and flags new physical utilities; files that draw physical geometry are allowlisted.cn()merges logical sides the way it merged physical ones.LocaleProviderpasses the direction to Radix; carousels, the calendar, the toaster, scroll strips, menus and arrow keys follow it, and the carousel wheel works right to left.Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3909/
Surface and build: web app and admin, desktop and phone width; English on
mainand on a build of the whole stack, and Arabic on that build.Risks
None identified.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add app-wide i18n and right-to-left layout support to the web UI
web/src/i18n/), including a separately loaded admin catalog split by theweb.admin.prefix via a new Vite plugin in vite.config.tsLocaleProviderin useAppLocale.tsx to resolve the active app language (stored preference, browser fallback, or signed-out picker), set the document language/direction, and manage catalog loading; API requests now send anAccept-Languageheader from client.tsno-physical-directionESLint rule in no-physical-direction.js plus acatalogPartstest suite and locale-resolution testsonErrorin format.ts);TablePaginationcallers must switch fromitemNountosummaryKey;MARKER_LABEL_KEYS,NOTIFICATION_REASONS, and similar exports now expose message keys instead of display stringsMacroscope summarized a14c66f.