Skip to content

Design/analytics#136

Open
johnsmccain wants to merge 3 commits intoPredictify-org:mainfrom
johnsmccain:design/analytics
Open

Design/analytics#136
johnsmccain wants to merge 3 commits intoPredictify-org:mainfrom
johnsmccain:design/analytics

Conversation

@johnsmccain
Copy link
Copy Markdown

markdown

feat(design): analytics layout and chart style guide

Summary

Implements the analytics page layout with KPI cards, chart panels, and
shared chart style rules. Covers both mobile and desktop breakpoints.

Changes

  • components/analytics/kpi-card.tsx — KPI card with label, value,
    unit, delta indicator, and info tooltip
  • components/analytics/chart-panel.tsx — Consistent wrapper for all
    chart panels (title, description, responsive height)
  • components/analytics/chart-styles.ts — Single source of truth for
    colors, axis ticks, grid, tooltip, and margins
  • components/analytics/volume-chart.tsx — Line chart: monthly
    prediction volume with XLM-labelled Y-axis
  • components/analytics/distribution-chart.tsx — Horizontal bar chart:
    market category share with %-labelled X-axis
  • app/(dashboard)/analytics/page.tsx — Analytics page wiring KPI
    strip and both chart panels

Layout

  • KPI strip: 2 columns on mobile → 4 columns on desktop
  • Charts: stacked on mobile → 3:2 split on desktop

Chart style rules

  • Colors: --chart-1…5 CSS variables (theme-consistent)
  • Axes: 11px, muted-foreground, no axis/tick lines
  • Grid: dashed, 50% opacity
  • Tooltips: unit-formatted via ChartTooltipContent

Testing

  • pnpm exec tsc --noEmit passes (no new type errors)
  • Preview at /analytics with pnpm dev-

Close #115

Branch

design/analyticsmain

- Add MarketCardSkeleton / MarketsListSkeleton for markets widget
- Add EventDetailSkeleton for event detail page
- EventsTableSkeleton already existed; wired via loading.tsx
- Add AsyncButton: inline spinner + loading text, no layout shift
- Add ErrorBanner: destructive alert with optional Retry action
- Wire EventDetailSkeleton + ErrorBanner into event-page/page.tsx
- Wire ErrorBanner + retry into EventsSection (events-store error state)
- Add /loading-patterns demo page covering all 3 core surfaces
- KpiCard: label, value, unit, delta, tooltip — 2-col mobile / 4-col desktop grid
- ChartPanel: consistent title/description/responsive height wrapper
- chart-styles.ts: shared colors, axis tick, grid, tooltip, margin constants
- VolumeChart: line chart with XLM Y-axis label and formatted tooltip
- DistributionChart: horizontal bar chart with % X-axis and per-category colors
- analytics/page.tsx: full page wiring KPI strip + both chart panels
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

@johnsmccain is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Apr 2, 2026

@johnsmccain Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design: Analytics dashboard layout and chart style guide

1 participant