Skip to content

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

Closed

Description

@gkhngyk

Problem

On /dashboard/citations the Source Types donut lives in its own card to the right of the sources card (grid lg:grid-cols-5: sources lg:col-span-3, Source Types lg:col-span-2 — web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx ~line 1606). Two problems:

  1. The donut + legend don't fit the narrow 2/5 column at common widths and force horizontal page scroll.
  2. The sources card — the page's main content (Domains / URLs / Competitor Gaps tables) — is squeezed to 3/5 width for the sake of a secondary chart.

Fix

  • Add a Source Types tab to the existing tab list in the sources card, after Competitor Gaps, rendering the existing SourceTypeDonut (same data?.sourceTypeBreakdown / totals.domains props).
  • Remove the right-hand Source Types card and the lg:grid-cols-5 wrapper so the sources card spans the full content width.
  • Update CitationsSkeleton to match the new single-card layout.
  • Follow the existing tab conventions in that card: the data is already in memory, so keepMounted is fine (see the perf(citations): make Domains/URLs tab switching instant (keepMounted + memo, not a skeleton) #299 comment on the Domains/URLs panels); Competitor Gaps lazy-loads on activation and must keep doing so.
  • With the full card width available, let the donut/legend breathe — the tab panel must not introduce its own horizontal overflow at any viewport width.

Acceptance criteria

  • No horizontal page scroll on /dashboard/citations at any viewport width.
  • The sources card spans the full content width; its tabs are Domains / URLs / Competitor Gaps / Source Types.
  • The Source Types tab shows the same breakdown the removed card showed.
  • Domains/URLs pagination, the Competitor Gaps lazy load, and the date/platform filters all keep working unchanged.
  • yarn lint, yarn typecheck, yarn format:check pass from web/.

Getting started

See CONTRIBUTING.md for setup. Comment here to claim the issue before opening a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions