Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): replace navigation tree with test explorer #5907

Merged
merged 30 commits into from
Jun 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
076dda0
feat(ui): replace navigation tree with test explorer
userquin Jun 17, 2024
7838079
Merge branch 'refs/heads/main' into userquin/feat-add-new-test-explor…
userquin Jun 17, 2024
2f243bf
chore: remove optimization
userquin Jun 17, 2024
099a504
chore: fix lint
userquin Jun 17, 2024
b0a8491
fix: missing expand/collapse icon
userquin Jun 17, 2024
cb89c2e
Merge branch 'refs/heads/main' into userquin/feat-add-new-test-explor…
userquin Jun 17, 2024
74cb684
chore: update lock file
userquin Jun 17, 2024
722d734
chore: reduce filter font size
userquin Jun 17, 2024
eecf0ab
Merge branch 'main' into userquin/feat-add-new-test-explorer-ui
userquin Jun 18, 2024
3ad2ad4
chore: update logic for typecheck iin meta
userquin Jun 18, 2024
5b34b6b
chore: add vertical lines to the explorer
userquin Jun 18, 2024
9fc998b
chore: remove bold type from filter title
userquin Jun 18, 2024
ed60c55
chore: center vertical lines with chevron icon
userquin Jun 18, 2024
a361730
chore: simplify explorer logic
userquin Jun 18, 2024
8d996b6
chore: fix lint
userquin Jun 18, 2024
d76ead5
chore: refactor logic to resume collect on task update
userquin Jun 19, 2024
14af322
chore: collect tasks on the initial load
userquin Jun 19, 2024
41224f2
fix: wrong logic when expanding/collapsing nodes
userquin Jun 19, 2024
37af7a9
Merge branch 'refs/heads/main' into userquin/feat-add-new-test-explor…
userquin Jun 19, 2024
d03a87c
chore: add ui tests for filter
userquin Jun 19, 2024
2860209
chore: update ui tests for filter
userquin Jun 19, 2024
dc1c4dd
chore: update restore opened tasks logic
userquin Jun 19, 2024
d937709
Merge branch 'refs/heads/main' into userquin/feat-add-new-test-explor…
userquin Jun 19, 2024
a32daaa
chore: update jsdocs and hints + cleanup
userquin Jun 19, 2024
5c441d9
chore: optimize collect logic to traverse only files with pending `Ta…
userquin Jun 20, 2024
a7a80a1
chore: collect all on end run
userquin Jun 20, 2024
28caf7a
chore: update buffer and refresh interval
userquin Jun 20, 2024
9beb9c2
chore: remove setting update interval, (some entries not being refres…
userquin Jun 20, 2024
918b5cc
chore: add search syntax highlighting
userquin Jun 20, 2024
e91a0a7
chore: hide all tooltips when scrolling
userquin Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: center vertical lines with chevron icon
  • Loading branch information
userquin committed Jun 18, 2024
commit ed60c55ce3fb8aab351316eff8ae234b5d9dd0e6
20 changes: 8 additions & 12 deletions packages/ui/client/components/explorer/ExplorerItem.vue
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ const {
}>()

const task = computed(() => {
console.log(taskId)
return client.state.idMap.get(taskId)
})

@@ -84,20 +85,15 @@ const gridStyles = computed(() => {
if (type === 'suite' && typecheck) {
gridColumns.push('min-content')
}

// text content
gridColumns.push('minmax(0, 1fr)')
// buttons
if (type === 'file') {
gridColumns.push('min-content')
}

if (entries.length === 0) {
return `grid-template-columns: ${gridColumns.join(' ')};`
}

return `padding-left: 1.2rem; grid-template-columns: ${
entries.map((_, idx) => idx === 0 ? '1px' : '1.25rem').join(' ')
// all the vertical lines with width 1rem and mx-2: always centered
return `grid-template-columns: ${
entries.map(() => '1rem').join(' ')
} ${gridColumns.join(' ')};`
})
</script>
@@ -107,7 +103,7 @@ const gridStyles = computed(() => {
v-if="task"
items-center
p="x-2 y-1"
grid="~ rows-1 items-center"
grid="~ rows-1 items-center gap-x-2"
w-full
h-28px
border-rounded
@@ -120,12 +116,12 @@ const gridStyles = computed(() => {
@click="toggleOpen()"
>
<template v-if="indent > 0">
<div v-for="i in data" :key="i" border="solid border-v-line" class="vertical-line" h-28px inline-flex m-0 />
<div v-for="i in data" :key="i" border="solid gray-500 dark:gray-400" class="vertical-line" h-28px inline-flex mx-2 op20 />
</template>
<div v-if="type === 'file' || type === 'suite'" :class="{ 'pr-1': type === 'file', 'pl-2': type === 'suite' }">
<div v-if="type === 'file' || type === 'suite'" w-4>
<div :class="opened ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right op20'" op20 />
</div>
<StatusIcon :task="task" mr-2 :class="{ 'ml-2': type !== 'suite' && indent > 0, 'ml-1': type === 'suite' && indent > 0 }" />
<StatusIcon :task="task" w-4 />
<div v-if="type === 'suite' && typecheck" class="i-logos:typescript-icon" flex-shrink-0 mr-2 />
<div flex items-end gap-2 :text="state === 'fail' ? 'red-500' : ''" overflow-hidden>
<span text-sm truncate font-light>
1 change: 0 additions & 1 deletion packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -42,7 +42,6 @@ export const config: UserConfig = {
'bg-active': 'bg-gray-500:8',
'bg-hover': 'bg-gray-500:20',
'border-base': 'border-gray-500:10',
'border-v-line': 'border-gray-500:20',
'focus-base': 'border-gray-500 dark:border-gray-400',

'tab-button': 'font-light op50 hover:op80 h-full px-4',