From 5bd0773741be8f9476be0c76e8733f8c9dd65d19 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 24 Mar 2024 14:38:10 +0100 Subject: [PATCH] Dont show expansion for empty actions steps (#29977) This hides the chevron icon and makes the step header unclickable for skipped steps because there is no content to expand on those. Before: Screenshot 2024-03-21 at 20 06 47 After: Screenshot 2024-03-21 at 20 03 07 --------- Co-authored-by: Giteabot --- web_src/js/components/RepoActionView.vue | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 2a4a6d77ff..83933ef24d 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -268,6 +268,10 @@ const sfc = { return ['success', 'skipped', 'failure', 'cancelled'].includes(status); }, + isExpandable(status) { + return ['success', 'running', 'failure', 'cancelled'].includes(status); + }, + closeDropdown() { if (this.menuVisible) this.menuVisible = false; }, @@ -459,12 +463,12 @@ export function initRepositoryActionView() {
-
+
- + {{ jobStep.summary }} @@ -715,13 +719,21 @@ export function initRepositoryActionView() { } .job-step-container .job-step-summary { - cursor: pointer; padding: 5px 10px; display: flex; align-items: center; border-radius: var(--border-radius); } +.job-step-container .job-step-summary.step-expandable { + cursor: pointer; +} + +.job-step-container .job-step-summary.step-expandable:hover { + color: var(--color-console-fg); + background-color: var(--color-console-hover-bg); +} + .job-step-container .job-step-summary .step-summary-msg { flex: 1; } @@ -730,12 +742,6 @@ export function initRepositoryActionView() { margin-left: 16px; } -.job-step-container .job-step-summary:hover { - color: var(--color-console-fg); - background-color: var(--color-console-hover-bg); - -} - .job-step-container .job-step-summary.selected { color: var(--color-console-fg); background-color: var(--color-console-active-bg);