Skip to content

Commit 4e99247

Browse files
committed
Fix various overflows on actions view
1 parent 908426a commit 4e99247

File tree

3 files changed

+41
-13
lines changed

3 files changed

+41
-13
lines changed

templates/repo/actions/runs_list.tmpl

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="flex-list">
1+
<div class="flex-list run-list">
22
{{if not .Runs}}
33
<div class="empty-placeholder">
44
{{svg "octicon-no-entry" 48}}
@@ -28,14 +28,14 @@
2828
</div>
2929
<div class="flex-item-trailing">
3030
{{if .RefLink}}
31-
<a class="ui label tw-px-1 tw-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
31+
<a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}">{{.PrettyRef}}</a>
3232
{{else}}
33-
<span class="ui label tw-px-1 tw-mx-0">{{.PrettyRef}}</span>
33+
<span class="ui label run-list-ref gt-ellipsis">{{.PrettyRef}}</span>
3434
{{end}}
35-
</div>
36-
<div class="run-list-item-right">
37-
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
38-
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
35+
<div class="run-list-item-right">
36+
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
37+
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
38+
</div>
3939
</div>
4040
</div>
4141
{{end}}

web_src/css/actions.css

+23-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
.run-list-item-right {
47-
flex: 0 0 min(20%, 130px);
47+
width: 130px;
4848
display: flex;
4949
flex-direction: column;
5050
gap: 3px;
@@ -57,3 +57,25 @@
5757
gap: .25rem;
5858
align-items: center;
5959
}
60+
61+
.run-list .flex-item-trailing {
62+
flex-wrap: nowrap;
63+
}
64+
65+
.run-list-ref {
66+
display: inline-block !important;
67+
max-width: 200px;
68+
}
69+
70+
@media (max-width: 767.98px) {
71+
.run-list .flex-item-trailing {
72+
flex-direction: column;
73+
align-items: flex-end;
74+
}
75+
.run-list-item-right {
76+
width: 90px;
77+
}
78+
.run-list-ref {
79+
max-width: 90px;
80+
}
81+
}

web_src/js/components/RepoActionView.vue

+11-5
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export function initRepositoryActionView() {
377377
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
378378
{{ locale.cancel }}
379379
</button>
380-
<button class="ui basic small compact button tw-mr-0 link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
380+
<button class="ui basic small compact button tw-mr-0 tw-whitespace-nowrap link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
381381
{{ locale.rerun_all }}
382382
</button>
383383
</div>
@@ -386,8 +386,8 @@ export function initRepositoryActionView() {
386386
<a class="muted" :href="run.commit.link">{{ run.commit.shortSHA }}</a>
387387
{{ run.commit.localePushedBy }}
388388
<a class="muted" :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a>
389-
<span class="ui label" v-if="run.commit.shortSHA">
390-
<a :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
389+
<span class="ui label tw-max-w-full" v-if="run.commit.shortSHA">
390+
<a class="gt-ellipsis" :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
391391
</span>
392392
</div>
393393
</div>
@@ -426,8 +426,8 @@ export function initRepositoryActionView() {
426426
427427
<div class="action-view-right">
428428
<div class="job-info-header">
429-
<div class="job-info-header-left">
430-
<h3 class="job-info-header-title">
429+
<div class="job-info-header-left gt-ellipsis">
430+
<h3 class="job-info-header-title gt-ellipsis">
431431
{{ currentJob.title }}
432432
</h3>
433433
<p class="job-info-header-detail">
@@ -503,6 +503,7 @@ export function initRepositoryActionView() {
503503
display: flex;
504504
align-items: center;
505505
justify-content: space-between;
506+
gap: 8px;
506507
}
507508
508509
.action-info-summary-title {
@@ -513,6 +514,7 @@ export function initRepositoryActionView() {
513514
font-size: 20px;
514515
margin: 0 0 0 8px;
515516
flex: 1;
517+
overflow-wrap: anywhere;
516518
}
517519
518520
.action-commit-summary {
@@ -728,6 +730,10 @@ export function initRepositoryActionView() {
728730
font-size: 12px;
729731
}
730732
733+
.job-info-header-left {
734+
flex: 1;
735+
}
736+
731737
.job-step-container {
732738
max-height: 100%;
733739
border-radius: 0 0 var(--border-radius) var(--border-radius);

0 commit comments

Comments
 (0)