Skip to content

Commit 418861d

Browse files
authored
perf: fixed editor height to trigger codemirror virtual scroll (#5)
1 parent 18cd2cc commit 418861d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/devtools/src/app/components/code/DiffEditor.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ function _onUpdate(size: number) {
132132
</script>
133133

134134
<template>
135-
<div h-full w-full :class="oneColumn ? 'flex' : 'grid grid-cols-2'">
136-
<div v-show="!oneColumn" ref="fromEl" class="h-inherit" />
137-
<div ref="toEl" class="h-inherit" />
135+
<div h-full w-full max-h-100vh :class="oneColumn ? 'flex' : 'grid grid-cols-2'">
136+
<div v-show="!oneColumn" ref="fromEl" class="h-full max-h-100vh" />
137+
<div ref="toEl" class="h-full max-h-100vh" />
138138
</div>
139139
</template>
140140

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ const codeDisplay = computed(() => {
289289
v-if="codeDisplay"
290290
w-200 m4
291291
border="~ base rounded-lg" bg-glass of-hidden
292-
grid="~ rows-[max-content_1fr]"
292+
grid="~ rows-[max-content_1fr]" max-h-120vh
293293
>
294-
<div pl4 p2 font-mono border="b base" flex="~ items-center gap-2">
294+
<div pl4 p2 font-mono border="b base" flex="~ items-center gap-2" h-max-100vh>
295295
<PluginName :name="codeDisplay.plugin_name" />
296296
<span op50 text-xs>
297297
{{ codeDisplay.type === 'load' ? 'Load' : 'Transform' }}

0 commit comments

Comments
 (0)