Skip to content

Commit 67af4ad

Browse files
committed
fix(hub-ui): make dock panels background-free
1 parent 4fcf5dc commit 67af4ad

4 files changed

Lines changed: 54 additions & 2 deletions

File tree

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,29 @@ export const WithGroup: Story = {
135135
),
136136
}),
137137
}
138+
139+
function patternedEdgeStory(theme: 'light' | 'dark'): Story {
140+
return {
141+
globals: { theme },
142+
render: () => ({
143+
setup: () => mountWithContext(
144+
{
145+
entries: categorizedEntries,
146+
selectedId: 'overview',
147+
panel: { mode: 'edge', position: 'bottom', height: 40, width: 30 },
148+
session: { open: true },
149+
},
150+
ctx => h('div', { class: 'relative w-screen h-screen bg-secondary bg-grid-24' }, [
151+
h(DockEdge, { context: ctx }, { view: ({ entry }: any) => body(entry) }),
152+
h(FloatingElements),
153+
]),
154+
),
155+
}),
156+
}
157+
}
158+
159+
/** Transparent edge material blurring a grid in light mode. */
160+
export const TransparentMaterialLight: Story = patternedEdgeStory('light')
161+
162+
/** Transparent edge material blurring a grid in dark mode. */
163+
export const TransparentMaterialDark: Story = patternedEdgeStory('dark')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ const dragPreviewStyle = computed<CSSProperties | undefined>(() => {
407407
<template>
408408
<div
409409
id="devframes-edge-panel"
410-
class="bg-glass:80 border border-base color-base shadow overflow-clip z-floating-anchor font-sans text-[15px] box-border"
410+
class="bg-transparent backdrop-blur-7 border border-base color-base shadow overflow-clip z-floating-anchor font-sans text-[15px] box-border"
411411
:class="[panelLayoutClass, { 'devframes-edge-collapsed': isCollapsed }]"
412412
:style="panelStyle"
413413
@mousemove="bringUp"

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,29 @@ export const RightAnchored: Story = {
7272
),
7373
}),
7474
}
75+
76+
function patternedPanelStory(theme: 'light' | 'dark'): Story {
77+
return {
78+
globals: { theme },
79+
render: () => ({
80+
setup: () => mountWithContext(
81+
{ entries: categorizedEntries, selectedId: 'overview', panel: { position: 'bottom', left: 50, top: 100, width: 60, height: 60 } },
82+
ctx => h('div', { class: 'relative w-screen h-screen bg-secondary bg-grid-24' }, [
83+
h('div', { id: 'devframes-anchor', style: { left: '50vw', top: '100vh' } }, [
84+
h(DockPanel, {
85+
context: ctx,
86+
selected: ctx.docks.selected,
87+
panelMargins: MARGINS,
88+
}, { view: ({ entry }: any) => body(entry) }),
89+
]),
90+
]),
91+
),
92+
}),
93+
}
94+
}
95+
96+
/** Transparent panel material blurring a grid in light mode. */
97+
export const TransparentMaterialLight: Story = patternedPanelStory('light')
98+
99+
/** Transparent panel material blurring a grid in dark mode. */
100+
export const TransparentMaterialDark: Story = patternedPanelStory('dark')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ onMounted(() => {
175175
<div
176176
v-show="context.docks.selected && context.docks.selected.type !== 'action'"
177177
ref="dockPanel"
178-
class="bg-glass:80 rounded-lg border border-base color-base shadow overflow-hidden"
178+
class="bg-transparent backdrop-blur-7 rounded-lg border border-base color-base shadow overflow-hidden"
179179
:style="panelStyle"
180180
@contextmenu="openContextMenu"
181181
>

0 commit comments

Comments
 (0)