A platform for community discussion. Free, open, simple.
UX: admin report heading alignment adjustments, reactions report fix (#37392)
Kris08f7b5f36acd
diff --git a/app/assets/stylesheets/admin/admin_report_table.scss b/app/assets/stylesheets/admin/admin_report_table.scssindex ba1c5082e97..a09ba67e943 100644--- a/app/assets/stylesheets/admin/admin_report_table.scss+++ b/app/assets/stylesheets/admin/admin_report_table.scss@@ -9,7 +9,6 @@.table .admin-report-table-cell:last-child,.table .admin-report-table-header:last-child {- display: inline-block;width: 80%;text-align: right;}@@ -26,12 +25,33 @@}.table .admin-report-table-header {+ --header-caret-offset: calc(var(--space-4) * -1);+ overflow-wrap: break-word;++ &.date {+ width: 6em;+ }+.sort-btn {padding: 0;flex-direction: row-reverse;gap: var(--space-1);+ position: relative;++ .d-icon {+ // avoiding the appearance of the icon affecting alignment+ position: absolute;+ margin: 0;+ right: var(--header-caret-offset);+ }+ }- @include ellipsis;+ &:last-child {+ .sort-btn {+ .d-icon {+ left: var(--header-caret-offset);+ }+ }}&.is-current-sort {@@ -42,6 +62,7 @@&:not(.is-current-sort) .sort-btn {.d-icon {+ // avoiding the appearance of the icon changing column sizevisibility: hidden;}}diff --git a/frontend/discourse/admin/components/admin-report-table-header.gjs b/frontend/discourse/admin/components/admin-report-table-header.gjsindex ba9aca3a633..a98879cc78b 100644--- a/frontend/discourse/admin/components/admin-report-table-header.gjs+++ b/frontend/discourse/admin/components/admin-report-table-header.gjs@@ -47,10 +47,14 @@ export default class AdminReportTableHeader extends Component {<DButton@action={{@sortByLabel}}@icon={{this.sortIcon}}- @translatedLabel={{@label.title}}+ @translatedLabel={{unless @label.htmlTitle @label.title}}@translatedTitle={{this.sortButtonTitle}}class="btn-primary btn-transparent sort-btn"- />+ >+ {{#if @label.htmlTitle}}+ <span class="d-button-label">{{htmlSafe @label.htmlTitle}}</span>+ {{/if}}+ </DButton>{{else if @label.htmlTitle}}<span class="title">{{htmlSafe @label.htmlTitle}}</span>{{else}}diff --git a/plugins/discourse-reactions/plugin.rb b/plugins/discourse-reactions/plugin.rbindex 179ac4b1332..ec694d4ef2a 100644--- a/plugins/discourse-reactions/plugin.rb+++ b/plugins/discourse-reactions/plugin.rb@@ -299,6 +299,7 @@ after_initialize do{type: :number,property: :like_count,+ title: main_id,html_title: PrettyText.unescape_emoji(CGI.escapeHTML(":#{main_id}:")),},]@@ -309,6 +310,7 @@ after_initialize doreport.labels << {type: :number,property: "#{reaction}_count",+ title: reaction,html_title: PrettyText.unescape_emoji(CGI.escapeHTML(":#{reaction}:")),}end