From d5f789798ee3a392356f38e78ebb46bdd4d63f11 Mon Sep 17 00:00:00 2001 From: persuasive0pest <160201971+persuasive0pest@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:51:47 -0400 Subject: [PATCH] Resize sidebar to show "Context Data" by default --- .../@node-red/editor-client/src/sass/sidebar.scss | 4 ++-- .../node_modules/@node-red/editor-client/src/sass/sizes.scss | 3 ++- .../@node-red/editor-client/src/sass/variables.scss | 3 +++ .../@node-red/editor-client/src/sass/workspace.scss | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss index 21a57d29d..9cbc0d2e4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss @@ -19,7 +19,7 @@ top: 0px; right: 0px; bottom: 0px; - width: 315px; + width: var(--red-ui-sidebar-width); background: var(--red-ui-primary-background); box-sizing: border-box; z-index: 10; @@ -43,7 +43,7 @@ #red-ui-sidebar-separator { position: absolute; top: 5px; - right: 315px; + right: var(--red-ui-sidebar-width); bottom:10px; width: 7px; // z-index: 11; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss index a3d48e76d..adbf66b5c 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss @@ -14,4 +14,5 @@ * limitations under the License. **/ - $header-height: 48px; \ No newline at end of file + $header-height: 48px; + $sidebar-width: 340px; \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss index bc8f9da17..964bab2dd 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss @@ -19,6 +19,9 @@ // Header Height --red-ui-header-height: #{$header-height}; + // Sidebar width + --red-ui-sidebar-width: #{$sidebar-width}; + // Main body text --red-ui-primary-text-color: #{$primary-text-color}; // UI control label text diff --git a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss index e096c7cf3..b3ee25bca 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss @@ -20,7 +20,7 @@ top:0px; left:179px; bottom: 0px; - right: 322px; + right: calc(var(--red-ui-sidebar-width) + 7px); overflow: hidden; @include component-border; transition: left 0.1s ease-in-out;