From f880aa769c468ab0c7afe382ddf5c25bab4a3c10 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 9 Oct 2025 17:45:48 +0300 Subject: [PATCH] fix(client/rtl): wrong order of tabs --- apps/client/src/stylesheets/theme-next/shell.css | 2 +- apps/client/src/widgets/tab_row.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css index 6e8beb777..bbae31685 100644 --- a/apps/client/src/stylesheets/theme-next/shell.css +++ b/apps/client/src/stylesheets/theme-next/shell.css @@ -1055,7 +1055,7 @@ body.layout-horizontal .tab-row-widget .note-tab .note-tab-wrapper { background-color: var(--workspace-tab-background-color); } -.tab-row-widget .note-tab:nth-child(1) { +body:not([dir=rtl]) .tab-row-widget .note-tab:nth-child(1) { transform: translate3d(var(--tab-first-item-horiz-offset), 0, 0); } diff --git a/apps/client/src/widgets/tab_row.ts b/apps/client/src/widgets/tab_row.ts index 84c96378b..c2405aaed 100644 --- a/apps/client/src/widgets/tab_row.ts +++ b/apps/client/src/widgets/tab_row.ts @@ -500,6 +500,9 @@ export default class TabRowWidget extends BasicWidget { position -= MARGIN_WIDTH; // the last margin should not be applied const anchorPosition = position; + if (glob.isRtl) { + tabPositions.reverse(); + } return { tabPositions, anchorPosition }; }