Repository navigation
fix(numeric): apply Show Background Graph without a rebuild - #712
Conversation
The options dialog reconfigures a placed widget in place, but showMiniChart was only written at construction and behind the subscription effect's signature guard, which ignores that option. Derive it from the runtime options instead, and drop the minigraph effect's never-empty signature string: setMiniGraph already reads everything the effect needs to track. Fixes #594 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKFfJCv7rbzXcAYj1DZocd
The extremes are tracked in SI and converted with the measure current when drawn, so a live unit-preference change re-expresses them rather than leaving Celsius numbers under a Fahrenheit reading. Pin that with the scenario from the issue. Closes #575 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKFfJCv7rbzXcAYj1DZocd
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code reviewScope: Reviewers (model: Opus 5.5, inherited from session; all at once, 7d r 2.05):
Findings
Applied fixes
Residual risks
ScreenshotsThe UI reviewer drove the real flow at 1440x900 (mat-menu) and 390x844 (bottom sheet, touch): edit mode, widget Settings, toggle, Save, through on, off, on, done editing, edit again, off. Every time the option was on, Coverage
Verdict: Ready to merge once CI passes on |
|
Pushed |
Drive the real minigraph effect: a graph option changed in place and a switch of the effective unit must both reach the rendered MinigraphComponent and restart it, while an unrelated option leaves the graph fields alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKFfJCv7rbzXcAYj1DZocd
e4260b4 to
3e0f1e1
Compare
|
Follow-up review of the test commit ( |
Summary
Toggling Show Background Graph on a placed Numeric widget had no effect until the widget was rebuilt (issue 594). The options dialog reconfigures the widget in place, but
showMiniChartwas a signal written only at construction and on a path change. It is nowcomputedfromruntime.options(), so the graph appears and disappears as the option is toggled. The writes and the never-emptyminiGraphSignatureguard are removed. The mini-graph effect still re-runs on option, unit and range changes, becausesetMiniGraphreads them inside the effect.Issue 575 (Min/Max kept in the old unit after a live unit switch) is already fixed on main by the SI refactor: the extremes are kept in SI and formatted in the current measure. This PR adds a regression test that pins it.
UX
Classification: UI in scope: UX section only. The existing option now takes effect immediately.
Flows: open a placed Numeric widget's settings, toggle Show Background Graph, then Save. The graph appears or disappears without a reload.
Screens and states: with the graph on, the mini graph is drawn behind the value. With it off, there is no graph. Nothing else changes.
Layout intent: existing layout kept. Design system followed: unchanged widget.
Viewports and accessibility: 390x844 and 1440x900. No new controls.
Testing
npm run cipasses: 3279 unit tests and 40 schema tests.showMiniChartfalse → true → false through the runtime options signal (asapplyRuntimeConfigdoes), and checks for the<minigraph>element after each step. It failed before the fix, at the false → true step.celsius(Min: 11.8 Max: 13.2), then one taggedfahrenheit, and expects54.2withMin: 53.2 Max: 55.8and the mini graph infahrenheit. It passes against main's component too, which is the evidence that 575 is fixed there.Closes #594
Closes #575
🤖 Generated with Claude Code
https://claude.ai/code/session_01GKFfJCv7rbzXcAYj1DZocd