Skip to content

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

chore: optimize issue table UX (#6752)

Tianzhou (天舟)c91321eb5256
diff --git a/frontend/src/components/Issue/table/IssueTable.vue b/frontend/src/components/Issue/table/IssueTable.vue
index c07e4ec737..59df4f7b97 100644
--- a/frontend/src/components/Issue/table/IssueTable.vue
+++ b/frontend/src/components/Issue/table/IssueTable.vue
@@ -53,12 +53,14 @@
:task-status="issueTaskStatus(issue)"
/>
</BBTableCell>
- <BBTableCell v-if="mode == 'ALL'" class="table-cell text-gray-500 w-12">
- <span>{{ issue.project.key }}</span>
- </BBTableCell>
<BBTableCell class="table-cell">
<div class="flex items-center">
- <div class="mr-2 text-control">#{{ issue.id }}</div>
+ <div class="whitespace-nowrap mr-2 text-control">
+ <template v-if="mode == 'ALL'">
+ {{ issue.project.key }}-{{ issue.id }}
+ </template>
+ <template v-else> #{{ issue.id }} </template>
+ </div>
<div
class="truncate"
:class="{
@@ -171,69 +173,35 @@ import { CurrentApprover } from "../review";
type Mode = "ALL" | "PROJECT";
-const columnListMap: Map<Mode, BBTableColumn[]> = new Map([
- [
- "ALL",
- [
- {
- title: "issue.table.status",
- },
- {
- title: "issue.table.project",
- },
- {
- title: "issue.table.name",
- },
- {
- title: "issue.table.environment",
- },
- {
- title: "issue.table.progress",
- },
- {
- title: "issue.table.updated",
- },
- {
- title: "issue.table.approver",
- },
- {
- title: "issue.table.assignee",
- },
- {
- title: "issue.table.creator",
- },
- ],
- ],
- [
- "PROJECT",
- [
- {
- title: "issue.table.status",
- },
- {
- title: "issue.table.name",
- },
- {
- title: "issue.table.environment",
- },
- {
- title: "issue.table.progress",
- },
- {
- title: "issue.table.updated",
- },
- {
- title: "issue.table.approver",
- },
- {
- title: "issue.table.assignee",
- },
- {
- title: "issue.table.creator",
- },
- ],
- ],
-]);
+const columnList: BBTableColumn[] = [
+ {
+ title: "",
+ },
+ {
+ title: "",
+ },
+ {
+ title: "issue.table.name",
+ },
+ {
+ title: "issue.table.environment",
+ },
+ {
+ title: "issue.table.progress",
+ },
+ {
+ title: "issue.table.updated",
+ },
+ {
+ title: "issue.table.approver",
+ },
+ {
+ title: "issue.table.assignee",
+ },
+ {
+ title: "issue.table.creator",
+ },
+];
interface LocalState {
dataSource: any[];
@@ -281,10 +249,6 @@ const currentUserV1 = useCurrentUserV1();
const tableRef = ref<HTMLTableElement>();
const isTableInViewport = useElementVisibilityInScrollParent(tableRef);
-const columnList = computed((): BBTableColumn[] => {
- return [{ title: "" }, ...columnListMap.get(props.mode)!];
-});
-
const issueSectionList = computed((): BBTableSectionDataSource<Issue>[] => {
return [
{
diff --git a/frontend/src/components/ProjectOverviewPanel.vue b/frontend/src/components/ProjectOverviewPanel.vue
index 30e1276cea..3f12cdeeac 100644
--- a/frontend/src/components/ProjectOverviewPanel.vue
+++ b/frontend/src/components/ProjectOverviewPanel.vue
@@ -54,6 +54,7 @@
>
<template #table="{ issueList, loading }">
<IssueTable
+ :mode="'PROJECT'"
:show-placeholder="!loading"
:title="$t('issue.waiting-approval')"
:issue-list="issueList"