Skip to content

Commit

Permalink
Merge pull request #17298 from ElectronicBlueberry/panel-resize-followup
Browse files Browse the repository at this point in the history
Adjust  Flex Panel Drag Handle and Collapse Button
  • Loading branch information
mvdbeek authored Jan 18, 2024
2 parents f12984b + 4409b24 commit 684a038
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions client/src/components/Panels/FlexPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const hoverDraggableOrToggle = computed(
() => (hoverDraggableDebounced.value || hoverToggle.value) && !isDragging.value
);
const toggleLinger = 1000;
const toggleShowDelay = 100;
const toggleLinger = 500;
const toggleShowDelay = 600;
let showToggleTimeout: ReturnType<typeof setTimeout> | undefined;
watch(
Expand Down Expand Up @@ -169,58 +169,85 @@ const sideClasses = computed(() => ({
<style scoped lang="scss">
@import "theme/blue.scss";
$border-width: 6px;
.flex-panel {
z-index: 100;
flex-shrink: 0;
display: flex;
width: var(--width);
position: relative;
border-color: $border-color;
border-width: 1px;
border-color: transparent;
border-width: $border-width;
box-shadow: 1px 0 transparent;
transition: border-color 0.1s, box-shadow 0.1s;
align-items: stretch;
flex-direction: column;
&::after {
content: "";
position: absolute;
height: 100%;
width: 1px;
background-color: $border-color;
}
&.show-hover {
border-color: $brand-info;
&.left {
box-shadow: 1px 0 $brand-info;
}
&.right {
box-shadow: -1px 0 $brand-info;
&::after {
background-color: $brand-info;
}
}
&.left {
border-right-style: solid;
&::after {
right: -1px;
}
.drag-handle {
right: -0.75rem;
right: -$border-width;
&:hover {
right: calc(-1 * $border-width - var(--hover-expand) / 2);
}
}
}
&.right {
border-left-style: solid;
&::after {
left: -1px;
}
.drag-handle {
left: -0.75rem;
left: -$border-width;
&:hover {
left: calc(-1 * $border-width - var(--hover-expand) / 2);
}
}
}
}
.drag-handle {
background: none;
border: none;
border-radius: 0;
position: absolute;
width: 1rem;
width: $border-width;
padding: 0;
height: 100%;
z-index: 10000;
--hover-expand: 4px;
&:hover {
cursor: ew-resize;
width: calc($border-width + var(--hover-expand));
}
}
Expand Down

0 comments on commit 684a038

Please sign in to comment.