Skip to content

Commit

Permalink
Fix various overflows on actions view
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Apr 8, 2024
1 parent 908426a commit 12afcdf
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
14 changes: 7 additions & 7 deletions templates/repo/actions/runs_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
{{end}}
{{range .Runs}}
<div class="flex-item tw-items-center">
<div class="flex-item tw-items-center run-list">
<div class="flex-item-leading">
{{template "repo/actions/status" (dict "status" .Status.String)}}
</div>
Expand All @@ -28,14 +28,14 @@
</div>
<div class="flex-item-trailing">
{{if .RefLink}}
<a class="ui label tw-px-1 tw-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
<a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}">{{.PrettyRef}}</a>
{{else}}
<span class="ui label tw-px-1 tw-mx-0">{{.PrettyRef}}</span>
<span class="ui label run-list-ref gt-ellipsis">{{.PrettyRef}}</span>
{{end}}
</div>
<div class="run-list-item-right">
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
<div class="run-list-item-right">
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}</div>
<div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
</div>
</div>
</div>
{{end}}
Expand Down
24 changes: 23 additions & 1 deletion web_src/css/actions.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

.run-list-item-right {
flex: 0 0 min(20%, 130px);
width: 130px;
display: flex;
flex-direction: column;
gap: 3px;
Expand All @@ -57,3 +57,25 @@
gap: .25rem;
align-items: center;
}

.run-list .flex-item-trailing {
flex-wrap: nowrap;
}

.run-list-ref {
display: inline-block !important;
max-width: 200px;
}

@media (max-width: 767.98px) {
.run-list .flex-item-trailing {
flex-direction: column;
align-items: flex-end;
}
.run-list-item-right {
width: 90px;
}
.run-list-ref {
max-width: 90px;
}
}
16 changes: 11 additions & 5 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export function initRepositoryActionView() {
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
{{ locale.cancel }}
</button>
<button class="ui basic small compact button tw-mr-0 link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
<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">
{{ locale.rerun_all }}
</button>
</div>
Expand All @@ -386,8 +386,8 @@ export function initRepositoryActionView() {
<a class="muted" :href="run.commit.link">{{ run.commit.shortSHA }}</a>
{{ run.commit.localePushedBy }}
<a class="muted" :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a>
<span class="ui label" v-if="run.commit.shortSHA">
<a :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
<span class="ui label tw-max-w-full" v-if="run.commit.shortSHA">
<a class="gt-ellipsis" :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
</span>
</div>
</div>
Expand Down Expand Up @@ -426,8 +426,8 @@ export function initRepositoryActionView() {
<div class="action-view-right">
<div class="job-info-header">
<div class="job-info-header-left">
<h3 class="job-info-header-title">
<div class="job-info-header-left gt-ellipsis">
<h3 class="job-info-header-title gt-ellipsis">
{{ currentJob.title }}
</h3>
<p class="job-info-header-detail">
Expand Down Expand Up @@ -503,6 +503,7 @@ export function initRepositoryActionView() {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.action-info-summary-title {
Expand All @@ -513,6 +514,7 @@ export function initRepositoryActionView() {
font-size: 20px;
margin: 0 0 0 8px;
flex: 1;
overflow-wrap: anywhere;
}
.action-commit-summary {
Expand Down Expand Up @@ -728,6 +730,10 @@ export function initRepositoryActionView() {
font-size: 12px;
}
.job-info-header-left {
flex: 1;
}
.job-step-container {
max-height: 100%;
border-radius: 0 0 var(--border-radius) var(--border-radius);
Expand Down

0 comments on commit 12afcdf

Please sign in to comment.