Skip to content

Commit 4bbc557

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

4 files changed

Lines changed: 70 additions & 2 deletions

File tree

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,37 @@ 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 overflow-hidden bg-secondary bg-grid-24' }, [
151+
h('div', {
152+
'aria-hidden': 'true',
153+
'class': 'pointer-events-none absolute left-[14%] top-[36%] h-72 w-72 rounded-full bg-primary-500 op40',
154+
}),
155+
h('div', {
156+
'aria-hidden': 'true',
157+
'class': 'pointer-events-none absolute right-[12%] bottom-[8%] h-40 w-72 rounded-3xl bg-active',
158+
}),
159+
h(DockEdge, { context: ctx }, { view: ({ entry }: any) => body(entry) }),
160+
h(FloatingElements),
161+
]),
162+
),
163+
}),
164+
}
165+
}
166+
167+
/** Transparent edge material blurring a grid in light mode. */
168+
export const TransparentMaterialLight: Story = patternedEdgeStory('light')
169+
170+
/** Transparent edge material blurring a grid in dark mode. */
171+
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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,37 @@ 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 overflow-hidden bg-secondary bg-grid-24' }, [
83+
h('div', {
84+
'aria-hidden': 'true',
85+
'class': 'pointer-events-none absolute left-[14%] top-[36%] h-72 w-72 rounded-full bg-primary-500 op40',
86+
}),
87+
h('div', {
88+
'aria-hidden': 'true',
89+
'class': 'pointer-events-none absolute right-[12%] bottom-[8%] h-40 w-72 rounded-3xl bg-active',
90+
}),
91+
h('div', { id: 'devframes-anchor', style: { left: '50vw', top: '100vh' } }, [
92+
h(DockPanel, {
93+
context: ctx,
94+
selected: ctx.docks.selected,
95+
panelMargins: MARGINS,
96+
}, { view: ({ entry }: any) => body(entry) }),
97+
]),
98+
]),
99+
),
100+
}),
101+
}
102+
}
103+
104+
/** Transparent panel material blurring a grid in light mode. */
105+
export const TransparentMaterialLight: Story = patternedPanelStory('light')
106+
107+
/** Transparent panel material blurring a grid in dark mode. */
108+
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)