Skip to content

fix: render view switcher inline in each chart's header row - #123

Merged
Flotapponnier merged 1 commit into
mainfrom
fix/switcher-inline-chart-header
May 23, 2026
Merged

fix: render view switcher inline in each chart's header row#123
Flotapponnier merged 1 commit into
mainfrom
fix/switcher-inline-chart-header

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

User: '\sur la meme ligne que le debut du texte titre, tout a droite sur tous, ne hide rien et meme position'.

Chaque chart accepte maintenant un slot headerActions rendu en bout de sa header row. BenchmarkBody y passe le <ViewSwitcher>. Plus d'absolute positioning, plus de footer row, plus de chevauchement avec la légende / reset button. Position cohérente sur les 5 vues.

User reported the absolute-corner placement was overflowing the
chart's own header content on distribution / ranked-bar (which already
had a legend / reset button on the right) and floating awkwardly
where the chart had nothing to anchor to (timeseries / donut). The
'same-line as the title text, all-right-aligned, consistent position'
ask only works if the switcher participates in the chart's own
header flex row.

Each chart component now takes an optional headerActions slot that
renders in the right-aligned end of its header row, beside whatever
chart-specific control already lives there:

  - DistributionChart  : after MarkerLegend
  - DonutChart         : after the 'N of M live' counter
  - RankedBarChart     : after the optional reset button
  - TimeSeriesChart    : new header row, after the metric label
  - CountLeaderboard   : new 'Leaderboard' header row when actions present

BenchmarkBody passes <ViewSwitcher> as headerActions on every render
path. No more absolute positioning, no more footer row, no overlap
with chart-specific UI. The switcher lands at the same x-position
across all views.
@Flotapponnier
Flotapponnier merged commit ca9eb90 into main May 23, 2026
@Flotapponnier
Flotapponnier deleted the fix/switcher-inline-chart-header branch May 23, 2026 14:40
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