Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/home_sidebar_bottom.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="flex-item-title">
<a class="item muted" href="{{.RepoLink}}/releases">
{{ctx.Locale.Tr "repo.releases"}}
<span class="ui small label">{{.NumReleases}}</span>
</a>
<span class="ui small label">{{.NumReleases}}</span>
</div>
<div class="flex-item">
<div class="flex-item-leading">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/home_sidebar_top.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="flex-item">
<div class="flex-item-main">
<div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div>
<div class="flex-item-body tw-text-16">
<div class="flex-item-body tw-text-15">
<div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2">
<div class="repo-description tw-break-anywhere tw-gap-2">
{{- $description := .Repository.DescriptionHTML ctx -}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content/add_reaction.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{if ctx.RootData.IsSigned}}
<div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}">
<div class="item action ui dropdown jump pointing top right select-reaction tw-px-[5px]" data-action-url="{{.ActionURL}}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it has 5px padding but the other one doesn't:

image image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to add a bit more spacing around the emoji button, but at the same time not introduce too much spacing between the labels. I guess the clean solution is to put the labels into their own <div> and apply different gaps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, the UI has different cases.

On "diff" page, the layout is like this, it doesn't show "role" labels, but "review" or "pending" labels.

And the "emoji" dropdown sometimes can be hidden templates/repo/diff/comments.tmpl.

I think we need a unified UI layout to cover these cases.

image

<a class="muted">{{svg "octicon-smiley"}}</a>
<div class="menu">
{{range $value := AllowedReactions}}
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/search/code/results.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{range $result := .SearchResults}}
{{$repo := or $.Repo (index $.RepoMaps .RepoID)}}
<div class="diff-file-box file-content non-diff-file-content repo-search-result">
<h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap">
<h4 class="ui top attached header tw-font-normal flex-text-block tw-flex-wrap tw-py-2">
{{if not $.Repo}}
<span class="file tw-flex-1">
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>
Expand Down
17 changes: 10 additions & 7 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ td .commit-summary {
line-height: 32px;
vertical-align: middle;
color: var(--color-text-light);
overflow-wrap: break-word;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is needed? IIRC break-word is already inherited from body

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A unbroken string of text did not wrap without it. Guess I will check what can be done with inheritance.

max-width: 100%;
padding-right: 1rem;
Comment on lines +535 to +536
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it needs these two new styles?

I don't see difference.

Copy link
Member Author

@silverwind silverwind Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it, a unbroken line will wrap exactly at the end of the element, which looks visually unpleasing without any spacing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • padding-right: 1rem;: add extra space for wrapped content?
  • max-width: 100%;: what does this do?

}

.repository.view.issue .comment-list .timeline-item .comment-text-line .ui.label {
Expand Down Expand Up @@ -601,9 +604,6 @@ td .commit-summary {
width: 100%;
margin: 0;
}
.repository.view.issue .comment-list .comment .content .form .button:not(:last-child) {
margin-bottom: 1rem;
}
}

.repository.view.issue .comment-list .comment .merge-section {
Expand Down Expand Up @@ -654,13 +654,16 @@ td .commit-summary {

.repository.view.issue .comment-list .code-comment {
border: 1px solid transparent;
margin: 0;
margin: 0 -4px;
padding: 8px;
Comment on lines +657 to +658
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spaces are provided by .repository.view.issue .comment-list .ui.comments, so I think we should avoid the new negative margins.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk, the negative margin allows the item to "hang" slightly outside which is nice. Mabye there are better solutions, the current spacing is optimal imho.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good time to clean up legacy style conflicts, then it will be easier to make more UI improvements.

And we don't need to fully backport these changes.

}

.repository.view.issue .comment-list .code-comment .comment-header {
background: transparent;
border-bottom: 0;
padding: 0;
min-height: auto;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the min-height: 41px should be removed from .comment-header, then no need to add a new min-height: auto; here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the header of regular comments can naturally size to 41px, then yes, this woul not be needed.

Copy link
Contributor

@wxiaoguang wxiaoguang Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "min-height: 41px" is from #13463

Do you still remember the reason, maybe it is used to align the triangles? Maybe it's better to add some comments.

And the min-height: 41px can be only applied to .comment-header.avatar-content-left-arrow

margin-bottom: 4px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The margin can be provided by .repository.view.issue .comment-list .code-comment .comment-content, it already has other margin spaces.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, this margin is just to introduce a bit more whitespace between comment and header. Maybe a gap will also work.

}

.repository.view.issue .comment-list .code-comment .comment-content {
Expand Down Expand Up @@ -1286,9 +1289,9 @@ td .commit-summary {
box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important;
}

.comment:target .header::before {
.comment:target .comment-header::before {
border-right-color: var(--color-primary) !important;
filter: drop-shadow(-3px 0 0 var(--color-primary-alpha-30)) !important;
filter: drop-shadow(-4px 0 0 var(--color-primary-alpha-30)) !important;
}

.code-comment:target,
Expand Down Expand Up @@ -1339,7 +1342,7 @@ td .commit-summary {
.comment-header-right {
display: flex;
align-items: center;
gap: 0.5em;
gap: 6px;
}

.comment-header-right {
Expand Down
10 changes: 5 additions & 5 deletions web_src/css/repo/reactions.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
margin-left: 4px;
}

.ui.dropdown.select-reaction .menu {
min-width: 170px; /* item-outer-width * 4 */
.ui.dropdown.select-reaction .menu.visible {
display: grid !important;
grid-template-columns: repeat(4, 1fr);
padding: 4px;
}

.ui.dropdown.select-reaction .menu > .item {
float: left;
margin: 4px;
font-size: 20px;
width: 34px;
height: 34px;
font-size: 16px;
border-radius: var(--border-radius);
display: flex;
align-items: center;
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export default defineComponent({
<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 link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
<button class="ui basic small compact button link-action tw-shrink-0" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
{{ locale.rerun_all }}
</button>
</div>
Expand Down Expand Up @@ -520,7 +520,7 @@ export default defineComponent({
<span class="job-brief-name tw-mx-2 gt-ellipsis">{{ job.name }}</span>
</div>
<span class="job-brief-item-right">
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-2 link-action" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun"/>
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-2 link-action interact-fg" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun"/>
<span class="step-summary-duration">{{ job.duration }}</span>
</span>
</a>
Expand Down