Skip to content

Commit 3672417

Browse files
authored
fix(hub-ui): restore scrolling for edge panel content at top/bottom (#255)
1 parent 37ef8d9 commit 3672417

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

packages/hub-ui/src/client/components/dock/DockEdge.stories.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import type { DevframeViewBuiltin } from '@devframes/hub'
12
import type { Meta, StoryObj } from '@storybook/vue3-vite'
23
import { h } from 'vue'
34
import { categorizedEntries, groupedEntries } from '../../stories/fixtures'
45
import { mountWithContext } from '../../stories/story-helpers'
56
import FloatingElements from '../floating/FloatingElements.vue'
7+
import ViewBuiltinSettings from '../views-builtin/ViewBuiltinSettings.vue'
68
import DockEdge from './DockEdge.vue'
79

810
/** A stand-in panel body (the real one mounts iframe/custom views). */
@@ -88,6 +90,35 @@ export const CollapsedIdle: Story = {
8890
}),
8991
}
9092

93+
const settingsEntry: DevframeViewBuiltin = {
94+
type: '~builtin',
95+
id: '~settings',
96+
title: 'Settings',
97+
icon: 'ph:gear-duotone',
98+
}
99+
100+
/**
101+
* Bottom edge hosting the real Settings view, whose tab content is taller than
102+
* the panel. Guards the panel's main-axis height chain: the other stories stub
103+
* `#view` with short, self-scrolling content, so they cannot catch a content
104+
* wrapper that grows past the panel instead of letting descendants scroll.
105+
*/
106+
export const BottomWithSettings: Story = {
107+
render: () => ({
108+
setup: () => mountWithContext(
109+
{
110+
entries: categorizedEntries,
111+
selectedId: 'overview',
112+
panel: { mode: 'edge', position: 'bottom', height: 40 },
113+
},
114+
ctx => [
115+
h(DockEdge, { context: ctx }, { view: () => h(ViewBuiltinSettings, { context: ctx, entry: settingsEntry }) }),
116+
h(FloatingElements),
117+
],
118+
),
119+
}),
120+
}
121+
91122
/** Edge dock hosting a group — the group rail shows inside the panel. */
92123
export const WithGroup: Story = {
93124
render: () => ({

packages/hub-ui/src/client/components/dock/DockEdge.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ const toolbarClass = computed(() => {
363363
364364
const contentClass = computed(() => {
365365
return isVertical.value
366-
? 'flex-1 h-full overflow-clip'
367-
: 'flex-1 w-full overflow-clip'
366+
? 'flex-1 h-full min-w-0 overflow-clip'
367+
: 'flex-1 w-full min-h-0 overflow-clip'
368368
})
369369
370370
/** A thin band flush with the candidate edge, tracking the drag before it commits on release. */

0 commit comments

Comments
 (0)