NavBar: layout does not switch to RTL for RTL locales
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, tailwindcss, typescript
- Bereich
- frontend, internationalization
Rechercherichtung
Start with src/registry/components/navbar.tsx, especially the language menu around line 161, and read how LanguageSwitcher derives direction from the active locale and isRtl. Check the existing NavBar tests and add coverage for locale direction, Locale.rtl overrides, and an explicit dir prop. Done means the bar and dropdown mirror in LTR and RTL, option labels align at the start, and the requested desktop and mobile light and dark screenshots are covered.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
Selecting an RTL locale in NavBar translates the link labels but leaves the layout left-to-right. With ar selected in the docs demo:
- The logo stays on the left, links read left to right, and the language/GitHub/CTA group stays on the right.
- The language menu is pinned with a physical
right-0(src/registry/components/navbar.tsx:161), so it doesn't mirror. - Option labels in the language menu render centered instead of start-aligned (the option
<button>has notext-start, so the label inherits the button's default centering).
NavBar never sets dir. LanguageSwitcher already derives it from the active locale (activeLocale?.rtl ?? isRtl(locale)).
Expected
NavBarsetsdir="rtl"on the<nav>when the active locale is RTL, using the same rule asLanguageSwitcher(Locale.rtloverride first, thenisRtlfromlocale-data). An explicitdirprop wins.- Layout mirrors via logical utilities:
end-0/start-0instead ofright-0/left-0,ms-*/me-*instead ofml-*/mr-*, andtext-starton option labels. This applies to the desktop bar, the mobile bar, the mobile menu and the language dropdown. - Each option keeps its own
dir, so mixed-script lists read correctly.
Acceptance
- Selecting
arflips the whole bar. Selectingenflips it back. - Language dropdown opens aligned to the trigger's inline-end edge in both directions.
- Option labels are start-aligned in LTR and RTL.
-
dirprop overrides the locale-derived direction. - Tests for:
diron<nav>for an RTL locale, theLocale.rtloverride (rtl: true/rtl: false), and the explicitdirprop. - Screenshots: LTR and RTL, desktop and ~390px, light and dark.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 39
- Forks
- 16
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus babelize/babelize-elements
-
bug website
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
babelize/babelize-elements#46 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug language-switcher priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
babelize/babelize-elements#26 ·
Maintainer antworten meist innerhalb von 1 Tag
-
component enhancement help wanted
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
babelize/babelize-elements#47 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Website: revamp and improve the landing pageEvtl. vergeben @anjalinayak01 hat das vor 6 Tagen übernommen. Offenenhancement help wanted priority: medium website
Schwierigkeit 4/5 Über eine Woche Anfängerfreundlichkeit 30/100
babelize/babelize-elements#37 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Website: GitHub stars / forks / PRs counter in navbarEvtl. vergeben @TanmayNileshShinde hat das vor 1 Tag übernommen. Offenenhancement good first issue priority: low website
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
babelize/babelize-elements#36 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in babelize/babelize-elements
Ähnliche Issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
lingdojo/kana-dojo#32590 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug p2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bastani-inc/atomic#3703 ·
Maintainer antworten meist innerhalb von 1 Tag
-
backend bug difficulty: medium priority: medium reliability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
trustflow-protocol/trustflow-backend#730 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
firecrawl/firecrawl-mcp-server#548 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag