Skip to content

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

UX: Match Site Traffic Explorer loading skeleton

Alan Guo Xiang Tan9bae212d41c3
diff --git a/app/assets/stylesheets/admin/dashboard/site-traffic-explorer.scss b/app/assets/stylesheets/admin/dashboard/site-traffic-explorer.scss
index de2b115ae1c..56091011eab 100644
--- a/app/assets/stylesheets/admin/dashboard/site-traffic-explorer.scss
+++ b/app/assets/stylesheets/admin/dashboard/site-traffic-explorer.scss
@@ -49,7 +49,19 @@
.db-skeleton__heading-line {
width: min(24rem, 100%);
- height: 2rem;
+ height: 1.625rem;
+ }
+
+ .db-skeleton__metric {
+ gap: var(--space-1);
+ }
+
+ .db-skeleton__metric-number {
+ height: 2.125rem;
+ }
+
+ .db-skeleton__metric-label {
+ height: 1.22rem;
}
.db-skeleton__chart {
@@ -57,6 +69,18 @@
min-height: 260px;
}
+ .db-skeleton__row-block-title {
+ height: 2.4rem;
+ }
+
+ .db-skeleton__list {
+ gap: 0;
+ }
+
+ .db-skeleton__list-row {
+ min-height: 1.72rem;
+ }
+
@include viewport.until(md) {
.db-skeleton__subheader {
flex-direction: column;
diff --git a/frontend/discourse/admin/components/site-traffic-explorer.gjs b/frontend/discourse/admin/components/site-traffic-explorer.gjs
index 6cf5a70eecb..828d91130c1 100644
--- a/frontend/discourse/admin/components/site-traffic-explorer.gjs
+++ b/frontend/discourse/admin/components/site-traffic-explorer.gjs
@@ -14,7 +14,7 @@ import I18n, { i18n } from "discourse-i18n";
const SKELETON_METRICS = Array.from({ length: 4 });
const SKELETON_BREAKDOWNS = Array.from({ length: 3 });
-const SKELETON_ROWS = Array.from({ length: 5 });
+const SKELETON_ROWS = Array.from({ length: 8 });
const TRAFFIC_TYPE_BY_SERIES = {
page_view_logged_in_browser: "logged_in",
page_view_anon_browser: "anonymous",