From 87d6771c47807732370b1acb6588cee50fcfe864 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 21 Oct 2025 18:07:45 +0300 Subject: [PATCH] fix(client/rtl): split reversed --- apps/client/src/services/resizer.ts | 3 +++ apps/client/src/services/tree.ts | 3 --- .../src/widgets/type_widgets/abstract_split_type_widget.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/client/src/services/resizer.ts b/apps/client/src/services/resizer.ts index 874cf8cf9..93cb5c1b0 100644 --- a/apps/client/src/services/resizer.ts +++ b/apps/client/src/services/resizer.ts @@ -46,6 +46,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) { sizes: [leftPaneWidth, restPaneWidth], gutterSize: DEFAULT_GUTTER_SIZE, minSize: [150, 300], + rtl: glob.isRtl, onDragEnd: (sizes) => { leftPaneWidth = Math.round(sizes[0]); options.save("leftPaneWidth", Math.round(sizes[0])); @@ -79,6 +80,7 @@ function setupRightPaneResizer() { sizes: [100 - rightPaneWidth, rightPaneWidth], gutterSize: DEFAULT_GUTTER_SIZE, minSize: [300, 180], + rtl: glob.isRtl, onDragEnd: (sizes) => { rightPaneWidth = Math.round(sizes[1]); options.save("rightPaneWidth", Math.round(sizes[1])); @@ -154,6 +156,7 @@ function createSplitInstance(targetNtxIds: string[]) { const splitPanels = [...splitNoteContainer.querySelectorAll(':scope > .note-split')] .filter(el => targetNtxIds.includes(el.getAttribute('data-ntx-id') ?? "")); const splitInstance = Split(splitPanels, { + rtl: glob.isRtl, gutterSize: DEFAULT_GUTTER_SIZE, minSize: 150, }); diff --git a/apps/client/src/services/tree.ts b/apps/client/src/services/tree.ts index c508654f5..fc54c3c75 100644 --- a/apps/client/src/services/tree.ts +++ b/apps/client/src/services/tree.ts @@ -4,9 +4,6 @@ import froca from "./froca.js"; import hoistedNoteService from "./hoisted_note.js"; import appContext from "../components/app_context.js"; -/** - * @returns {string|null} - */ async function resolveNotePath(notePath: string, hoistedNoteId = "root") { const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId); diff --git a/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts b/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts index f9a2be11a..6d67ab26f 100644 --- a/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts +++ b/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts @@ -229,6 +229,7 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget { if (!this.isReadOnly) { this.splitInstance = Split(elements, { + rtl: glob.isRtl, sizes: [ 50, 50 ], direction: this.layoutOrientation, gutterSize: DEFAULT_GUTTER_SIZE,