From bac994b6bfb8448883a3cfb0d0a4df50360cdc7a Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Fri, 6 Dec 2024 14:59:27 +0100 Subject: [PATCH 1/2] fix(ui): improve design of collapse button - The `CoreColumn` displayed the collapse arrow in the wrong direction - The `CoreSection` title wasn't vertical aligned with the button - Remove dead CSS code --- .../src/components/core/layout/CoreColumn.vue | 21 +------------------ .../components/core/layout/CoreSection.vue | 1 + .../components/core/layout/CoreSidebar.vue | 21 ------------------- 3 files changed, 2 insertions(+), 41 deletions(-) diff --git a/src/ui/src/components/core/layout/CoreColumn.vue b/src/ui/src/components/core/layout/CoreColumn.vue index 60d89b164..3cdadf173 100644 --- a/src/ui/src/components/core/layout/CoreColumn.vue +++ b/src/ui/src/components/core/layout/CoreColumn.vue @@ -17,7 +17,7 @@ v-if="isCollapsible" v-model="isCollapsed" class="collapser" - direction="left-right" + direction="top-bottom" />
@@ -212,25 +212,6 @@ watch( flex: 0 0 32px; } -.CoreColumn > .header > .collapser > .collapserArrow { - transition: all 0.5s ease-in-out; - transform: rotate(0deg); -} - -.CoreColumn:not(.collapsibleToRight).collapsed - > .header - > .collapser - > .collapserArrow { - transform: rotate(180deg); -} - -.CoreColumn.collapsibleToRight:not(.collapsed) - > .header - > .collapser - > .collapserArrow { - transform: rotate(180deg); -} - .CoreColumn.collapsibleToRight > .header { justify-content: left; } diff --git a/src/ui/src/components/core/layout/CoreSection.vue b/src/ui/src/components/core/layout/CoreSection.vue index 1d1f1b828..516ae3c8c 100644 --- a/src/ui/src/components/core/layout/CoreSection.vue +++ b/src/ui/src/components/core/layout/CoreSection.vue @@ -112,6 +112,7 @@ const isCollapsed = ref( margin: 16px 16px 0 16px; display: grid; grid-template-columns: 1fr auto; + align-items: center; } .CoreSection__title--collapsed { margin: 16px; diff --git a/src/ui/src/components/core/layout/CoreSidebar.vue b/src/ui/src/components/core/layout/CoreSidebar.vue index 6dc100726..868229b8c 100644 --- a/src/ui/src/components/core/layout/CoreSidebar.vue +++ b/src/ui/src/components/core/layout/CoreSidebar.vue @@ -137,23 +137,6 @@ onMounted(() => { margin-bottom: 16px; } -.collapserContainer > .collapser { - flex: 0 0 32px; -} - -.collapserContainer .collapserArrow { - transition: all 0.5s ease-in-out; - transform: rotate(0deg); -} - -.CoreSidebar.collapsed .collapserArrow { - transform: rotate(180deg); -} - -.collapserContainer > .collapser:hover { - background: var(--separatorColor); -} - @media only screen and (max-width: 768px) { .CoreSidebar { min-width: 100%; @@ -164,9 +147,5 @@ onMounted(() => { .CoreSidebar.collapsed > .collapserContainer { margin-bottom: 0; } - - .collapserContainer > .collapser { - transform: rotate(90deg); - } } From 403e6d4fef1531d6616f77e36e89217e65648e20 Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Sat, 7 Dec 2024 12:16:16 +0100 Subject: [PATCH 2/2] fix(ui): adapt collapser arrow direction for columns --- .../core/base/BaseCollapseButton.vue | 30 ++++++++++++++----- .../src/components/core/layout/CoreColumn.vue | 12 ++++++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/ui/src/components/core/base/BaseCollapseButton.vue b/src/ui/src/components/core/base/BaseCollapseButton.vue index aaa712928..0516aeffc 100644 --- a/src/ui/src/components/core/base/BaseCollapseButton.vue +++ b/src/ui/src/components/core/base/BaseCollapseButton.vue @@ -9,21 +9,37 @@ + +