|
| 1 | +import type { DevframeViewBuiltin } from '@devframes/hub' |
1 | 2 | import type { Meta, StoryObj } from '@storybook/vue3-vite' |
2 | 3 | import { h } from 'vue' |
3 | 4 | import { categorizedEntries, groupedEntries } from '../../stories/fixtures' |
4 | 5 | import { mountWithContext } from '../../stories/story-helpers' |
5 | 6 | import FloatingElements from '../floating/FloatingElements.vue' |
| 7 | +import ViewBuiltinSettings from '../views-builtin/ViewBuiltinSettings.vue' |
6 | 8 | import DockEdge from './DockEdge.vue' |
7 | 9 |
|
8 | 10 | /** A stand-in panel body (the real one mounts iframe/custom views). */ |
@@ -88,6 +90,35 @@ export const CollapsedIdle: Story = { |
88 | 90 | }), |
89 | 91 | } |
90 | 92 |
|
| 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 | + |
91 | 122 | /** Edge dock hosting a group — the group rail shows inside the panel. */ |
92 | 123 | export const WithGroup: Story = { |
93 | 124 | render: () => ({ |
|
0 commit comments