Skip to content

Fix comment header padding #33377

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

Merged
merged 5 commits into from
Jan 24, 2025
Merged
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/diff/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
<div class="comment-header">
<div class="comment-header-left tw-flex tw-items-center">
{{if .OriginalAuthor}}
<span class="text black tw-font-semibold tw-mr-1">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
<div class="comment-header" role="heading" aria-level="3">
<div class="comment-header-left tw-flex tw-items-center">
{{if .Issue.OriginalAuthor}}
<span class="text black tw-font-semibold">
Expand Down
10 changes: 5 additions & 5 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
<div class="comment-header" role="heading" aria-level="3">
<div class="comment-header-left tw-flex tw-items-center">
{{if .OriginalAuthor}}
<span class="text black tw-font-semibold tw-mr-1">
Expand Down Expand Up @@ -393,7 +393,7 @@
{{if or .Content .Attachments}}
<div class="timeline-item comment">
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
<div class="comment-header">
<div class="comment-header-left tw-flex tw-items-center">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
Expand Down Expand Up @@ -633,8 +633,8 @@
</div>
{{if .Content}}
<div class="timeline-item comment">
<div class="content">
<div class="ui top attached header comment-header-left tw-flex tw-items-center arrow-top">
<div class="content comment-container">
<div class="comment-header arrow-top">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
{{ctx.AvatarUtils.Avatar .Poster 24}}
Expand All @@ -644,7 +644,7 @@
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
</span>
</div>
<div class="ui attached segment">
<div class="ui attached segment comment-body">
<div class="render-content markup">
{{if .RenderedContent}}
{{.RenderedContent}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content/conversation.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{{$createdSubStr:= DateUtils.TimeSince .CreatedUnix}}
<div class="comment code-comment" id="{{.HashTag}}">
<div class="content comment-container">
<div class="header comment-header">
<div class="comment-header">
<div class="comment-header-left tw-flex tw-items-center">
{{if not .OriginalAuthor}}
<a class="avatar">
Expand Down
8 changes: 2 additions & 6 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1480,16 +1480,12 @@ td .commit-summary {
}

.comment-header {
border: none !important;
background: var(--color-box-header);
border-bottom: 1px solid var(--color-secondary) !important;
font-weight: var(--font-weight-normal) !important;
padding: 0.5rem 1rem;
margin: 0 !important;
border-bottom: 1px solid var(--color-secondary);
padding: 0 1rem;
position: relative;
color: var(--color-text);
min-height: 41px;
background-color: var(--color-box-header);
Copy link
Member

@silverwind silverwind Jan 24, 2025

Choose a reason for hiding this comment

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

bg not needed?

Copy link
Member

Choose a reason for hiding this comment

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

Ah nvm, I see duplicate. Linter should have caught that.

Copy link
Member

Choose a reason for hiding this comment

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

Opened stylelint/stylelint#8349 for the linter fyi.

display: flex;
justify-content: space-between;
align-items: center;
Expand Down
Loading