Skip to content

Commit ce491df

Browse files
committed
feat: improve panel layout
1 parent 79b0f17 commit ce491df

File tree

4 files changed

+29
-23
lines changed

4 files changed

+29
-23
lines changed

packages/devtools/src/app/components/flowmap/ModuleFlow.vue

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const codeDisplay = computed(() => {
113113
</script>
114114

115115
<template>
116-
<div pt4 w-max>
116+
<div pt4>
117117
<div v-if="info.importers?.length" text-sm>
118118
<div flex>
119119
<VMenu>
@@ -189,8 +189,8 @@ const codeDisplay = computed(() => {
189189
</VMenu>
190190
</template>
191191
</div>
192-
<div w-full flex="~">
193-
<div select-none flex-1>
192+
<div flex="~ gap-10">
193+
<div select-none w-max>
194194
<FlowmapExpandable
195195
:expandable="resolveIds.length > 0"
196196
:class-root-node="resolveIds.length === 0 ? 'border-dashed' : ''"
@@ -290,23 +290,30 @@ const codeDisplay = computed(() => {
290290
</div>
291291

292292
<div
293-
v-if="!!codeDisplay?.from || !!codeDisplay?.to"
294-
border="~ base rounded-lg" bg-glass of-hidden max-h-120vh flex-1 m4
293+
w-259
294+
:class="codeDisplay?.from && codeDisplay?.to ? '' : 'border-dashed'"
295+
border="~ base rounded-lg" of-hidden max-h-120vh m4 flex="~ col"
295296
>
296-
<div pl4 p2 font-mono border="b base" flex="~ items-center gap-2" h-max-100vh>
297-
<PluginName :name="codeDisplay.plugin_name" />
298-
<span op50 text-xs>
299-
{{ codeDisplay.type === 'load' ? 'Load' : 'Transform' }}
300-
</span>
301-
<div flex-auto />
302-
<DisplayCloseButton @click="selected = null" />
303-
</div>
304-
<CodeDiffEditor
305-
:from="codeDisplay.from ?? ''"
306-
:to="codeDisplay.to ?? ''"
307-
:diff="true"
308-
:one-column="false"
309-
/>
297+
<template v-if="codeDisplay?.from && codeDisplay?.to">
298+
<div pl4 p2 font-mono border="b base" flex="~ items-center gap-2" h-max-100vh>
299+
<PluginName :name="codeDisplay?.plugin_name ?? ''" />
300+
<span v-if="codeDisplay?.type" op50 text-xs>
301+
{{ codeDisplay?.type === 'load' ? 'Load' : 'Transform' }}
302+
</span>
303+
<div flex-auto />
304+
<DisplayCloseButton @click="selected = null" />
305+
</div>
306+
<CodeDiffEditor
307+
:from="codeDisplay?.from ?? ''"
308+
:to="codeDisplay?.to ?? ''"
309+
:diff="true"
310+
:one-column="false"
311+
/>
312+
</template>
313+
<!-- TODO: show more info with selected node -->
314+
<span v-else op50 italic ma>
315+
Select a node to view
316+
</span>
310317
</div>
311318
</div>
312319
</div>

packages/devtools/src/app/components/flowmap/NodeModuleInfo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const importterModule = computed(() => {
8484
v-if="'plugin_name' in item"
8585
:class="isDashed ? 'op50' : ''"
8686
:name="item.plugin_name"
87-
class="font-mono text-sm"
87+
class="font-mono text-sm ws-nowrap"
8888
/>
8989
</slot>
9090
</button>

packages/devtools/src/app/pages/session/[session].vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ onMounted(async () => {
8080

8181
<div
8282
v-if="route.query.module" fixed inset-0
83-
backdrop-blur-5 z-panel-content
83+
backdrop-blur-8 backdrop-brightness-95 z-panel-content
8484
>
8585
<div
8686
:key="(route.query.module as string)"
@@ -92,7 +92,6 @@ onMounted(async () => {
9292
<FlowmapModuleFlowLoader
9393
:module="(route.query.module as string)"
9494
:session="session"
95-
w-max
9695
/>
9796
<DisplayCloseButton
9897
absolute right-2 top-2

packages/devtools/src/app/pages/session/[session]/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const dataTable = computed<DataTableItem[]>(() => {
9393
</div>
9494
<div flex="~ gap-2">
9595
<template v-for="item of sideNavItems" :key="item.to">
96-
<NuxtLink v-if="item.category === 'session'" btn-action :to="{ path: item.to }" flex="~ col" min-w-40>
96+
<NuxtLink v-if="item.category === 'session'" btn-action :to="{ path: item.to }" flex="~ col" min-w-40 p4>
9797
<div :class="item.icon" text-2xl />
9898
{{ item.title }}
9999
</NuxtLink>

0 commit comments

Comments
 (0)