Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HistogramWidget with one non-zero bucket #901

Merged

Conversation

zbigg
Copy link
Contributor

@zbigg zbigg commented Sep 11, 2024

Description

Shortcut: https://app.shortcut.com/cartoteam/story/439218

Fix HistogramWidgetUI component to support case, where there is only one non-zero bucket but ticks and range is proper (min != max).

Fixes regression introduced in #653, where support for uniform values case was too broad:
By uniform values it means:

  • all values same,
  • so min === max,
  • so all ticks are equal (and only last value matters condition was too wide.

Note, original case from #653 where column has uniform value was tested in builder.

Stories for a test.

Type of change

  • Fix

Acceptance

  1. Go to storybook for HistogramWidgetUI.
  2. Change all but one data entries to 0
  3. Widget should render properly with one bar.

Basic checklist

  • Good PR name
  • Shortcut link
  • Changelog entry
  • Just one issue per PR
  • GitHub labels
  • Proper status & reviewers
  • Tests
  • Documentation

Copy link

github-actions bot commented Sep 11, 2024

Pull Request Test Coverage Report for Build 10812628010

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.006%) to 70.958%

Totals Coverage Status
Change from base Build 10792833099: -0.006%
Covered Lines: 2839
Relevant Lines: 3682

💛 - Coveralls

Copy link

github-actions bot commented Sep 11, 2024

Visit the preview URL for this PR (updated for commit 6c97ebb):

https://cartodb-fb-storybook-react-dev--pr901-bug-sc-439218-ux-6as5rtou.web.app

(expires Wed, 18 Sep 2024 13:31:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c

@zbigg zbigg force-pushed the bug/sc-439218/ux-histogram-bucket-disappears-in-the-ui branch from 949debc to 6c97ebb Compare September 11, 2024 13:25
Copy link
Contributor

@jmgaya jmgaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@zbigg zbigg merged commit 091b6a3 into master Sep 12, 2024
3 checks passed
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.

2 participants