Skip to content

Commit 8b92d87

Browse files
awesomerobotjancernik
authored andcommitted
UX: fix admin dashboard link and style regressions (discourse#30969)
Heading link regression reported here: https://meta.discourse.org/t/admin-panel-reports-in-the-community-health-section-are-no-longer-clickable/347631 Also noticed some style regressions
1 parent 784ed04 commit 8b92d87

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

app/assets/javascripts/admin/addon/components/admin-report.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
{{#unless this.showNotFoundError}}
88
<DPageSubheader
99
@titleLabel={{this.model.title}}
10+
@titleUrl={{this.model.reportUrl}}
1011
@descriptionLabel={{this.model.description}}
1112
@learnMoreUrl={{this.model.description_link}}
1213
/>

app/assets/javascripts/discourse/app/components/d-page-subheader.gjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ export default class DPageSubheader extends Component {
2121
<template>
2222
<div class="d-page-subheader">
2323
<div class="d-page-subheader__title-row">
24-
<h2 class="d-page-subheader__title">{{@titleLabel}}</h2>
24+
<h2 class="d-page-subheader__title">
25+
{{#if @titleUrl}}
26+
<a href={{@titleUrl}} class="d-page-subheader__title-link">
27+
{{@titleLabel}}
28+
</a>
29+
{{else}}
30+
{{@titleLabel}}
31+
{{/if}}
32+
</h2>
2533
{{#if (has-block "actions")}}
2634
<div class="d-page-subheader__actions">
2735
{{#if this.site.mobileView}}

app/assets/stylesheets/common/admin/admin_report.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@
186186
}
187187
}
188188
}
189+
190+
.d-page-subheader__title a {
191+
color: var(--primary);
192+
}
189193
}
190194

191195
.rtl .admin-report {

app/assets/stylesheets/common/admin/dashboard.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,27 @@
150150
&.site-traffic {
151151
grid-column: span 12;
152152
}
153+
154+
.header {
155+
display: grid;
156+
grid-template-areas: "title trend" "description description";
157+
grid-template-columns: auto 1fr;
158+
159+
.d-page-subheader {
160+
display: contents;
161+
}
162+
163+
.d-page-subheader__description {
164+
grid-area: description;
165+
margin-top: 0;
166+
}
167+
168+
.trend {
169+
grid-area: trend;
170+
white-space: nowrap;
171+
align-self: start;
172+
}
173+
}
153174
}
154175

155176
@include breakpoint(medium) {

0 commit comments

Comments
 (0)