Skip to content

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

chore(frontend): CI/CD UI minor improvements (#7771)

Liu Ji629941a90aef
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index 82d8ca6243..e28a53c913 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -6,7 +6,7 @@
<HeaderSection class="!border-t-0" />
- <div class="w-full border-t mt-4 mb-2" />
+ <div class="w-full border-t mt-4" />
<StageSection />
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
index 7bb79670be..7b294db67e 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
@@ -5,6 +5,7 @@
:preference-key="`bb-rollout-action-${action}`"
:action-list="actionList"
:default-action-key="`${action}-STAGE`"
+ size="medium"
@click="$emit('perform-action', ($event as RolloutButtonAction).params)"
/>
</template>
@@ -63,31 +64,12 @@ const errors = asyncComputed(async () => {
return errors;
}, []);
-// const errors = computed(() => {
-// const errors: string[] = [];
-// if (!allPlanChecksPassedForTask(issue.value, activeTask.value)) {
-// errors.push("Some checks failed.");
-// }
-// if (
-// !isUserAllowedToApplyTaskRolloutAction(
-// issue.value,
-// activeTask.value,
-// currentUser.value,
-// props.action
-// )
-// ) {
-// errors.push("You are not assignee of this issue.");
-// }
-// return errors;
-// });
-
const actionList = computed(() => {
const { action } = props;
const text = taskRolloutActionDisplayName(action);
const actionProps: RolloutButtonAction["props"] = {
...taskRolloutActionButtonProps(action),
- size: "large",
tag: "div",
disabled: errors.value.length > 0,
};
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
index 3e8f85c980..ffc99cb276 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue
@@ -2,10 +2,10 @@
<div class="w-full flex flex-col px-4">
<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-[60px]" />
+ <StageCard :stage="stage" :index="index" class="h-[68px]" />
<div
v-if="index < stageList.length - 1"
- class="hidden lg:block w-5 h-[60px] mr-2 pointer-events-none shrink-0"
+ class="hidden lg:block w-5 h-[68px] mr-2 pointer-events-none shrink-0"
aria-hidden="true"
>
<svg
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
index 656992ce7a..0e415b0da4 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
@@ -2,11 +2,14 @@
<div v-if="shouldShowTaskBar" class="relative">
<div
ref="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 max-h-48 overflow-y-auto"
+ 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="{
'more-bottom': taskBarScrollState.bottom,
'more-top': taskBarScrollState.top,
}"
+ :style="{
+ 'max-height': `${MAX_LIST_HEIGHT}px`,
+ }"
>
<TaskCard v-for="(task, i) in taskList" :key="i" :task="task" />
</div>
@@ -19,9 +22,12 @@ import { useVerticalScrollState } from "@/composables/useScrollState";
import { useIssueContext } from "../../logic";
import TaskCard from "./TaskCard.vue";
+// 3 * lines of cards + 2 * top and bottom padding + 2 * horizontal gaps + jitter
+const MAX_LIST_HEIGHT = 207;
+
const { issue, selectedStage } = useIssueContext();
const taskBar = ref<HTMLDivElement>();
-const taskBarScrollState = useVerticalScrollState(taskBar, 192);
+const taskBarScrollState = useVerticalScrollState(taskBar, MAX_LIST_HEIGHT);
const rollout = computed(() => issue.value.rolloutEntity);
const taskList = computed(() => selectedStage.value.tasks);
@@ -44,9 +50,9 @@ const shouldShowTaskBar = computed(() => {
box-shadow: none;
}
.task-list.more-top::before {
- box-shadow: inset 0 0.5rem 0.25rem -0.25rem rgb(0 0 0 / 10%);
+ box-shadow: inset 0 0.3rem 0.25rem -0.25rem rgb(0 0 0 / 10%);
}
.task-list.more-bottom::after {
- box-shadow: inset 0 -0.5rem 0.25rem -0.25rem rgb(0 0 0 / 10%);
+ box-shadow: inset 0 -0.3rem 0.25rem -0.25rem rgb(0 0 0 / 10%);
}
</style>
diff --git a/frontend/src/components/v2/Button/ContextMenuButton.vue b/frontend/src/components/v2/Button/ContextMenuButton.vue
index e5abe08133..bea3bf28ba 100644
--- a/frontend/src/components/v2/Button/ContextMenuButton.vue
+++ b/frontend/src/components/v2/Button/ContextMenuButton.vue
@@ -1,5 +1,5 @@
<template>
- <NButtonGroup v-if="currentAction" size="small">
+ <NButtonGroup v-if="currentAction" :size="size">
<NButton
v-bind="currentAction.props"
@click="$emit('click', currentAction)"
@@ -33,17 +33,29 @@
<script setup lang="ts">
import { useLocalStorage } from "@vueuse/core";
import { head } from "lodash-es";
-import { NButton, NButtonGroup, NPopselect, SelectOption } from "naive-ui";
+import {
+ NButton,
+ NButtonGroup,
+ ButtonGroupProps,
+ NPopselect,
+ SelectOption,
+} from "naive-ui";
import { ref, computed } from "vue";
import { ContextMenuButtonAction } from "./types";
const STORE_PREFIX = "bb.context-menu-button";
-const props = defineProps<{
- preferenceKey: string;
- actionList: ContextMenuButtonAction[];
- defaultActionKey: string;
-}>();
+const props = withDefaults(
+ defineProps<{
+ preferenceKey: string;
+ actionList: ContextMenuButtonAction[];
+ defaultActionKey: string;
+ size?: ButtonGroupProps["size"];
+ }>(),
+ {
+ size: "small",
+ }
+);
defineEmits<{
(event: "click", action: ContextMenuButtonAction): void;