Fix smart tariff scale toggle and active styling #7
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.
Motivation
0–maxandmin–maxmodes.25,6–38,2→25–39).vehicle-status-smartcostUI behave correctly when the switch is toggled.Description
assets/js/components/Tariff/SmartTariffBase.vueto use achart-scale-togglewrapper and added CSS to style the active toggle withvar(--evcc-green).displayCostRangeandformatRangeValuehelpers and switchedfmtTotalCostRange/fmtActiveCostRangeto use the display-aware range so the label reflectszerovsrangescale modes.assets/js/components/Tariff/TariffChart.vueto normalize the chart heights whenscaleMode === 'zero'by treating the minimum as0and adjusting the range accordingly.Testing
npm run devand it launched successfully.artifacts/smart-tariff-scale.png) which completed successfully.make test/npm run playwrightfull run) were executed as part of this change.assets/js/components/Tariff/SmartTariffBase.vueandassets/js/components/Tariff/TariffChart.vue.Codex Task