From f5638b12252718eda9ba18e915e08995651462ef Mon Sep 17 00:00:00 2001 From: fen4flo Date: Sun, 7 Jun 2026 01:02:40 +0200 Subject: [PATCH 1/4] fix: Change to use gDialogBox instead of openDialog --- .../ZenSpaceRoutingManager.sys.mjs | 16 ++--- src/zen/space-routing/zen-space-routing.css | 24 ++----- .../space-routing/zen-space-routing.inc.xhtml | 66 +++++++++---------- 3 files changed, 45 insertions(+), 61 deletions(-) diff --git a/src/zen/space-routing/ZenSpaceRoutingManager.sys.mjs b/src/zen/space-routing/ZenSpaceRoutingManager.sys.mjs index 9109e89245..9a844af6a8 100644 --- a/src/zen/space-routing/ZenSpaceRoutingManager.sys.mjs +++ b/src/zen/space-routing/ZenSpaceRoutingManager.sys.mjs @@ -254,16 +254,16 @@ class nsZenSpaceRoutingManager { * @param {Window} parentWindow - The parent browser window * @returns {Window|null} The instanced editor window */ - openSpaceRoutingDialog(parentWindow) { - const control = parentWindow.openDialog( + async openSpaceRoutingDialog(parentWindow) { + await parentWindow.gDialogBox.open( "chrome://browser/content/zen-components/windows/zen-space-routing.xhtml", - "", - "centerscreen,modal,dependent,resizable=no,titlebar=no", - { parentWindow } + { + features: "resizable=no", + sizeTo: "available", + allowDuplicateDialogs: false, + parentWindow, + }, ); - - control.focus(); - return control; } /** diff --git a/src/zen/space-routing/zen-space-routing.css b/src/zen/space-routing/zen-space-routing.css index 31aea297e6..446bee5ec5 100644 --- a/src/zen/space-routing/zen-space-routing.css +++ b/src/zen/space-routing/zen-space-routing.css @@ -36,11 +36,7 @@ display: none !important; } -#zen-space-routing-dialog-container { - background-color: var(--sr-background); - padding: 0; - margin: 24px; - +window { height: var(--sr-height); max-height: var(--sr-height); min-height: var(--sr-height); @@ -178,7 +174,7 @@ menulist { } .sr-rule-bottom { - margin-left: 85px; + margin-left: 87px; } .input, @@ -217,27 +213,17 @@ button { .sr-remove, .close-icon { & hbox { - display: initial; - padding: 0; - margin: 0; + display: flex; } opacity: 0.5; - - &:hover { - opacity: 0.8; - } - - transition: 0.2s opacity cubic-bezier(0.075, 0.82, 0.165, 1); - appearance: none !important; background: none; border: none !important; - aspect-ratio: 1; - height: 24px; + height: 32px; + width: 32px; padding: 3px; - width: 24px; min-width: 0 !important; color: var(--text-color-secondary); diff --git a/src/zen/space-routing/zen-space-routing.inc.xhtml b/src/zen/space-routing/zen-space-routing.inc.xhtml index dfda342298..f0cff02e9e 100644 --- a/src/zen/space-routing/zen-space-routing.inc.xhtml +++ b/src/zen/space-routing/zen-space-routing.inc.xhtml @@ -56,42 +56,40 @@ - - - -

- - - - -
- - - - -

-
-# All rules will be injected here later + + +

+ + + + +
+ + + + +

- - -

- - - -# Select open in types will be injected here - - - -
+# All rules will be injected here later
+ + +

+ + + +# Select open in types will be injected here + + + +