Skip to content

refactor: extract dashboard sections into widgets/dashboard/*#66

Merged
brandonpham13 merged 3 commits intomainfrom
feat/widgetize-dashboard-light
May 9, 2026
Merged

refactor: extract dashboard sections into widgets/dashboard/*#66
brandonpham13 merged 3 commits intomainfrom
feat/widgetize-dashboard-light

Conversation

@brandonpham13
Copy link
Copy Markdown
Owner

Light widgetization pass: each newspaper-style dashboard section moves into its own file under client/src/widgets/dashboard/. DashboardPage becomes a thin orchestrator that fetches data and composes widgets via props. No registry, no lazy loading.

Also drops the dead widgets/registry.ts + widgets/{LeagueStandings,PowerRankings,RecentScoreboard}/ tree — nothing imported from them after the dashboard rewrite.

File layout

client/src/widgets/dashboard/
├── _shared.tsx          # Eyebrow, SectionHead, SortHeader, MatchupResult,
│                        # teamName, teamAvatar, ordinal helpers
├── Ticker.tsx
├── Masthead.tsx
├── MyTeamSection.tsx    # Stat helper is private to this file
├── TopPerformers.tsx
├── LeagueTable.tsx
├── Scoreboard.tsx
└── PowerRankings.tsx

DashboardPage.tsx keeps the data-fetching and the section ordering/spacing.

Why this shape (vs. registry-based)

We considered a fuller registry-based widgetization (lazy chunks, 12-col grid, self-fetching widgets) on feat/widgetize-dashboard-registry. Picking light here because:

  • The newspaper layout is curated; user-rearrangement isn't on the near-term roadmap.
  • Props-down keeps a single owner of the dashboard's data and avoids per-widget Suspense / loading flicker.
  • Easy upgrade path later: each file already isolates its section, so wrapping with a registration shim would be additive rather than disruptive.

Test plan

  • Dashboard renders identically to before — no visual diff in light or dark mode.
  • Sortable headers still work in LeagueTable and PowerRankings.
  • Mobile (~375px) layout still stacks correctly; sidebar drawer behavior unchanged.
  • Empty state when no league is selected still shows "Sync a league".

🤖 Generated with Claude Code

Butter and others added 3 commits May 9, 2026 22:05
Each newspaper-style dashboard section now lives in its own file under
widgets/dashboard/, with shared helpers (Eyebrow, SectionHead, SortHeader,
MatchupResult, teamName, teamAvatar, ordinal) consolidated in _shared.tsx.
DashboardPage becomes a thin orchestrator that fetches data and composes
widgets.

Also drops the dead widgets/registry.ts + /widgets/{LeagueStandings,
PowerRankings,RecentScoreboard}/ tree — nothing imported from it after
the dashboard rewrite.

No behavior or visual changes intended.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
huddle Ready Ready Preview, Comment May 9, 2026 10:06pm

@brandonpham13 brandonpham13 merged commit 4f58eea into main May 9, 2026
3 checks passed
@brandonpham13 brandonpham13 deleted the feat/widgetize-dashboard-light branch May 9, 2026 22:06
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.

1 participant