Skip to content

feat(ui): add shared analytics-card skeleton + empty-state shell (#2200) - #4699

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:feat/ui-analytics-card-shell
Jul 10, 2026
Merged

feat(ui): add shared analytics-card skeleton + empty-state shell (#2200)#4699
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:feat/ui-analytics-card-shell

Conversation

@dhgoal

@dhgoal dhgoal commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds a shared analytics-card skeleton + empty-state treatment (Closes #2200).

New AnalyticsCardShell (apps/gittensory-ui/src/components/site/app-panels/analytics-card-shell.tsx): a titled analytics card that renders one of three states — a skeleton shimmer while the metric loads, an EmptyState with a hint when it has no data, or its ready content — so the new analytics cards share one loading/empty look instead of each re-inventing it. Presentational only; the caller decides the state from its own data.

Adoption: the analytics route's cycle-time slot now renders the shared empty card (with a hint) when its data is absent, instead of rendering nothing.

UI Evidence

Rendered with the app's compiled stylesheet; .dark theme toggled on the document. Desktop (1440) and mobile (390) at 2× DPR.

State Light Dark
Ready — desktop
Empty — desktop
Loading (skeleton) — desktop
Ready — mobile
Empty — mobile

Test

analytics-card-shell.test.tsx — ready (title + description + content), empty (title + hint, no ready content), loading (skeletons, no ready content), and no-description. 4 tests pass. ui:typecheck + ui:build green; new files prettier + eslint clean.

…Nbored#2200)

New AnalyticsCardShell: a titled analytics card that renders one of three states — a skeleton shimmer
while the metric loads, an EmptyState with a hint when it has no data, or its ready content — so the
analytics cards share one loading/empty treatment instead of each re-inventing it. Presentational only.
Adopted in the analytics route: the cycle-time slot now shows the shared empty card when its data is
absent instead of rendering nothing.

Closes JSONbored#2200
@dhgoal
dhgoal requested a review from JSONbored as a code owner July 10, 2026 14:06
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 10, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 10, 2026
@loopover-orb

loopover-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-10 20:34:24 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · unstable

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Adds a shared AnalyticsCardShell component (loading/empty/ready states) and adopts it for the cycle-time card's empty state in app.analytics.tsx, replacing a prior null-render with a titled empty-state card plus hint text. The component is simple, purely presentational, and is exercised by tests for all three states plus the no-description case; the only behavioral change is narrowly scoped to the cycle-time slot exactly as described. No correctness, security, schema, or migration issues are visible in the diff.

Nits — 5 non-blocking
  • The PR description frames this as a shell for 'every analytics card' but only the cycle-time slot in app.analytics.tsx:187-196 actually adopts it — worth confirming whether wider adoption (gate-precision, usage panels) is planned as a follow-up or intentionally out of scope for feat(ui): shared analytics-card empty + loading skeleton states #2200.
  • EmptyState's description prop behavior isn't visible in this diff — confirm it renders both plain strings and ReactNode consistently with the emptyHint usage here.
  • The loading skeleton in analytics-card-shell.tsx always renders exactly 3 placeholders regardless of the eventual ready-content shape; fine today but could use a column-count prop if adopted by a card with a different layout.
  • Consider parameterizing the skeleton column count (default 3) before adopting this shell more broadly.
  • External brief flags 'feat(ui): shared analytics-card empty + loading skeleton states #2200 coverage: partial' — worth double-checking the linked issue's scope matches exactly this single-card adoption before merge.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2200
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 94 registered-repo PR(s), 53 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor dhgoal; Gittensor profile; 94 PR(s), 7 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: dhgoal
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 94 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/app/analytics desktop before /app/analytics after /app/analytics
/app/analytics mobile before /app/analytics (mobile) after /app/analytics (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@JSONbored
JSONbored merged commit aab1f12 into JSONbored:main Jul 10, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Development

Successfully merging this pull request may close these issues.

feat(ui): shared analytics-card empty + loading skeleton states

2 participants