From 746701751bd0d23bf70ca4197f1c7ce1a936e783 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Wed, 4 Nov 2026 17:20:53 +0100
Subject: [PATCH] fix: point the folder list's collapse arrows the right way in
right-to-left languages
---
.../layout/__tests__/sidebar-folder-drawer.test.tsx | 10 +++++++---
components/layout/sidebar.tsx | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/components/layout/__tests__/sidebar-folder-drawer.test.tsx b/components/layout/__tests__/sidebar-folder-drawer.test.tsx
index 413d7316b..d6f603121 100644
--- a/components/layout/__tests__/sidebar-folder-drawer.test.tsx
+++ b/components/layout/__tests__/sidebar-folder-drawer.test.tsx
@@ -102,11 +102,15 @@ describe('the folded column\'s drawer (default layout)', () => {
expect(inDrawer).toBe(docked);
});
- it('mirrors the collapse arrows in RTL, where the drawer comes from the right', () => {
+ // RTL: globals.css mirrors the chevrons icons; a flip of their own as well would turn them back.
+ it('leaves the collapse arrows to the global RTL mirror, where the drawer comes from the right', () => {
+ const arrow = () => screen.getByTestId('sidebar-collapse').querySelector('svg')!.getAttribute('class') ?? '';
render();
- expect(screen.getByTestId('sidebar-collapse').querySelector('svg')!.getAttribute('class')).toContain('rtl:-scale-x-100');
+ expect(arrow()).toMatch(/tabler-icon-chevrons-(left|right)/);
+ expect(arrow()).not.toMatch(/rtl:/);
openFromAllFolders();
- expect(screen.getByTestId('sidebar-collapse').querySelector('svg')!.getAttribute('class')).toContain('rtl:-scale-x-100');
+ expect(arrow()).toMatch(/tabler-icon-chevrons-(left|right)/);
+ expect(arrow()).not.toMatch(/rtl:/);
});
it('keeps Tab and Shift+Tab inside while open', () => {
diff --git a/components/layout/sidebar.tsx b/components/layout/sidebar.tsx
index dbe7db61f..b4c10c384 100644
--- a/components/layout/sidebar.tsx
+++ b/components/layout/sidebar.tsx
@@ -2143,8 +2143,8 @@ function SidebarImpl({
data-testid="sidebar-collapse"
title={isCollapsed ? t("expand_tooltip") : t("collapse_tooltip")}
>
- {/* The arrows point the way the column goes: mirrored in RTL, where it sits at the right. */}
- {isCollapsed ? : }
+ {/* The arrows point the way the column goes; the app's global RTL mirror turns them in RTL. */}
+ {isCollapsed ? : }
{/* The account switcher heads the folders by default, with the