Skip to content

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

feat: improve issue detail page UI for better readability (#17256)

Danny Xu7b53c0821084
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index 3e7046491b..d8ec9cbd25 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -4,7 +4,7 @@
<BBSpin />
</div>
<template v-else>
- <div class="border-b">
+ <div class="border-b bg-white">
<BannerSection v-if="!isCreating" />
<FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
@@ -12,7 +12,7 @@
</div>
<div class="flex-1 flex flex-row">
<div
- class="flex-1 flex flex-col hide-scrollbar divide-y overflow-x-hidden"
+ class="flex-1 flex flex-col hide-scrollbar divide-y divide-gray-200 overflow-x-hidden bg-white"
>
<StageSection />
@@ -32,7 +32,7 @@
<div
v-if="sidebarMode == 'DESKTOP'"
- class="hide-scrollbar border-l"
+ class="hide-scrollbar border-l border-gray-200 bg-gray-50"
:style="{
width: `${desktopSidebarWidth}px`,
}"
diff --git a/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue b/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue
index efd625b8a7..7c30769e6f 100644
--- a/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue
+++ b/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue
@@ -1,7 +1,7 @@
<template>
- <div class="px-4 py-2 flex flex-col gap-y-2">
+ <div class="px-6 py-5 flex flex-col gap-y-4">
<div class="flex items-center justify-between">
- <span class="textlabel">
+ <span class="text-base font-semibold text-gray-900">
{{ title }}
</span>
@@ -32,7 +32,7 @@
</div>
</div>
- <div class="text-sm">
+ <div class="">
<NInput
v-if="isCreating || state.isEditing"
ref="inputRef"
@@ -51,7 +51,7 @@
/>
<div
v-else
- class="min-h-[3rem] max-h-[12rem] whitespace-pre-wrap px-[10px] py-[4.5px] text-sm"
+ class="min-h-[3rem] max-h-[16rem] whitespace-pre-wrap px-4 py-3 text-sm bg-white rounded-lg border border-gray-200 overflow-y-auto"
>
<template v-if="issue.description">
<iframe
@@ -61,7 +61,7 @@
class="rounded-md w-full overflow-hidden"
/>
</template>
- <span v-else class="text-control-placeholder">
+ <span v-else class="text-gray-400">
{{ $t("issue.add-some-description") }}
</span>
</div>
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue
index e7ea8a0855..d0770a73cc 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue
@@ -1,7 +1,7 @@
<template>
<div
- class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-2 py-2"
- :class="sidebarMode === 'MOBILE' ? 'pl-4 pr-2' : 'px-4'"
+ class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3 py-4"
+ :class="sidebarMode === 'MOBILE' ? 'pl-6 pr-4' : 'px-6'"
>
<div class="flex-1 flex items-center gap-x-2">
<IssueStatusIcon
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue
index 36d22a3d88..fa1435038f 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue
@@ -13,28 +13,20 @@
:similar="item.similar"
>
<template v-if="allowEditIssueComment(item.comment)" #subject-suffix>
- <div
- class="invisible group-hover:visible space-x-2 flex items-center text-control-light"
+ <!-- Edit Comment Button-->
+ <NButton
+ v-if="!state.editCommentMode"
+ quaternary
+ size="tiny"
+ class="text-gray-500 hover:text-gray-700"
+ @click.prevent="onUpdateComment(item.comment)"
>
- <div
- v-if="!state.editCommentMode"
- class="mr-2 flex items-center space-x-2"
- >
- <!-- Edit Comment Button-->
- <NButton
- quaternary
- size="tiny"
- @click.prevent="onUpdateComment(item.comment)"
- >
- <PencilIcon class="w-4 h-4 text-control-light" />
- </NButton>
- </div>
- </div>
+ <PencilIcon class="w-3.5 h-3.5" />
+ </NButton>
</template>
- <template #comment>
+ <template v-if="item.comment.comment" #comment>
<MarkdownEditor
- v-if="item.comment.comment"
:mode="
state.editCommentMode &&
state.activeComment?.name === item.comment.name
@@ -69,21 +61,12 @@
</IssueCommentView>
</ul>
- <div v-if="!state.editCommentMode && allowCreateComment">
- <div class="flex">
- <div class="flex-shrink-0">
- <div class="relative">
- <UserAvatar :user="currentUser" />
- <span
- class="absolute -bottom-0.5 -right-1 bg-white rounded-tl px-0.5 py-px"
- >
- <heroicons-solid:chat-alt
- class="h-3.5 w-3.5 text-control-light"
- />
- </span>
- </div>
+ <div v-if="!state.editCommentMode && allowCreateComment" class="mt-2">
+ <div class="flex gap-3">
+ <div class="flex-shrink-0 pt-1">
+ <UserAvatar :user="currentUser" />
</div>
- <div class="ml-3 min-w-0 flex-1">
+ <div class="min-w-0 flex-1">
<h3 class="sr-only" id="issue-comment-editor"></h3>
<label for="comment" class="sr-only">
{{ $t("issue.add-a-comment") }}
@@ -96,8 +79,9 @@
@change="(val: string) => (state.newComment = val)"
@submit="doCreateComment(state.newComment)"
/>
- <div class="my-3 flex items-center justify-between">
+ <div class="mt-3 flex items-center justify-start">
<NButton
+ type="primary"
size="small"
:disabled="state.newComment.length == 0"
@click.prevent="doCreateComment(state.newComment)"
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentSection.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentSection.vue
index e30ef4ae36..131658fbc9 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentSection.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentSection.vue
@@ -1,7 +1,7 @@
<template>
- <div class="px-4 py-2 flex flex-col gap-y-4">
+ <div class="px-6 py-5 flex flex-col gap-y-5">
<div class="flex items-center justify-between">
- <span class="textlabel">
+ <span class="text-base font-semibold text-gray-900">
{{ $t("common.activity") }}
</span>
</div>
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionCreator.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionCreator.vue
index a87d621ce8..ab6d02107a 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionCreator.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionCreator.vue
@@ -3,7 +3,7 @@
:is="'router-link'"
v-if="userEmail !== userStore.systemBotUser?.email"
v-bind="bindings"
- class="font-medium text-main whitespace-nowrap hover:underline"
+ class="font-semibold text-gray-900 whitespace-nowrap hover:underline"
>
{{ user?.title }}
</component>
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue
index 15c8986492..d87a0a2dc1 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue
@@ -1,71 +1,69 @@
<template>
<div class="ml-3 min-w-0 flex-1">
- <h3
- class="sr-only"
- :id="`${issueCommentNamePrefix}${getProjectIdIssueIdIssueCommentId(issueComment.name).issueCommentId}`"
- ></h3>
- <div class="min-w-0 flex-1 pt-1 flex justify-between">
- <div class="text-sm text-control-light space-x-1">
- <ActionCreator
- v-if="
- extractUserId(issueComment.creator) !==
- userStore.systemBotUser?.email ||
- getIssueCommentType(issueComment) === IssueCommentType.USER_COMMENT
- "
- :creator="issueComment.creator"
- />
+ <div class="rounded-lg border border-gray-200 bg-white overflow-hidden">
+ <div class="px-4 py-2.5 bg-gray-50">
+ <div class="flex items-center justify-between">
+ <div class="flex items-center gap-x-2 text-sm min-w-0 flex-wrap">
+ <ActionCreator
+ v-if="
+ extractUserId(issueComment.creator) !==
+ userStore.systemBotUser?.email ||
+ getIssueCommentType(issueComment) ===
+ IssueCommentType.USER_COMMENT
+ "
+ :creator="issueComment.creator"
+ />
- <ActionSentence :issue="issue" :issue-comment="issueComment" />
+ <ActionSentence
+ :issue="issue"
+ :issue-comment="issueComment"
+ class="text-gray-600 break-words min-w-0"
+ />
- <HumanizeTs
- :ts="getTimeForPbTimestampProtoEs(issueComment.createTime, 0) / 1000"
- class="ml-1 text-gray-400"
- />
+ <HumanizeTs
+ :ts="
+ getTimeForPbTimestampProtoEs(issueComment.createTime, 0) / 1000
+ "
+ class="text-gray-500"
+ />
- <span
- v-if="
- getTimeForPbTimestampProtoEs(issueComment.createTime) !==
- getTimeForPbTimestampProtoEs(issueComment.updateTime) &&
- getIssueCommentType(issueComment) === IssueCommentType.USER_COMMENT
- "
- >
- <span class="opacity-80">({{ $t("common.edited") }}</span>
- <HumanizeTs
- :ts="
- getTimeForPbTimestampProtoEs(issueComment.updateTime, 0) / 1000
- "
- class="ml-1"
- />)
- </span>
+ <span
+ v-if="
+ getTimeForPbTimestampProtoEs(issueComment.createTime) !==
+ getTimeForPbTimestampProtoEs(issueComment.updateTime) &&
+ getIssueCommentType(issueComment) ===
+ IssueCommentType.USER_COMMENT
+ "
+ class="text-gray-500 text-xs"
+ >
+ ({{ $t("common.edited") }})
+ </span>
- <span
- v-if="similar.length > 0"
- class="text-sm font-normal text-gray-400 ml-1"
- >
- {{
- $t("activity.n-similar-activities", {
- count: similar.length + 1,
- })
- }}
- </span>
- </div>
+ <span v-if="similar.length > 0" class="text-xs text-gray-500">
+ {{
+ $t("activity.n-similar-activities", {
+ count: similar.length + 1,
+ })
+ }}
+ </span>
+ </div>
- <slot name="subject-suffix"></slot>
- </div>
- <div class="mt-2 text-sm text-control whitespace-pre-wrap">
- <slot name="comment" />
+ <slot name="subject-suffix"></slot>
+ </div>
+ </div>
+ <div
+ v-if="$slots.comment"
+ class="px-4 py-3 border-t border-gray-200 text-sm text-gray-700 whitespace-pre-wrap break-words"
+ >
+ <slot name="comment" />
+ </div>
</div>
</div>
</template>
<script lang="ts" setup>
import HumanizeTs from "@/components/misc/HumanizeTs.vue";
-import {
- getProjectIdIssueIdIssueCommentId,
- issueCommentNamePrefix,
- IssueCommentType,
- getIssueCommentType,
-} from "@/store";
+import { IssueCommentType, getIssueCommentType } from "@/store";
import { useUserStore, extractUserId } from "@/store";
import { getTimeForPbTimestampProtoEs, type ComposedIssue } from "@/types";
import type { IssueComment } from "@/types/proto-es/v1/issue_service_pb";
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentView.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentView.vue
index a24ff7ed93..27fcc08418 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentView.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentView.vue
@@ -3,7 +3,7 @@
<div :id="`#${issueComment.name}`" class="relative pb-4">
<span
v-if="!isLast"
- class="absolute left-4 -ml-px h-full w-0.5 bg-block-border"
+ class="absolute left-4 -ml-px h-full w-0.5 bg-gray-200"
aria-hidden="true"
></span>
<div class="relative flex items-start">
@@ -15,12 +15,8 @@
:issue-comment="issueComment"
:similar="similar"
>
- <template #subject-suffix>
- <slot name="subject-suffix" />
- </template>
-
- <template #comment>
- <slot name="comment" />
+ <template v-for="(_, name) in $slots" :key="name" #[name]>
+ <slot :name="name" />
</template>
</IssueCommentAction>
</div>
diff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
index dd61bb0be7..777ce59f07 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue
@@ -1,5 +1,5 @@
<template>
- <div class="flex flex-col gap-y-3 py-2 px-3">
+ <div class="flex flex-col gap-y-4 py-4 px-4">
<ReleaseInfo />
<TaskCheckSummarySection />
@@ -14,7 +14,9 @@
"
/>
<div v-else class="flex flex-col gap-y-1">
- <div class="textlabel flex items-center gap-x-1">
+ <div
+ class="text-sm font-semibold text-gray-700 flex items-center gap-x-1"
+ >
{{ $t("issue.approval-flow.self") }}
<FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
</div>
@@ -36,10 +38,10 @@
"
class="space-y-2"
>
- <div class="border-t -mx-3" />
+ <div class="border-t border-gray-200 -mx-4" />
<NTooltip v-if="selectedSpec" :showArrow="false">
<template #trigger>
- <p class="textinfolabel">
+ <p class="text-sm font-medium text-gray-600">
{{ $t("plan.options.self") }}
<span class="opacity-80">
({{
diff --git a/frontend/src/components/MarkdownEditor/MarkdownEditor.vue b/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
index 18935ac46b..7049dd7ca2 100644
--- a/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
+++ b/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
@@ -1,10 +1,15 @@
<template>
<div>
- <div v-if="mode === 'editor'" class="flex gap-x-2 mb-2 text-sm">
+ <div
+ v-if="mode === 'editor'"
+ class="flex gap-x-1 mb-3 text-sm border-b border-gray-200"
+ >
<div
:class="[
- 'px-2 py-1 rounded cursor-pointer text-gray-700',
- state.showPreview ? 'opacity-80' : 'bg-gray-100',
+ 'px-3 py-2 cursor-pointer font-medium transition-colors',
+ state.showPreview
+ ? 'text-gray-500 hover:text-gray-700'
+ : 'text-gray-900 border-b-2 border-gray-900',
]"
@click="state.showPreview = false"
>
@@ -12,8 +17,10 @@
</div>
<div
:class="[
- 'px-2 py-1 rounded cursor-pointer text-gray-700',
- state.showPreview ? 'bg-gray-100' : 'opacity-80',
+ 'px-3 py-2 cursor-pointer font-medium transition-colors',
+ state.showPreview
+ ? 'text-gray-900 border-b-2 border-gray-900'
+ : 'text-gray-500 hover:text-gray-700',
]"
@click="state.showPreview = true"
>
@@ -47,8 +54,8 @@
<textarea
ref="contentTextArea"
v-model="state.content"
- rows="3"
- class="textarea block w-full resize-none whitespace-pre-wrap rounded"
+ rows="4"
+ class="block w-full px-4 py-3 resize-none whitespace-pre-wrap rounded-lg border border-gray-300 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 focus:outline-none transition-colors text-sm"
:placeholder="$t('issue.leave-a-comment')"
@mousedown="clearIssuePanel"
@input="(e: any) => sizeToFit(e.target)"