Skip to content

Commit

Permalink
fix: Module Graph view is blocking the Console view
Browse files Browse the repository at this point in the history
Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com>
  • Loading branch information
g4rry420 authored and sheremet-va committed Jul 11, 2023
1 parent 52aef92 commit 3b5f96b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/ui/client/components/FileDetails.vue
Expand Up @@ -9,7 +9,6 @@ import type { ModuleGraphData } from '#types'
const data = ref<ModuleGraphData>({ externalized: [], graph: {}, inlined: [] })
const graph = ref<ModuleGraph>({ nodes: [], links: [] })
const draft = ref(false)
const hasGraphBeenDisplayed = ref(false)
debouncedWatch(
current,
Expand All @@ -29,9 +28,6 @@ function open() {
}
function changeViewMode(view: Params['view']) {
if (view === 'graph')
hasGraphBeenDisplayed.value = true
viewMode.value = view
}
const consoleCount = computed(() => {
Expand Down Expand Up @@ -99,8 +95,8 @@ function onDraft(value: boolean) {
</div>

<div flex flex-col flex-1 overflow="hidden">
<div v-if="hasGraphBeenDisplayed" flex-1>
<ViewModuleGraph v-show="viewMode === 'graph'" :graph="graph" data-testid="graph" />
<div v-show="viewMode === 'graph'" flex-1>
<ViewModuleGraph :graph="graph" data-testid="graph" />
</div>
<ViewEditor v-if="viewMode === 'editor'" :key="current.filepath" :file="current" data-testid="editor" @draft="onDraft" />
<ViewConsoleOutput v-else-if="viewMode === 'console'" :file="current" data-testid="console" />
Expand Down

0 comments on commit 3b5f96b

Please sign in to comment.