From d0b614d88ee5ad849d75d8ee4d9706ddff47c95a Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 14 Nov 2026 13:36:12 -0800 Subject: [PATCH] Keep edge mode to the desktop shell and mirror it in right-to-left Phones and Cockpit keep their own layouts and do not show the switch. The rails' name panels and edge mode run toward the middle in a right-to-left language, and the switch reads its side again after the layout moves it. Co-authored-by: Manjunath Paparaju --- src/ui/kit/UiPanelEdge.vue | 17 ++++++++++---- src/ui/panelEdge.js | 4 +++- src/ui/styles/panel-edge.css | 38 +++++++++++++++++++++++-------- src/ui/styles/rtl.css | 44 ++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 15 deletions(-) diff --git a/src/ui/kit/UiPanelEdge.vue b/src/ui/kit/UiPanelEdge.vue index 5827e914f..bb1ec1f9c 100644 --- a/src/ui/kit/UiPanelEdge.vue +++ b/src/ui/kit/UiPanelEdge.vue @@ -15,10 +15,19 @@ function toggle() { function sync() { side.value = panelSide(button.value); } -onMounted(sync); -const icon = computed(() => (side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left')); +// The layout moves some panels to the right column after they mount, so the +// side is read again once that has happened. +onMounted(() => { + sync(); + globalThis.requestAnimationFrame?.(sync); +}); +const icon = computed(() => + side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left', +); const label = computed(() => - on.value ? t('Move panels back beside the rail') : t('Move panels over the rail, to the edge'), + on.value + ? t('Move panels back beside the rail') + : t('Move panels over the rail, to the edge'), ); @@ -26,7 +35,7 @@ const label = computed(() =>