Skip to content

Commit

Permalink
fix(ui): improve design of collapse button
Browse files Browse the repository at this point in the history
- The `CoreColumn` displayed the collapse arrow in the wrong direction
- The `CoreSection` title wasn't vertical aligned with the button
- Remove dead CSS code
  • Loading branch information
madeindjs committed Dec 6, 2024
1 parent 99fcb0d commit bac994b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
21 changes: 1 addition & 20 deletions src/ui/src/components/core/layout/CoreColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
v-if="isCollapsible"
v-model="isCollapsed"
class="collapser"
direction="left-right"
direction="top-bottom"
/>
</div>
<div v-if="isCollapsed && fields.title.value" class="collapsedTitle">
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/components/core/layout/CoreSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const isCollapsed = ref<boolean>(
margin: 16px 16px 0 16px;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
}
.CoreSection__title--collapsed {
margin: 16px;
Expand Down
21 changes: 0 additions & 21 deletions src/ui/src/components/core/layout/CoreSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand All @@ -164,9 +147,5 @@ onMounted(() => {
.CoreSidebar.collapsed > .collapserContainer {
margin-bottom: 0;
}
.collapserContainer > .collapser {
transform: rotate(90deg);
}
}
</style>

0 comments on commit bac994b

Please sign in to comment.