Skip to content

A platform for community discussion. Free, open, simple.

UX: allow too large reports on dashboard to scroll, improve sentiment (#43844)

Kriseb46cffe8125
diff --git a/app/assets/stylesheets/admin/dashboard/reports.scss b/app/assets/stylesheets/admin/dashboard/reports.scss
index 4ff00bf8df6..9f72e384621 100644
--- a/app/assets/stylesheets/admin/dashboard/reports.scss
+++ b/app/assets/stylesheets/admin/dashboard/reports.scss
@@ -15,6 +15,21 @@
@include viewport.until(sm) {
padding-inline: 0;
+ padding-bottom: 0;
+
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: -1px;
+ left: 0;
+ right: 0;
+ background: linear-gradient(
+ to bottom,
+ rgb(var(--secondary-rgb), 0),
+ rgb(var(--secondary-rgb), 0.5)
+ );
+ height: var(--space-2);
+ }
}
&.--wide {
@@ -120,6 +135,7 @@
}
&__header {
+ position: relative;
display: flex;
align-items: center;
gap: var(--space-2);
@@ -127,6 +143,21 @@
@include viewport.until(sm) {
padding-inline: var(--space-4);
+
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: calc(var(--space-4) * -1);
+ left: 0;
+ right: 0;
+ background: linear-gradient(
+ to top,
+ rgb(var(--secondary-rgb), 0),
+ rgb(var(--secondary-rgb), 0.5)
+ );
+ height: var(--space-2);
+ z-index: 1;
+ }
}
}
@@ -166,7 +197,7 @@
}
&__chart {
- overflow: hidden;
+ overflow: auto;
flex: 1 1 auto;
min-height: 0;
diff --git a/plugins/discourse-ai/assets/stylesheets/modules/sentiment/common/dashboard.scss b/plugins/discourse-ai/assets/stylesheets/modules/sentiment/common/dashboard.scss
index 97b10abf769..c8c38903dc2 100644
--- a/plugins/discourse-ai/assets/stylesheets/modules/sentiment/common/dashboard.scss
+++ b/plugins/discourse-ai/assets/stylesheets/modules/sentiment/common/dashboard.scss
@@ -202,16 +202,24 @@
display: none;
}
+ tbody tr {
+ &:last-child {
+ border: none;
+ }
+
+ td {
+ padding: 0;
+ }
+ }
+
&__row {
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: var(--space-2);
row-gap: var(--space-2);
- padding: var(--space-3);
+ padding: var(--space-1) var(--space-3) var(--space-3);
margin-bottom: var(--space-2);
- border: 1px solid var(--primary-low);
- border-radius: var(--d-border-radius);
}
&__title {
@@ -224,6 +232,11 @@
.sentiment-horizontal-bar {
flex: 1 1 100%;
+ padding: 0;
+ }
+
+ [class*="sentiment-horizontal-bar__"] {
+ padding: var(--space-1);
}
}
}