Skip to content

Conversation

@abrahamwolk
Copy link
Collaborator

@abrahamwolk abrahamwolk commented Jan 22, 2026

This pull request implements a bugfix for the Linear Meter widget: before this pull request, when no range was specified by the user and the PV values don't contain information about the range to display, the Linear Meter would erratically switch between the default range of [0.0, 100.0] and a dynamically computed range based on observed values. The reason was a missing check for whether values had been observed yet or not by the Linear Meter upon which to compute a scale.

This pull request fixes the erratic switching of the range by only using setting the range to the default range [0.0, 100.0] if there are no observed values to base the range on. (If there are observed values to base the range on, the range is set to [observedMin - 1, obeservedMax + 1].)

I have tested the bugfix manually.

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

…0.0, 100.0] should only be set if there are no observed values to base the range on.
@jacomago
Copy link
Contributor

I would prefer the PR message in the commit, and the commit message being the PR message. i.e. the git repository is the source of truth of what and why something happened rather than github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants