Skip to content

A platform for community discussion. Free, open, simple.

UX: make admin code editor height more flexible (#32241)

Krisfb162ad64da0
diff --git a/app/assets/javascripts/admin/addon/templates/customize-themes-edit.gjs b/app/assets/javascripts/admin/addon/templates/customize-themes-edit.gjs
index 5d4a818ac66..0e5a9e5c8a4 100644
--- a/app/assets/javascripts/admin/addon/templates/customize-themes-edit.gjs
+++ b/app/assets/javascripts/admin/addon/templates/customize-themes-edit.gjs
@@ -37,6 +37,7 @@ export default RouteTemplate(
@fieldAdded={{@controller.fieldAdded}}
@maximized={{@controller.maximized}}
@save={{@controller.save}}
+ @class="editor-container"
/>
<div class="admin-footer">
diff --git a/app/assets/stylesheets/admin/customize.scss b/app/assets/stylesheets/admin/customize.scss
index c500f8c6111..5fce4864a06 100644
--- a/app/assets/stylesheets/admin/customize.scss
+++ b/app/assets/stylesheets/admin/customize.scss
@@ -614,57 +614,60 @@
}
}
- .current-style.maximized {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: z("fullscreen");
- background: var(--secondary);
+ .content-list ul {
+ margin-bottom: 10px;
+ }
+
+ .current-style {
width: 100%;
- padding: 0;
- margin: 0;
- .admin-container {
- position: absolute;
- bottom: 50px;
- top: 80px;
- width: 100%;
+ .wrapper {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ height: calc(100dvh - var(--header-offset) - 3em);
+ padding: 0;
}
- .admin-footer {
- margin-top: 10px;
+ .editor-container {
+ flex: 1 1 auto;
+ display: flex;
+ flex-direction: column;
}
.ace-wrapper {
- height: calc(100vh - 270px);
- }
-
- .edit-main-nav ~ .ace-wrapper {
- height: calc(100vh - 315px);
+ position: relative;
+ min-height: unset;
+ flex: 1 1 0;
}
- .wrapper {
- position: absolute;
- top: 20px;
- bottom: 10px;
- left: 20px;
- right: 20px;
- }
- }
+ &.maximized {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: z("fullscreen");
+ background: var(--secondary);
+ padding: 0;
+ margin: 0;
- .content-list,
- .current-style {
- float: left;
- }
+ .wrapper {
+ padding: 1em;
+ height: 100dvh;
+ }
- .content-list ul {
- margin-bottom: 10px;
- }
+ .admin-container {
+ position: absolute;
+ bottom: 50px;
+ top: 80px;
+ width: 100%;
+ }
- .current-style {
- width: 100%;
+ .admin-footer {
+ margin-top: 10px;
+ }
+ }
.admin-container {
margin: 0;
@@ -711,13 +714,6 @@
}
}
- .ace-wrapper {
- position: relative;
- height: calc(100vh - 450px);
- min-height: 200px;
- width: 100%;
- }
-
.ace_editor {
position: absolute;
left: 0;