Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont show expansion for empty actions steps #29977

Merged
merged 10 commits into from
Mar 24, 2024
13 changes: 8 additions & 5 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,13 @@ export function initRepositoryActionView() {
</div>
<div class="job-step-container" ref="steps" v-if="currentJob.steps.length">
<div class="job-step-section" v-for="(jobStep, i) in currentJob.steps" :key="i">
<div class="job-step-summary" @click.stop="toggleStepLogs(i)" :class="currentJobStepsStates[i].expanded ? 'selected' : ''">
<div class="job-step-summary" @click.stop="jobStep.status !== 'skipped' && toggleStepLogs(i)" :class="[selected ? currentJobStepsStates[i].expanded : '', jobStep.status ? `step-status-${jobStep.status}` : '']">
<!-- If the job is done and the job step log is loaded for the first time, show the loading icon
currentJobStepsStates[i].cursor === null means the log is loaded for the first time
-->
<SvgIcon v-if="isDone(run.status) && currentJobStepsStates[i].expanded && currentJobStepsStates[i].cursor === null" name="octicon-sync" class="gt-mr-3 job-status-rotate"/>
<SvgIcon v-else :name="currentJobStepsStates[i].expanded ? 'octicon-chevron-down': 'octicon-chevron-right'" class="gt-mr-3"/>
<SvgIcon v-else-if="jobStep.status !== 'skipped'" :name="currentJobStepsStates[i].expanded ? 'octicon-chevron-down': 'octicon-chevron-right'" class="gt-mr-3"/>
<div v-else class="tw-w-4 tw-h-4 gt-mr-3"/>
<ActionRunStatus :status="jobStep.status" class="gt-mr-3"/>

<span class="step-summary-msg gt-ellipsis">{{ jobStep.summary }}</span>
Expand Down Expand Up @@ -715,13 +716,16 @@ 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:not(.step-status-skipped) {
cursor: pointer;
}

.job-step-container .job-step-summary .step-summary-msg {
flex: 1;
}
Expand All @@ -730,10 +734,9 @@ export function initRepositoryActionView() {
margin-left: 16px;
}

.job-step-container .job-step-summary:hover {
.job-step-container .job-step-summary:not(.step-status-skipped):hover {
color: var(--color-console-fg);
background-color: var(--color-console-hover-bg);

}

.job-step-container .job-step-summary.selected {
Expand Down
Loading