Skip to content

Commit e6e0a04

Browse files
authored
fix(vite): adjust ui for narrow screens (#127)
1 parent 1648da0 commit e6e0a04

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

packages/vite/src/app/components/data/AssetDetails.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function openInEditor() {
115115
Chunks
116116
</div>
117117
<NuxtLink
118-
v-for="chunk of assetChunks" :key="chunk.chunk_id" border="~ base rounded-lg" px2 py1
118+
v-for="chunk of assetChunks" :key="chunk.chunk_id" border="~ base rounded-lg" px2 py1 min-w-fit
119119
:to="{ path: route.path, query: { chunk: chunk.chunk_id } }"
120120
>
121121
<DataChunkDetails

packages/vite/src/app/components/data/AssetRelationships.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ onMounted(() => {
170170

171171
<!-- dot: current asset -->
172172
<div
173-
bg-base rounded-full border-3 font-mono border-active :style="{
173+
bg-base rounded-full border-3 font-mono border-active flex-shrink-0 :style="{
174174
margin: dotNodeMargin,
175175
width: `${SPACING.dot}px`,
176176
height: `${SPACING.dot}px`,

packages/vite/src/app/components/data/ModuleImportRelationships.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ onMounted(() => {
171171
</div>
172172
<!-- dot: current module -->
173173
<div
174-
bg-base rounded-full border-3 font-mono border-active :style="{
174+
bg-base rounded-full border-3 font-mono border-active flex-shrink-0 :style="{
175175
margin: dotNodeMargin,
176176
width: `${SPACING.dot}px`,
177177
height: `${SPACING.dot}px`,

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

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,12 @@ function handleClose() {
3232
</script>
3333

3434
<template>
35-
<Splitpanes class="!h-auto !of-visible p4 module-flow-splitter">
36-
<Pane size="45" min-size="10" max-size="90" class="!h-auto !of-visible">
37-
<ModuleFlowTimeline
38-
:info="info"
39-
:session="session"
40-
:transforms-loading="transformsLoading"
41-
:selected="selected"
42-
@select="handleSelect"
43-
/>
44-
</Pane>
45-
46-
<Pane v-if="selected" size="55" min-size="10" max-size="90" class="!h-auto !of-visible">
35+
<Splitpanes v-if="selected" class="!h-auto w-full module-flow-splitter right-4 bottom-4 fixed z-10 pointer-events-none">
36+
<Pane size="45" min-size="10" max-size="90" class="!h-auto pointer-events-none" />
37+
<Pane size="55" min-size="10" max-size="90" class="!h-auto !of-visible ">
4738
<!-- the origin of the height: -->
4839
<!-- DialogTopMargin (20) + HandleHeight (30) + padding (4*2) = 58 -->
49-
<div v-on-click-outside="[handleClose, { ignore: ['.splitpanes__splitter', '.flowmap-node-inline'] }]" w-full h="[calc(100vh-(var(--spacing)*58))]" sticky top-4>
40+
<div v-on-click-outside="[handleClose, { ignore: ['.splitpanes__splitter', '.flowmap-node-inline'] }]" w-full h="[calc(100vh-(var(--spacing)*58))]" pointer-events-auto sticky top-4>
5041
<div absolute left-0 top="1/2" translate-x="-1/2" translate-y="-1/2" bg="#DFDFDF dark:#313131" h-10 w-2 rounded-full z-10 cursor-col-resize />
5142
<ModuleFlowDetails
5243
:selected="selected"
@@ -56,10 +47,23 @@ function handleClose() {
5647
</div>
5748
</Pane>
5849
</Splitpanes>
50+
<div p4>
51+
<ModuleFlowTimeline
52+
:info="info"
53+
:session="session"
54+
:transforms-loading="transformsLoading"
55+
:selected="selected"
56+
@select="handleSelect"
57+
/>
58+
</div>
5959
</template>
6060

6161
<style>
6262
.module-flow-splitter>.splitpanes__splitter:before {
6363
background-color: transparent;
6464
}
65+
66+
.splitpanes__splitter{
67+
pointer-events: auto;
68+
}
6569
</style>

0 commit comments

Comments
 (0)