astryx icon indicating copy to clipboard operation
astryx copied to clipboard

Breadcrumb separator doesn't adapt to RTL direction automatically

Open mmahdium opened this issue 3 months ago • 3 comments

The breadcrumb's default separator stays as "/" even when the page is in RTL mode. Not sure if this is expected or just something that got missed.

Code:

            <Breadcrumbs dir="rtl">
              <BreadcrumbItem
                href="/"
                startIcon={<Icon icon={HomeIcon} size="sm" />}
              ><></></BreadcrumbItem>
              <BreadcrumbItem href="#">
                گوشی موبایل و تجهیزات
              </BreadcrumbItem>
              <BreadcrumbItem href="#">
                گوشی موبایل
              </BreadcrumbItem>
              <BreadcrumbItem href="#">
                گوشی گیمینگ
              </BreadcrumbItem>
              <BreadcrumbItem isCurrent>iPhone 15 Pro</BreadcrumbItem>
            </Breadcrumbs>

Screenshots:

rtl: Image

ltr: Image

mmahdium avatar Sep 04 '26 12:09 mmahdium

Thanks for reporting this! This is fixed by https://github.com/facebook/astryx/pull/5365 and will be included in the next release.

nynexman4464 avatar Sep 04 '26 16:09 nynexman4464

I can reproduce the "/" staying unmirrored on the stable release, but this looks already fixed on main — likely you're seeing 0.5.2, which predates the fix:

  • Last stable: 0.5.2 (2026-08-30)
  • The contextual default-slash mirror (rtlStyles.mirror wrapping the /) landed 2026-09-03 in #5783 (changeset rtl-contextual-separators), i.e. after 0.5.2 was cut

Verified on current main that the emitted rule is .xgtlewx:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#) { transform: scaleX(-1); } and the separator span carries that class, so both <Breadcrumbs dir="rtl"> and an ancestor dir="rtl" (e.g. on <html>) mirror the slash in a real browser. Note a bare CSS direction: rtl without the dir attribute intentionally does not trigger it (per the rtlStyles.mirror docs).

Unless I'm missing something, this should resolve in the next stable release — maybe worth keeping open until then to confirm.

ManoharPaturi avatar Sep 04 '26 18:09 ManoharPaturi

Fix confirmed in 0.5.2-canary.a37a895. Next stable release should include the fix.

mmahdium avatar Sep 04 '26 18:09 mmahdium