Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(frontend): re-structure issue detail page (#10084)
Liu Ji2d5076daeca0
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vueindex c8c659cf28..ff2a616351 100644--- a/frontend/src/components/IssueV1/IssueDetailPage.vue+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue@@ -1,51 +1,73 @@<template>- <div>- <div class="issue-debug">phase: {{ phase }}</div>-- <BannerSection v-if="!isCreating" />-- <HeaderSection class="!border-t-0" />-- <div class="w-full border-t mt-4" />-- <StageSection />-- <div class="w-full mt-4" />-- <TaskListSection />-- <TaskRunSection v-if="!isCreating" />-- <div class="w-full border-t my-4" />-- <SQLCheckSection v-if="isCreating" />- <PlanCheckSection v-if="!isCreating" />-- <StatementSection />-- <div class="w-full border-t my-4" />-- <DescriptionSection />-- <div class="w-full border-t my-4" />-- <ActivitySection v-if="!isCreating" />-- <IssueReviewActionPanel- :action="ongoingIssueReviewAction?.action"- @close="ongoingIssueReviewAction = undefined"- />- <IssueStatusActionPanel- :action="ongoingIssueStatusAction?.action"- @close="ongoingIssueStatusAction = undefined"- />- <TaskRolloutActionPanel- :action="ongoingTaskRolloutAction?.action"- :task-list="ongoingTaskRolloutAction?.taskList ?? []"- @close="ongoingTaskRolloutAction = undefined"- />+ <div ref="containerRef" class="h-full flex flex-col">+ <div class="border-b">+ <div class="issue-debug">phase: {{ phase }}</div>+ <BannerSection v-if="!isCreating" />++ <HeaderSection />+ </div>+ <div class="flex-1 flex flex-row">+ <div+ class="flex-1 flex flex-col hide-scrollbar divide-y overflow-x-hidden"+ >+ <StageSection />++ <TaskListSection />++ <TaskRunSection v-if="!isCreating" />++ <SQLCheckSection v-if="isCreating" />+ <PlanCheckSection v-if="!isCreating" />++ <StatementSection />++ <DescriptionSection />++ <ActivitySection v-if="!isCreating" />+ </div>++ <div+ v-if="sidebarMode == 'DESKTOP'"+ class="hide-scrollbar border-l"+ :style="{+ width: `${desktopSidebarWidth}px`,+ }"+ >+ <Sidebar />+ </div>+ </div></div>+ <template v-if="sidebarMode === 'MOBILE'">+ <!-- mobile sidebar -->+ <Drawer :show="mobileSidebarOpen" @close="mobileSidebarOpen = false">+ <div+ style="+ min-width: 240px;+ width: 80vw;+ max-width: 320px;+ padding: 0.5rem 0;+ "+ >+ <Sidebar v-if="sidebarMode === 'MOBILE'" />+ </div>+ </Drawer>+ </template>++ <IssueReviewActionPanel+ :action="ongoingIssueReviewAction?.action"+ @close="ongoingIssueReviewAction = undefined"+ />+ <IssueStatusActionPanel+ :action="ongoingIssueStatusAction?.action"+ @close="ongoingIssueStatusAction = undefined"+ />+ <TaskRolloutActionPanel+ :action="ongoingTaskRolloutAction?.action"+ :task-list="ongoingTaskRolloutAction?.taskList ?? []"+ @close="ongoingTaskRolloutAction = undefined"+ />+<div class="issue-debug"><pre class="text-xs">{{ JSON.stringify(issue, null, " ") }}</pre></div>@@ -55,6 +77,7 @@import { ref } from "vue";import { Task } from "@/types/proto/v1/rollout_service";import { provideSQLCheckContext } from "../SQLCheck";+import { Drawer } from "../v2";import {BannerSection,HeaderSection,@@ -65,6 +88,7 @@ import {StatementSection,DescriptionSection,ActivitySection,+ Sidebar,IssueReviewActionPanel,IssueStatusActionPanel,TaskRolloutActionPanel,@@ -73,10 +97,12 @@ import {IssueReviewAction,IssueStatusAction,TaskRolloutAction,+ provideIssueSidebarContext,useIssueContext,usePollIssue,} from "./logic";+const containerRef = ref<HTMLElement>();const { isCreating, phase, issue, events } = useIssueContext();const ongoingIssueReviewAction = ref<{@@ -112,4 +138,10 @@ events.on("perform-task-rollout-action", async ({ action, tasks }) => {});provideSQLCheckContext();++const {+ mode: sidebarMode,+ desktopSidebarWidth,+ mobileSidebarOpen,+} = provideIssueSidebarContext(containerRef);</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vuedeleted file mode 100644index 06ebfc18d4..0000000000--- a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vue+++ /dev/null@@ -1,148 +0,0 @@-<template>- <NTooltip v-if="showNotifyAssignee">- <template #trigger>- <button- class="p-0.5 rounded"- :class="[- isAssigneeAttentionOn- ? 'cursor-default'- : 'cursor-pointer hover:bg-control-bg-hover',- ]"- :disabled="isUpdating"- v-bind="$attrs"- @click="notifyAssignee"- >- <BBSpin v-if="isUpdating" class="!w-4 !h-4" />- <heroicons-outline:bell-alert- v-else- class="w-4 h-4"- :class="[isAssigneeAttentionOn ? 'text-accent' : 'text-main']"- />- </button>- </template>-- <span class="whitespace-nowrap">- <template v-if="isAssigneeAttentionOn">- {{ $t("issue.assignee-attention.needs-attention") }}- </template>- <template v-else>- {{ $t("issue.assignee-attention.click-to-mark") }}- </template>- </span>- </NTooltip>-</template>--<script lang="ts" setup>-import { NTooltip } from "naive-ui";-import { computed, ref } from "vue";-import { useI18n } from "vue-i18n";-import { useIssueContext } from "@/components/IssueV1/logic";-import { issueServiceClient } from "@/grpcweb";-import {- useSettingV1Store,- useCurrentUserV1,- useUserStore,- pushNotification,-} from "@/store";-import { Issue, IssueStatus } from "@/types/proto/v1/issue_service";-import { Workflow } from "@/types/proto/v1/project_service";-import { AppIMSetting_IMType } from "@/types/proto/v1/setting_service";-import { extractUserResourceName } from "@/utils";--const { t } = useI18n();-const currentUserV1 = useCurrentUserV1();-const settingV1Store = useSettingV1Store();-const { isCreating, issue } = useIssueContext();-const project = computed(() => issue.value.projectEntity);-const isUpdating = ref(false);--const showNotifyAssignee = computed(() => {- if (isCreating.value) {- return false;- }- if (project.value.workflow === Workflow.VCS) {- return false;- }-- if (issue.value.status !== IssueStatus.OPEN) {- return false;- }-- if (- issue.value.assigneeAttention &&- currentUserV1.value.email === extractUserResourceName(issue.value.assignee)- ) {- // Also show the icon for assignee if need attention.- return true;- }-- return (- currentUserV1.value.email === extractUserResourceName(issue.value.creator)- );-});--const isAssigneeAttentionOn = computed(() => {- return issue.value.assigneeAttention;-});--const externalApprovalSetting = computed(- (): { enabled: boolean; type: string } => {- const setting = settingV1Store.getSettingByName("bb.app.im");- if (- setting?.value?.appImSettingValue?.imType === AppIMSetting_IMType.FEISHU- ) {- return {- type: "feishu",- enabled:- setting?.value?.appImSettingValue.externalApproval?.enabled ?? false,- };- }- return {- enabled: false,- type: "",- };- }-);--const imTypeName = computed((): string => {- const { enabled, type } = externalApprovalSetting.value;- if (!enabled) return t("common.im");- return t(`common.${type}`);-});--const notifyAssignee = async () => {- if (!showNotifyAssignee.value) return;- if (isAssigneeAttentionOn.value) return;-- try {- isUpdating.value = true;- const issuePatch = Issue.fromJSON({- ...issue.value,- assigneeAttention: true,- });- const updated = await issueServiceClient.updateIssue({- issue: issuePatch,- updateMask: ["assignee_attention"],- });- Object.assign(issue.value, updated);-- const email = extractUserResourceName(issue.value.assignee);- const assignee = useUserStore().getUserByEmail(email);- const message = externalApprovalSetting.value.enabled- ? t("issue.assignee-attention.send-approval-request-successfully", {- im: imTypeName.value,- })- : t("issue.assignee-attention.send-attention-request-successfully", {- principal: assignee ? assignee.title : email,- });-- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: message,- });- } finally {- isUpdating.value = false;- }-};-</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vueindex 3e96e64ffc..62d8fd589e 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue@@ -1,55 +1,47 @@<template>- <div class="flex flex-col py-2">- <div- class="flex flex-col md:flex-row md:items-start md:justify-between gap-2 px-4"- >- <div class="flex-1 flex items-center gap-x-2">- <div v-if="!isCreating">- <IssueStatusIcon- :issue-status="issue.status"- :task-status="issueTaskStatus"- :issue="issue"- />- </div>-- <Title />- </div>-- <Actions />+ <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'"+ >+ <div class="flex-1 flex items-center gap-x-2">+ <IssueStatusIcon+ v-if="!isCreating"+ :issue-status="issue.status"+ :task-status="issueTaskStatus"+ :issue="issue"+ />++ <Title /></div>- <div- class="w-full flex flex-col border-t mt-2 pt-6 md:flex-row md:items-stretch md:justify-between gap-2 px-4"- >- <div class="flex-1 flex flex-col gap-x-2">- <VCSInfo />- <RollbackFromTips />- </div>+ <div class="flex flex-row items-center justify-end">+ <Actions />- <div class="flex flex-col items-end gap-y-2">- <ReviewSection v-if="!isCreating" />- <Assignee v-if="shouldShowAssignee" />- </div>+ <NButton+ v-if="sidebarMode === 'MOBILE'"+ :quaternary="true"+ size="medium"+ style="--n-padding: 0 4px"+ @click="mobileSidebarOpen = true"+ >+ <MenuIcon class="w-6 h-6" />+ </NButton></div></div></template><script lang="ts" setup>+import { MenuIcon } from "lucide-vue-next";+import { NButton } from "naive-ui";import { computed } from "vue";-import { usePageMode } from "@/store";import { Task_Status } from "@/types/proto/v1/rollout_service";import { activeTaskInRollout, isDatabaseRelatedIssue } from "@/utils";-import { useIssueContext } from "../../logic";+import { useIssueContext, useIssueSidebarContext } from "../../logic";import IssueStatusIcon from "../IssueStatusIcon.vue";import Actions from "./Actions";-import Assignee from "./Assignee";-import ReviewSection from "./ReviewSection";-import RollbackFromTips from "./RollbackFromTips.vue";import Title from "./Title.vue";-import VCSInfo from "./VCSInfo.vue";const { isCreating, issue } = useIssueContext();-const pageMode = usePageMode();const issueTaskStatus = computed(() => {// For grant request issue, we always show the status as "NOT_STARTED" as task status.@@ -60,7 +52,5 @@ const issueTaskStatus = computed(() => {return activeTaskInRollout(issue.value.rolloutEntity).status;});-const shouldShowAssignee = computed(() => {- return pageMode.value === "BUNDLED" && isDatabaseRelatedIssue(issue.value);-});+const { mode: sidebarMode, mobileSidebarOpen } = useIssueSidebarContext();</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Timeline.vue b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Timeline.vuedeleted file mode 100644index bb2dffacf7..0000000000--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Timeline.vue+++ /dev/null@@ -1,107 +0,0 @@-<template>- <NTimeline- :horizontal="true"- :icon-size="28"- class="bb-approval-timeline-horizontal"- >- <NTimelineItem v-for="step in steps" :key="step.index">- <template #icon>- <NPopover placement="bottom">- <template #trigger>- <TimelineIcon :step="step" />- </template>-- <template #default>- <div class="flex flex-col gap-y-2 text-sm">- <i18n-t- keypath="custom-approval.issue-review.any-n-role-can-approve"- tag="div"- class="whitespace-nowrap"- >- <template #role>- <span class="textlabel">- {{ approvalNodeText(step.step.nodes[0]) }}- </span>- </template>- </i18n-t>- <hr />- <template v-if="!isExternalApprovalStep(step.step)">- <Approver v-if="step.status === 'APPROVED'" :step="step" />- <Candidates v-else :step="step" />- </template>- <template v-else>- <ExternalApprovalSyncButton />- </template>- </div>- </template>- </NPopover>- </template>-- <template v-if="false" #default>- <div class="flex text-sm whitespace-nowrap" :class="itemClass(step)">- {{ approvalNodeText(step.step.nodes[0]) }}- </div>- </template>- </NTimelineItem>- </NTimeline>-</template>--<script lang="ts" setup>-import { NTimeline, NTimelineItem, NPopover } from "naive-ui";-import { WrappedReviewStep } from "@/types";-import { ApprovalStep } from "@/types/proto/v1/issue_service";-import { approvalNodeText } from "@/utils";-import Approver from "./Approver.vue";-import Candidates from "./Candidates.vue";-import ExternalApprovalSyncButton from "./ExternalApprovalNodeSyncButton.vue";-import TimelineIcon from "./TimelineIcon.vue";--defineProps<{- steps: WrappedReviewStep[];-}>();--const isExternalApprovalStep = (step: ApprovalStep) => {- return !!step.nodes[0]?.externalNodeId;-};--const itemClass = (step: WrappedReviewStep) => {- const { status } = step;- return [- status === "APPROVED" && "text-control-light",- status === "REJECTED" && "text-control-light",- status === "CURRENT" && "text-accent",- status === "PENDING" && "text-control-placeholder",- ];-};-</script>--<style lang="postcss">-.bb-approval-timeline-horizontal .n-timeline-item {- padding-right: 20px !important;-}-.bb-approval-timeline-horizontal .n-timeline-item:last-child {- padding-right: 0 !important;-}-.bb-approval-timeline-horizontal .n-timeline-item .n-timeline-item-timeline {- position: static !important;- height: calc(var(--n-icon-size)) !important;-}-.bb-approval-timeline-horizontal- .n-timeline-item- .n-timeline-item-timeline- .n-timeline-item-timeline__line {- --line-padding: 4px;- left: calc(var(--n-icon-size) + var(--line-padding)) !important;- right: calc(var(--line-padding)) !important;- height: 3px !important;-}-.bb-approval-timeline-horizontal .n-timeline-item .n-timeline-item-content {- margin-top: 2px !important;-}-.bb-approval-timeline-horizontal- .n-timeline-item- .n-timeline-item-content- .n-timeline-item-content__meta {- display: none;-}-</style>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/Assignee.vue b/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vuesimilarity index 93%rename from frontend/src/components/IssueV1/components/HeaderSection/Assignee/Assignee.vuerename to frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vueindex 205daf5941..497be33c4c 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/Assignee.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vue@@ -1,6 +1,6 @@<template>- <div v-if="!isCreating" class="flex items-center justify-end gap-3">- <div class="flex items-center justify-end gap-1">+ <div v-if="shouldShowAssignee" class="flex flex-col">+ <div class="flex items-center gap-1"><NTooltip><template #trigger><div class="flex items-center gap-x-1 textlabel">@@ -13,9 +13,6 @@</div></template></NTooltip>-- <!-- AssigneeAttentionButton will be now shown until the feature is re-defined -->- <AssigneeAttentionButton v-if="false" /></div><NTooltip :disabled="errors.length === 0">@@ -31,7 +28,7 @@:fallback-option="fallbackUser":clearable="true":auto-reset="false"- style="width: 14rem"+ style="width: 100%"@update:user="changeAssigneeUID"/></template>@@ -56,7 +53,12 @@ import ErrorList, { ErrorItem } from "@/components/misc/ErrorList.vue";import { UserSelect } from "@/components/v2";import { issueServiceClient } from "@/grpcweb";import { emitWindowEvent } from "@/plugins";-import { pushNotification, useCurrentUserV1, useUserStore } from "@/store";+import {+ pushNotification,+ useCurrentUserV1,+ usePageMode,+ useUserStore,+} from "@/store";import {SYSTEM_BOT_EMAIL,SYSTEM_BOT_ID,@@ -70,18 +72,27 @@ import {extractUserResourceName,extractUserUID,hasWorkspacePermissionV1,+ isDatabaseRelatedIssue,isMemberOfProjectV1,isOwnerOfProjectV1,} from "@/utils";-import AssigneeAttentionButton from "./AssigneeAttentionButton.vue";const { t } = useI18n();const userStore = useUserStore();+const pageMode = usePageMode();const { isCreating, issue, reviewContext, releaserCandidates } =useIssueContext();const currentUser = useCurrentUserV1();const isUpdating = ref(false);+const shouldShowAssignee = computed(() => {+ return (+ !isCreating.value &&+ pageMode.value === "BUNDLED" &&+ isDatabaseRelatedIssue(issue.value)+ );+});+const assigneeEmail = computed(() => {const assignee = issue.value.assignee;if (!assignee) return undefined;@@ -279,4 +290,10 @@ const fallbackUser = (uid: string) => {value: uid,};};++defineExpose({+ shown: computed(() => {+ return shouldShowAssignee.value;+ }),+});</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/index.ts b/frontend/src/components/IssueV1/components/Sidebar/Assignee/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/Assignee/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/Assignee/index.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/EarliestAllowedTime.vue b/frontend/src/components/IssueV1/components/Sidebar/EarliestAllowedTime.vuesimilarity index 97%rename from frontend/src/components/IssueV1/components/StageSection/Actions/EarliestAllowedTime.vuerename to frontend/src/components/IssueV1/components/Sidebar/EarliestAllowedTime.vueindex 97dba3e08a..2599ec4c15 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/EarliestAllowedTime.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/EarliestAllowedTime.vue@@ -1,6 +1,6 @@<template>- <div v-if="shouldShowEarliestAllowedTime" class="flex items-center gap-x-3">- <h2 class="flex flex-col items-end">+ <div v-if="shouldShowEarliestAllowedTime" class="flex flex-col">+ <h2 class="flex flex-row items-center gap-x-1"><div class="flex gap-x-1 items-center textlabel"><NTooltip><template #trigger>@@ -20,7 +20,7 @@{{ "UTC" + dayjs().format("ZZ") }}</div></h2>- <div class="w-[12rem]">+ <div><NTooltip :disabled="disallowEditReasons.length === 0"><template #trigger><NDatePicker@@ -66,6 +66,7 @@ import {specForTask,useIssueContext,} from "@/components/IssueV1";+import ErrorList from "@/components/misc/ErrorList.vue";import { rolloutServiceClient } from "@/grpcweb";import { emitWindowEvent } from "@/plugins";import { hasFeature, pushNotification, useCurrentUserV1 } from "@/store";@@ -76,7 +77,6 @@ import {task_StatusToJSON,} from "@/types/proto/v1/rollout_service";import { extractUserResourceName, hasWorkspacePermissionV1 } from "@/utils";-import { ErrorList } from "../../common";dayjs.extend(isSameOrAfter);diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/BoolFlag.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/BoolFlag.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/BoolFlag.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/BoolFlag.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/FlagsForm.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/FlagsForm.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/constants.ts b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/constants.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/constants.tsrename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/constants.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/index.ts b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/FlagsForm/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/index.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostConfigButton.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostConfigButton.vuesimilarity index 97%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostConfigButton.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostConfigButton.vueindex 0a2bf0e0db..a27b61e4fd 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostConfigButton.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostConfigButton.vue@@ -1,7 +1,6 @@<template><NButtontag="div"- quaternarysize="small"style="--n-padding: 0 5px"@click="showFlagsPanel = true"diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostFlagsPanel.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostFlagsPanel.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostSection.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSection.vuesimilarity index 60%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostSection.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSection.vueindex 61028cfcf5..8170272869 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostSection.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSection.vue@@ -1,43 +1,42 @@<template>- <div- v-if="shouldShowGhostSection"- class="flex items-center gap-x-3 min-h-[34px]"- >- <div class="textlabel flex items-center gap-x-1">- <NTooltip>- <template #trigger>- {{ $t("task.online-migration.self") }}- </template>- <template #default>- <i18n-t- tag="p"- keypath="issue.migration-mode.online.description"- class="whitespace-pre-line max-w-[20rem]"- >- <template #link>- <LearnMoreLink- url="https://www.bytebase.com/docs/change-database/online-schema-migration-for-mysql"- color="light"- />- </template>- </i18n-t>- </template>- </NTooltip>- <FeatureBadge feature="bb.feature.online-migration" />- <FeatureBadgeForInstanceLicense- feature="bb.feature.online-migration"- :show="hasOnlineMigrationFeature && showMissingInstanceLicense"- :instance="instance"- >- <LockIcon class="w-4 h-4 text-accent" />- </FeatureBadgeForInstanceLicense>- </div>-- <div class="w-[12rem] flex items-center gap-x-2">+ <div v-if="shouldShowGhostSection" class="flex flex-col items-start gap-1">+ <div+ class="w-full flex flex-row items-center justify-between whitespace-nowrap"+ >+ <div class="textlabel flex items-center gap-x-1 whitespace-nowrap">+ <NTooltip>+ <template #trigger>+ {{ $t("task.online-migration.self") }}+ </template>+ <template #default>+ <i18n-t+ tag="p"+ keypath="issue.migration-mode.online.description"+ class="whitespace-pre-line max-w-[20rem]"+ >+ <template #link>+ <LearnMoreLink+ url="https://www.bytebase.com/docs/change-database/online-schema-migration-for-mysql"+ color="light"+ />+ </template>+ </i18n-t>+ </template>+ </NTooltip>+ <FeatureBadge feature="bb.feature.online-migration" />+ <FeatureBadgeForInstanceLicense+ feature="bb.feature.online-migration"+ :show="hasOnlineMigrationFeature && showMissingInstanceLicense"+ :instance="instance"+ >+ <LockIcon class="w-4 h-4 text-accent" />+ </FeatureBadgeForInstanceLicense>+ </div><GhostSwitch v-if="isCreating" />- <GhostConfigButton v-if="viewType === 'ON'" /></div>+ <GhostConfigButton v-if="viewType === 'ON'" />+<GhostFlagsPanel /><FeatureModaldiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostSwitch.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/GhostSwitch.vuerename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/common.tsrename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/index.ts b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/GhostSection/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/GhostSection/index.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/PreBackupSection.vue b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/PreBackupSection.vuesimilarity index 51%rename from frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/PreBackupSection.vuerename to frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/PreBackupSection.vueindex f4012c9def..2bd39e6555 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/PreBackupSection.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/PreBackupSection.vue@@ -1,16 +1,12 @@<template><divv-if="showPreBackupSection"- class="flex items-center gap-x-3 min-h-[34px]"+ class="flex items-center justify-between gap-x-2 min-h-[34px] whitespace-nowrap">- <NTooltip>- <template #trigger>- <div class="textlabel flex items-center">- {{ $t("task.prior-backup") }}- </div>- </template>- </NTooltip>- <div class="w-[12rem] flex items-center gap-x-2">+ <div class="textlabel flex items-center">+ {{ $t("task.prior-backup") }}+ </div>+ <div class="flex items-center gap-x-2"><PreBackupSwitch /></div></div>diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/PreBackupSwitch.vue b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/PreBackupSwitch.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/PreBackupSwitch.vuerename to frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/PreBackupSwitch.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/common.tsrename to frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/index.ts b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/PreBackupSection/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/index.tsdiff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vuesimilarity index 51%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vuerename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vueindex beed0de41f..84ffca3093 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue@@ -1,18 +1,21 @@<template>- <div- class="inline-block"- :class="step.approver?.name === currentUser.name && 'font-bold'"- >- <span>{{ step.approver?.title }}</span>+ <div :class="step.approver?.name === currentUser.name && 'font-bold'">+ <slot name="title" :approver="step.approver">+ <span class="truncate">+ <NPerformantEllipsis>+ {{ step.approver?.title }}+ </NPerformantEllipsis>+ </span>+ </slot><spanv-if="step.approver?.name === currentUser.name"- class="ml-1 inline-flex items-center px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"+ class="ml-1 px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800">{{ $t("custom-approval.issue-review.you") }}</span><spanv-if="step.approver?.name === SYSTEM_BOT_USER_NAME"- class="ml-1 inline-flex items-center px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"+ class="ml-1 px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800">{{ $t("settings.members.system-bot") }}</span>@@ -20,6 +23,7 @@</template><script setup lang="ts">+import { NPerformantEllipsis } from "naive-ui";import { useCurrentUserV1 } from "@/store";import { SYSTEM_BOT_USER_NAME, WrappedReviewStep } from "@/types";diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vuerename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vuediff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ExternalApprovalNodeSyncButton.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ExternalApprovalNodeSyncButton.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ExternalApprovalNodeSyncButton.vuerename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ExternalApprovalNodeSyncButton.vuediff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vuesimilarity index 91%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vuerename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vueindex 5914438569..d627db02f1 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue@@ -1,5 +1,5 @@<template>- <div class="flex items-center gap-x-3 min-h-[34px]">+ <div v-if="!isCreating" class="flex flex-col gap-y-1"><NTooltip :disabled="!showApprovalTooltip"><template #trigger><div class="textlabel flex items-center gap-x-1">@@ -41,6 +41,7 @@<Timelinev-else-if="wrappedSteps && wrappedSteps.length > 0":steps="wrappedSteps"+ class="mt-1"/><divv-else@@ -69,7 +70,8 @@ import { useIssueV1Store } from "@/store";import { isGrantRequestIssue } from "@/utils";import Timeline from "./Timeline.vue";-const { issue, events, reviewContext, selectedTask } = useIssueContext();+const { issue, events, isCreating, reviewContext, selectedTask } =+ useIssueContext();const { ready, error } = reviewContext;const selectedDatabase = computed(() =>databaseForTask(issue.value, selectedTask.value)@@ -95,4 +97,10 @@ const showApprovalTooltip = computed(() => {}return true;});++defineExpose({+ shown: computed(() => {+ return !isCreating.value;+ }),+});</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vuenew file mode 100644index 0000000000..c80520b12e--- /dev/null+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue@@ -0,0 +1,99 @@+<template>+ <NTimeline :icon-size="28">+ <NTimelineItem v-for="step in steps" :key="step.index">+ <template #icon>+ <NPopover placement="left">+ <template #trigger>+ <TimelineIcon :step="step" />+ </template>++ <template #default>+ <div class="flex flex-col gap-y-2 text-sm max-w-[16rem] truncate">+ <i18n-t+ keypath="custom-approval.issue-review.any-n-role-can-approve"+ tag="div"+ >+ <template #role>+ <span class="textlabel">+ {{ approvalNodeText(step.step.nodes[0]) }}+ </span>+ </template>+ </i18n-t>+ <hr />+ <template v-if="!isExternalApprovalStep(step.step)">+ <Approver+ v-if="step.status === 'APPROVED'"+ :step="step"+ class="inline-flex flex-nowrap items-center whitespace-nowrap"+ />+ <Candidates v-else :step="step" />+ </template>+ <template v-else>+ <ExternalApprovalSyncButton />+ </template>+ </div>+ </template>+ </NPopover>+ </template>+ <template #default>+ <div class="flex flex-row gap-x-1">+ <div class="flex-1 truncate">+ <NPerformantEllipsis>+ {{ approvalNodeText(step.step.nodes[0]) }}+ </NPerformantEllipsis>+ </div>+ <div v-if="isExternalApprovalStep(step.step)" class="shrink-0">+ <ExternalApprovalSyncButton />+ </div>+ </div>+ </template>+ <template+ v-if="!isExternalApprovalStep(step.step) && step.status === 'APPROVED'"+ #footer+ >+ <i18n-t+ keypath="custom-approval.issue-review.approved-by-n"+ tag="div"+ class="break-words break-all"+ >+ <template #approver>+ <Approver+ v-if="step.status === 'APPROVED'"+ :step="step"+ class="inline"+ >+ <template #title="{ approver }: { approver: User | undefined }">+ <span>{{ approver?.title }}</span>+ </template>+ </Approver>+ </template>+ </i18n-t>+ </template>+ </NTimelineItem>+ </NTimeline>+</template>++<script lang="ts" setup>+import {+ NTimeline,+ NTimelineItem,+ NPopover,+ NPerformantEllipsis,+} from "naive-ui";+import { WrappedReviewStep } from "@/types";+import { User } from "@/types/proto/v1/auth_service";+import { ApprovalStep } from "@/types/proto/v1/issue_service";+import { approvalNodeText } from "@/utils";+import Approver from "./Approver.vue";+import Candidates from "./Candidates.vue";+import ExternalApprovalSyncButton from "./ExternalApprovalNodeSyncButton.vue";+import TimelineIcon from "./TimelineIcon.vue";++defineProps<{+ steps: WrappedReviewStep[];+}>();++const isExternalApprovalStep = (step: ApprovalStep) => {+ return !!step.nodes[0]?.externalNodeId;+};+</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/TimelineIcon.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/TimelineIcon.vuerename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vuediff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/index.ts b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/ReviewSection/index.tsdiff --git a/frontend/src/components/IssueV1/components/HeaderSection/RollbackFromTips.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vuesimilarity index 97%rename from frontend/src/components/IssueV1/components/HeaderSection/RollbackFromTips.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vueindex 36aed9d3e9..f91628a736 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/RollbackFromTips.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vue@@ -132,4 +132,10 @@ const rollbackIssueLink = computed(() => {rollbackFromTask.value);});++defineExpose({+ shown: computed(() => {+ return shouldShowTips.value;+ }),+});</script>diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LogButton.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/LogButton.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LogButton.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/LogButton.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/LoggingButton.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/LoggingButton.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackSection.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackSection.vuesimilarity index 91%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackSection.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackSection.vueindex 9a58d4709c..134e5ac8cf 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackSection.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackSection.vue@@ -1,7 +1,7 @@<template><divv-if="rollbackUIType !== 'NONE'"- class="flex items-center gap-x-3 min-h-[34px]"+ class="flex items-center justify-between gap-x-2 min-h-[34px] whitespace-nowrap"><NTooltip><template #trigger>@@ -24,7 +24,7 @@</i18n-t></template></NTooltip>- <div class="w-[12rem]">+ <div class=""><RollbackSwitch v-if="rollbackUIType === 'SWITCH'" /><RollbackStatus v-if="rollbackUIType === 'FULL'" /></div>diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackStatus.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vuesimilarity index 98%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackStatus.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vueindex 52a08558ab..7da646d552 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackStatus.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vue@@ -78,7 +78,7 @@ import {import { LogEntity_Action } from "@/types/proto/v1/logging_service";import { Task_DatabaseDataUpdate_RollbackSqlStatus as RollbackSqlStatus } from "@/types/proto/v1/rollout_service";import { extractSheetUID } from "@/utils";-import IssueStatusIcon from "../../../IssueStatusIcon.vue";+import IssueStatusIcon from "../../IssueStatusIcon.vue";import LogButton from "./LogButton.vue";import LoggingButton from "./LoggingButton.vue";import { useRollbackContext } from "./common";diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackSwitch.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackSwitch.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/RollbackSwitch.vuerename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackSwitch.vuediff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/common.tsrename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/index.ts b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/index.tsrename to frontend/src/components/IssueV1/components/Sidebar/RollbackSection/index.tsdiff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vuenew file mode 100644index 0000000000..eddcd776c0--- /dev/null+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue@@ -0,0 +1,38 @@+<template>+ <div class="flex flex-col gap-y-3 py-2 px-3">+ <VCSInfo ref="vcsInfoRef" />+ <RollbackFromTips ref="rollbackFromTipsRef" />+ <ReviewSection ref="reviewSectionRef" />+ <Assignee ref="assigneeRef" />++ <div v-if="isFirstSectionShown" class="border-t -mx-3" />++ <EarliestAllowedTime />+ <PreBackupSection />+ <RollbackSection />+ <GhostSection />+ </div>+</template>++<script lang="ts" setup>+import { computed, ref } from "vue";+import Assignee from "./Assignee";+import EarliestAllowedTime from "./EarliestAllowedTime.vue";+import GhostSection from "./GhostSection";+import PreBackupSection from "./PreBackupSection";+import ReviewSection from "./ReviewSection";+import RollbackFromTips from "./RollbackFromTips.vue";+import RollbackSection from "./RollbackSection";+import VCSInfo from "./VCSInfo.vue";++const vcsInfoRef = ref<InstanceType<typeof VCSInfo>>();+const rollbackFromTipsRef = ref<InstanceType<typeof RollbackFromTips>>();+const reviewSectionRef = ref<InstanceType<typeof ReviewSection>>();+const assigneeRef = ref<InstanceType<typeof Assignee>>();++const isFirstSectionShown = computed(() => {+ return [vcsInfoRef, rollbackFromTipsRef, reviewSectionRef, assigneeRef].some(+ (elemRef) => elemRef.value?.shown+ );+});+</script>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/VCSInfo.vue b/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vuesimilarity index 97%rename from frontend/src/components/IssueV1/components/HeaderSection/VCSInfo.vuerename to frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vueindex 836726addf..1066f18f7b 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/VCSInfo.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vue@@ -83,4 +83,10 @@ const vcsBranchUrl = computed((): string => {}return "";});++defineExpose({+ shown: computed(() => {+ return !!pushEvent.value;+ }),+});</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/index.ts b/frontend/src/components/IssueV1/components/Sidebar/index.tsnew file mode 100644index 0000000000..15fb2428a0--- /dev/null+++ b/frontend/src/components/IssueV1/components/Sidebar/index.ts@@ -0,0 +1,3 @@+import Sidebar from "./Sidebar.vue";++export default Sidebar;diff --git a/frontend/src/components/IssueV1/components/HeaderSection/useActiveTaskSheet.ts b/frontend/src/components/IssueV1/components/Sidebar/useActiveTaskSheet.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/HeaderSection/useActiveTaskSheet.tsrename to frontend/src/components/IssueV1/components/Sidebar/useActiveTaskSheet.tsdiff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/Actions.vue b/frontend/src/components/IssueV1/components/StageSection/Actions/Actions.vuedeleted file mode 100644index 238529f2f4..0000000000--- a/frontend/src/components/IssueV1/components/StageSection/Actions/Actions.vue+++ /dev/null@@ -1,18 +0,0 @@-<template>- <div class="flex flex-col items-end gap-y-2">- <EarliestAllowedTime />-- <PreBackupSection />-- <RollbackSection />-- <GhostSection />- </div>-</template>--<script setup lang="ts">-import EarliestAllowedTime from "./EarliestAllowedTime.vue";-import GhostSection from "./GhostSection";-import PreBackupSection from "./PreBackupSection";-import RollbackSection from "./RollbackSection";-</script>diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/index.ts b/frontend/src/components/IssueV1/components/StageSection/Actions/index.tsdeleted file mode 100644index 9793717924..0000000000--- a/frontend/src/components/IssueV1/components/StageSection/Actions/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import Actions from "./Actions.vue";--export default Actions;diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue b/frontend/src/components/IssueV1/components/StageSection/StageSection.vueindex 7fb21a70db..d8797c18da 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue@@ -1,11 +1,11 @@<template>- <div class="w-full flex flex-col">+ <div class="w-full flex flex-col divide-y"><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-[68px]" />+ <StageCard :stage="stage" :index="index" class="h-[54px]" /><divv-if="index < stageList.length - 1"- class="hidden lg:block w-5 h-[68px] mr-2 pointer-events-none shrink-0"+ class="hidden lg:block w-3.5 h-[54px] mr-2 pointer-events-none shrink-0"aria-hidden="true"><svg@@ -25,20 +25,13 @@</template></div>- <div class="w-full border-t mb-4" />-- <div class="lg:flex items-start justify-between px-4">- <StageInfo />-- <Actions />- </div>+ <StageInfo class="px-4 py-2" /></div></template><script lang="ts" setup>import { computed } from "vue";import { useIssueContext } from "@/components/IssueV1/logic";-import Actions from "./Actions";import StageCard from "./StageCard.vue";import StageInfo from "./StageInfo";diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue b/frontend/src/components/IssueV1/components/StageSection/StageSummary.vueindex eb64558c1e..fb1f8adbe3 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue@@ -1,10 +1,10 @@<template><div class="!no-underline">- <span class="!no-underline">(</span>- <span class="!no-underline">{{ summary.done + summary.canceled }}</span>- <span class="!no-underline">/</span>- <span class="!no-underline">{{ summary.total }}</span>- <span class="!no-underline">)</span>+ <span>(</span>+ <span>{{ summary.done + summary.canceled }}</span>+ <span>/</span>+ <span>{{ summary.total }}</span>+ <span>)</span></div></template>diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vueindex 0e415b0da4..0fc573b9bb 100644--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue@@ -1,8 +1,8 @@<template>- <div v-if="shouldShowTaskBar" class="relative">+ <div v-if="shouldShowTaskBar" class="relative py-2"><divref="taskBar"- class="task-list gap-2 py-2 px-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 4xl:grid-cols-6 overflow-y-auto"+ class="task-list gap-2 px-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 4xl:grid-cols-6 overflow-y-auto":class="{'more-bottom': taskBarScrollState.bottom,'more-top': taskBarScrollState.top,diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vueindex 8122ad128d..91cc7670d0 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue@@ -7,10 +7,10 @@class="border"><template #item="{ item: taskRun }: TaskRunGridRow">- <div class="bb-grid-cell">+ <div class="bb-grid-cell block"><TaskRunStatusIcon :status="taskRun.status" /></div>- <div class="bb-grid-cell whitespace-pre-wrap break-words">+ <div class="bb-grid-cell whitespace-pre-wrap break-words !block"><TaskRunComment :task-run="taskRun" /></div><div class="bb-grid-cell">diff --git a/frontend/src/components/IssueV1/components/index.ts b/frontend/src/components/IssueV1/components/index.tsindex bb50cb62db..b39c405b8d 100644--- a/frontend/src/components/IssueV1/components/index.ts+++ b/frontend/src/components/IssueV1/components/index.ts@@ -4,6 +4,7 @@ import DescriptionSection from "./DescriptionSection";import HeaderSection from "./HeaderSection";import IssueSearch from "./IssueSearch";import PlanCheckSection from "./PlanCheckSection";+import Sidebar from "./Sidebar";import StageSection from "./StageSection";import StatementSection from "./StatementSection";import TaskListSection from "./TaskListSection";@@ -22,4 +23,5 @@ export {DescriptionSection,ActivitySection,IssueSearch,+ Sidebar,};diff --git a/frontend/src/components/IssueV1/logic/index.ts b/frontend/src/components/IssueV1/logic/index.tsindex e6510fcd36..d9762b2020 100644--- a/frontend/src/components/IssueV1/logic/index.ts+++ b/frontend/src/components/IssueV1/logic/index.ts@@ -14,3 +14,4 @@ export * from "./plan-check";export * from "./task-run";export * from "./poll";export * from "./subscriber";+export * from "./sidebar";diff --git a/frontend/src/components/IssueV1/logic/sidebar.ts b/frontend/src/components/IssueV1/logic/sidebar.tsnew file mode 100644index 0000000000..592d9f8cc4--- /dev/null+++ b/frontend/src/components/IssueV1/logic/sidebar.ts@@ -0,0 +1,48 @@+import { useElementSize } from "@vueuse/core";+import { InjectionKey, Ref, computed, inject, provide, ref } from "vue";++export type SidebarMode = "NONE" | "DESKTOP" | "MOBILE";++export type SidebarContext = {+ mode: Ref<SidebarMode>;+ desktopSidebarWidth: Ref<number>;+ mobileSidebarOpen: Ref<boolean>;+};++const KEY = Symbol("bb.issue.detail.sidebar") as InjectionKey<SidebarContext>;++export const useIssueSidebarContext = () => {+ return inject(KEY)!;+};++export const provideIssueSidebarContext = (+ containerRef: Ref<HTMLElement | undefined>+) => {+ const { width: containerWidth } = useElementSize(containerRef);+ const MOBILE_SIDEBAR_THRESHOLD = 780;+ const mode = computed((): SidebarMode => {+ const cw = containerWidth.value;+ if (cw === 0) {+ // First render+ return "NONE";+ }+ if (cw < MOBILE_SIDEBAR_THRESHOLD) {+ return "MOBILE";+ }+ return "DESKTOP";+ });+ const desktopSidebarWidth = computed(() => {+ const cw = containerWidth.value;+ if (cw < 1280) return 240;+ return 320;+ });+ const mobileSidebarOpen = ref(false);+ const context: SidebarContext = {+ mode,+ desktopSidebarWidth,+ mobileSidebarOpen,+ };++ provide(KEY, context);+ return context;+};diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex a7106ae46c..cf18127928 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -3090,7 +3090,8 @@"sent-back-issue": "Sent back issue","re-requested-review": "re-requested issue review","no-one-matches-role": "No one matches the role, contact project owner to assign one.",- "any-n-role-can-approve": "Any {role} can approve"+ "any-n-role-can-approve": "Any {role} can approve",+ "approved-by-n": "Approved by {approver}"},"send-back": "Send back"},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex f9bbe2ce09..db1c0a4816 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -3087,7 +3087,8 @@"sent-back-issue": "Problema devuelto","re-requested-review": "revisión de problema nuevamente solicitada","no-one-matches-role": "Nadie coincide con el rol, comuníquese con el propietario del proyecto para asignar uno.",- "any-n-role-can-approve": "Cualquier {role} puede aprobar"+ "any-n-role-can-approve": "Cualquier {role} puede aprobar",+ "approved-by-n": "Aprobado por {approver}"},"send-back": "Enviar de vuelta"},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 20bbb29f42..6bdd0f3401 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -3084,7 +3084,8 @@"sent-back-issue": "退回工单","re-requested-review": "再次请求审批工单","no-one-matches-role": "没有符合这个角色的用户,请联系项目管理员分配角色。",- "any-n-role-can-approve": "任意 {role} 可审批"+ "any-n-role-can-approve": "任意 {role} 可审批",+ "approved-by-n": "已由 {approver} 批准"},"send-back": "退回"},