Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: stage card display improvement (#10507)

Liu Jib0e65c433966
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
index 6b143d76ac..40f7ce58ad 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
@@ -8,7 +8,9 @@
/>
<div class="text" @click="handleClickStage">
- <div class="text-sm min-w-32 lg:min-w-fit with-underline space-x-1">
+ <div
+ class="text-sm min-w-32 lg:min-w-fit with-underline space-x-1 whitespace-nowrap"
+ >
<heroicons:arrow-small-right
v-if="isActiveStage"
class="w-5 h-5 inline-block mb-0.5"
@@ -18,8 +20,8 @@
<span>{{ stageTitle }}</span>
</div>
<div class="text-xs flex gap-1 flex-row items-center">
- <div class="whitespace-pre-wrap break-all with-underline">
- {{ taskTitle }}
+ <div class="whitespace-no-wrap with-underline">
+ {{ $t("common.tasks") }}
</div>
<StageSummary :stage="(stage as Stage)" />
</div>
@@ -73,7 +75,7 @@ import {
planCheckRunSummaryForCheckRunList,
useIssueContext,
} from "@/components/IssueV1/logic";
-import { EMPTY_TASK_NAME, emptyTask } from "@/types";
+import { EMPTY_TASK_NAME } from "@/types";
import {
PlanCheckRun_Result_Status,
Stage,
@@ -143,11 +145,6 @@ const stageTitle = computed(() => {
: stage.title;
});
-const taskTitle = computed(() => {
- const task = isCreating ? first(props.stage.tasks) : activeTaskInStage.value;
- return (task ?? emptyTask()).title;
-});
-
const planCheckStatus = computed((): PlanCheckRun_Result_Status => {
if (isCreating.value) return PlanCheckRun_Result_Status.UNRECOGNIZED;
const planCheckList = uniqBy(
@@ -195,9 +192,6 @@ const handleClickStage = () => {
@apply cursor-default flex items-center justify-start w-full text-sm font-medium relative;
@apply lg:flex-1;
}
-.stage.invalid {
- @apply pr-10;
-}
.stage.selected .text .with-underline {
@apply underline;
}
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
index 21e1ea08a4..6e3626ee63 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
@@ -1,29 +1,41 @@
<template>
<div class="w-full flex flex-col divide-y">
<template v-if="stageList.length > 0">
- <div class="flex flex-col lg:flex-row justify-between px-4">
- <template v-for="(stage, index) in stageList" :key="stage.uid">
- <StageCard :stage="stage" :index="index" class="h-[54px]" />
- <div
- v-if="index < stageList.length - 1"
- class="hidden lg:block w-3.5 h-[54px] mr-2 pointer-events-none shrink-0"
- aria-hidden="true"
- >
- <svg
- class="h-full w-full text-gray-300"
- viewBox="0 0 22 80"
- fill="none"
- preserveAspectRatio="none"
- >
- <path
- d="M0 -2L20 40L0 82"
- vector-effect="non-scaling-stroke"
- stroke="currentcolor"
- stroke-linejoin="round"
+ <div class="px-0">
+ <NScrollbar :x-scrollable="true">
+ <div class="flex flex-col lg:flex-row justify-between">
+ <template v-for="(stage, index) in stageList" :key="stage.uid">
+ <StageCard
+ :stage="stage"
+ :index="index"
+ class="h-[54px]"
+ :class="[
+ index === 0 && 'pl-4',
+ index === stageList.length - 1 && 'pr-4',
+ ]"
/>
- </svg>
+ <div
+ v-if="index < stageList.length - 1"
+ class="hidden lg:block w-3.5 h-[54px] mr-2 pointer-events-none shrink-0"
+ aria-hidden="true"
+ >
+ <svg
+ class="h-full w-full text-gray-300"
+ viewBox="0 0 22 80"
+ fill="none"
+ preserveAspectRatio="none"
+ >
+ <path
+ d="M0 -2L20 40L0 82"
+ vector-effect="non-scaling-stroke"
+ stroke="currentcolor"
+ stroke-linejoin="round"
+ />
+ </svg>
+ </div>
+ </template>
</div>
- </template>
+ </NScrollbar>
</div>
<StageInfo class="px-4 py-2" />
@@ -39,6 +51,7 @@
</template>
<script lang="ts" setup>
+import { NScrollbar } from "naive-ui";
import { computed } from "vue";
import { useIssueContext } from "@/components/IssueV1/logic";
import NoDataPlaceholder from "@/components/misc/NoDataPlaceholder.vue";