fix: render view switcher inline in each chart's header row - #123
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
headerActionsrendu 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.