Bug — pop-out chart routing
src/components/PopoutView.jsx routes charts by chartMode but uses a catch-all branch that renders <ChargingView> for any mode it doesn't explicitly handle:
selectedVehicles.length > 0 && chartMode !== 'compare' && chartMode !== 'specs' && chartMode !== 'roadtrip'
Consequences:
- Spec Scatter (
chartMode === 'specscatter') falls through to the catch-all, so the pop-out shows the Charging chart instead of the scatter. PopoutView doesn't import SpecsScatterView at all.
- EPA Curves (
chartMode === 'epacurves') matches both the catch-all (→ ChargingView) and its own epacurves branch (→ EpaCurvesView), so two charts render at once.
- Range survives only by luck —
ChargingView internally delegates to RangeChartView when chartMode === 'range'.
Steps to reproduce
- Select vehicles, open the Charts tab.
- Go to Spec Scatter (or EPA Curves) and click ⧉ Open Chart in New Window.
- Spec Scatter: the pop-out shows the Charging line chart. EPA Curves: two charts render.
Expected
Each sub-tab's pop-out renders its own chart, once.
Suggested fix
Replace the catch-all in PopoutView with explicit per-mode handling:
- Import + render
SpecsScatterView for specscatter (mirror src/App.jsx, pass presentationMode).
- Scope the
ChargingView branch to the modes it actually handles (charging/range) so epacurves and specscatter don't fall into it.
SpecsScatterView already accepts a presentationMode prop (added in #127) that hides the help bubble in the pop-out.
Related housekeeping (lower priority, mostly cosmetic)
Inconsistencies across the 7 Charts sub-tabs, noted while adding the help bubbles (#127). Optional — listed for context, not all worth doing:
bar / line / scatter render differences are inherent and intentionally left as-is.
Context: follow-up to #127 (chart help bubbles).
Bug — pop-out chart routing
src/components/PopoutView.jsxroutes charts bychartModebut uses a catch-all branch that renders<ChargingView>for any mode it doesn't explicitly handle:Consequences:
chartMode === 'specscatter') falls through to the catch-all, so the pop-out shows the Charging chart instead of the scatter.PopoutViewdoesn't importSpecsScatterViewat all.chartMode === 'epacurves') matches both the catch-all (→ChargingView) and its ownepacurvesbranch (→EpaCurvesView), so two charts render at once.ChargingViewinternally delegates toRangeChartViewwhenchartMode === 'range'.Steps to reproduce
Expected
Each sub-tab's pop-out renders its own chart, once.
Suggested fix
Replace the catch-all in
PopoutViewwith explicit per-mode handling:SpecsScatterViewforspecscatter(mirrorsrc/App.jsx, passpresentationMode).ChargingViewbranch to the modes it actually handles (charging/range) soepacurvesandspecscatterdon't fall into it.SpecsScatterViewalready accepts apresentationModeprop (added in #127) that hides the help bubble in the pop-out.Related housekeeping (lower priority, mostly cosmetic)
Inconsistencies across the 7 Charts sub-tabs, noted while adding the help bubbles (#127). Optional — listed for context, not all worth doing:
.specs-chart-card(vs.card), noAxisScaleControls/ Auto-Color toggle.bar / line / scatter render differences are inherent and intentionally left as-is.
Context: follow-up to #127 (chart help bubbles).