NavBar: layout does not switch to RTL for RTL locales
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, tailwindcss, typescript
- Área
- frontend, internationalization
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 39
- Forks
- 16
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de babelize/babelize-elements
-
bug website
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
babelize/babelize-elements#46 ·
Los mantenedores suelen responder en 1 día
-
bug language-switcher priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
babelize/babelize-elements#26 ·
Los mantenedores suelen responder en 1 día
-
component enhancement help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
babelize/babelize-elements#47 ·
Los mantenedores suelen responder en 1 día
-
Website: revamp and improve the landing pagePosiblemente ocupada @anjalinayak01 la tomó hace 4 días. Abiertoenhancement help wanted priority: medium website
Dificultad 4/5 Más de una semana Aptitud para principiantes 30/100
babelize/babelize-elements#37 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue priority: low website
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
babelize/babelize-elements#36 ·
Los mantenedores suelen responder en 1 día
Todos los issues de babelize/babelize-elements
Issues similares
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vicharanashala/ajrasakha#1439 ·
Los mantenedores suelen responder en 1 día
-
Add: TV5Monde AsieAbiertoapproved check:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
codex-team/editor.js#3037 ·
-
complexity: trivial good first issue impact: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
ueberdosis/tiptap#8522 ·
Los mantenedores suelen responder en 1 día
-
Bump anybuf version to ^1.0.0Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wormhole-foundation/wormhole#5062 ·
Los mantenedores suelen responder en 1 día