UI: Fix broken Y axis after graph page reload#17869
Merged
Conversation
The new `y_axis_min` setting was always encoded into the URL, even if its value was `null` (in which case it would be set to an empty string parameter). On the decoding side, this wasn't taken into account correctly, and we tried to parse the empty string as a float, causing completely broken graphs showing nothing after reloading the graph page with such URL parameters. I'm doing two things now: * For the future, only encode the Y axis min into the URL if it's set at all, similar as we do for the `end_input` and `moment_input` fields. * On the decoding side, accommodate people (at least for now) who already saved some links with the empty `y_axis_min` parameter by treating an empty string as `null` instead of a number. Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Member
Author
|
Disclaimer: I threw in some Claude-one-shot-generated unit tests as well for good measure - they are maybe a bit overly detailed, but they do make sense to me. |
Nexucis
approved these changes
Jan 16, 2026
This was referenced Feb 1, 2026
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.
The new
y_axis_minsetting was always encoded into the URL, even if its value wasnull(in which case it would be set to an empty string parameter). On the decoding side, this wasn't taken into account correctly, and we tried to parse the empty string as a float, causing completely broken graphs showing nothing after reloading the graph page with such URL parameters.I'm doing two things now:
end_inputandmoment_inputfields.y_axis_minparameter by treating an empty string asnullinstead of a number.Does this PR introduce a user-facing change?