Skip to content

feat(citations): move Source Types into a sources-card tab, full-width card - #488

Merged
gkhngyk merged 1 commit into
mainfrom
feature/source-types-tab
Jul 20, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feature/source-types-tab

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

On /dashboard/citations the Source Types donut lived in its own lg:col-span-2 card beside the sources card. At common widths the donut + legend overflowed and forced horizontal page scroll, while the page's main content (Domains / URLs / Competitor Gaps tables) was squeezed into 3/5 of the width.

  • The donut is now a fourth Source Types tab in the sources card, after Competitor Gaps, rendering the existing SourceTypeDonut with the same sourceTypeBreakdown / totals.domains props.
  • The right-hand card and the lg:grid-cols-5 wrapper are gone — the sources card spans the full content width.
  • The new panel is keepMounted like Domains/URLs (its data arrives with the same payload, per the perf(citations): make Domains/URLs tab switching instant (keepMounted + memo, not a skeleton) #299 convention); Competitor Gaps keeps its lazy load on activation.
  • The donut is capped at max-w-md and centered so the full-width panel can't dwarf it or introduce overflow at any viewport width.
  • CitationsSkeleton mirrors the new single-card layout; CSV export stays disabled on the non-table tabs (Gaps and now Types).

Related issue

Closes #486

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open /dashboard/citations — the sources card spans the full content width and shows four tabs: Domains / URLs / Competitor Gaps / Source Types.
  2. Open the Source Types tab — the same donut + legend the removed side card showed, centered, with no horizontal scroll at any viewport width (check narrow laptop widths where the old layout overflowed).
  3. Domains/URLs pagination and the Competitor Gaps lazy load work unchanged; date/platform filters re-filter all four tabs.
  4. Export CSV is enabled on Domains/URLs and disabled on Competitor Gaps and Source Types.
  5. Reload the page — the loading skeleton is a single full-width card.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

…h card (#486)

The Source Types donut lived in its own lg:col-span-2 card beside the
sources card; at common widths the donut + legend overflowed and forced
horizontal page scroll, while the page's main tables were squeezed into
3/5 of the content width.

The donut is now a fourth tab (after Competitor Gaps) in the sources
card, which spans the full content width. The panel is keepMounted like
Domains/URLs since its data arrives with the same payload; Competitor
Gaps keeps its lazy load. The donut is capped at max-w-md and centered
so the full-width panel can't dwarf it or overflow. CitationsSkeleton
now mirrors the single-card layout, and CSV export stays disabled on
the non-table tabs.
@gkhngyk
gkhngyk merged commit 77c98f2 into main Jul 20, 2026
5 checks passed
@gkhngyk
gkhngyk deleted the feature/source-types-tab branch July 20, 2026 01:50
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.

Citations: move the Source Types chart into a tab so the sources card can go full width

1 participant