Skip to content

Implement Chart Style Options Menu#378

Open
PauloMFJ wants to merge 2 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/chart-style-options-menu
Open

Implement Chart Style Options Menu#378
PauloMFJ wants to merge 2 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/chart-style-options-menu

Conversation

@PauloMFJ

Copy link
Copy Markdown
Contributor

Overview

Adds the chart-style options menu to chart cards, reachable from the card's action bar.

What's new

  • MenuChartOptions — a radio menu (bar vertical / bar horizontal / line) with Cancel / Update, opened via the chart-options action and dismissible by Escape, backdrop, or Cancel.
  • New icons: bar_chart_vertical, bar_chart_horizontal, line_graph_double; renamed bar_chart → bar_chart_outlined and line_graph → line_graph_single.

Refactor

  • Each card variant (CardChart, CardText) now owns its own Card.Base — actions, content, footer, and (for charts) the menu — instead of the atlas shape assembling them. The shape just selects the variant and passes in id + content/state. Promotes - Card.Footer to a shared element.
  • The chart-options action and isStyleMenuOpen live together in CardChart, so the button toggles the menu directly.

Screenshot

image

@PauloMFJ PauloMFJ self-assigned this Jun 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the card component architecture by shifting the responsibility of rendering actions, content, and footers from the shape utility down to the specific card variants (Card.Text and Card.Chart). It also introduces a new MenuChartOptions component to support switching chart styles. The review feedback highlights a few issues: a missing ref attachment on the dialog container which breaks the focus trap, a missing auto-close behavior when confirming a chart style, and a regression where an undefined card variant no longer falls back to rendering text.

Comment thread dataweaver/apps/web/src/components/elements/card/chart/chart.tsx Outdated
Comment thread dataweaver/apps/web/src/components/scopes/atlas/shapes/card.tsx
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