jfrancos-mai opened a new pull request, #24012: URL: https://github.com/apache/superset/pull/24012
### SUMMARY `antd`'s slider, as used in dashboard filters, has a step size of 1 (`antd`'s default). So when the entire range of numbers is within 1, the slider is inoperable. A few possible solutions -- I chose option (3): 1. Set the step size to something static that fixes this particular issue, like .01. This makes things better for this case, but worse for cases where a step size of `1` is sufficient. 2. Let the user choose a step size in the filter setup dialog. Nice because it makes things explicit, but adds extra UI stuff and users have to make extra decisions. 3. Come up with a heuristic for choosing a step size. Nice because it works by default, and without any extra work from the user. If we want the user to be able to choose their own step size, that would be a feature rather than a bug fix (and seems to be in-progress [here](https://github.com/apache/superset/pull/18009 )) This solution preserves the default behavior where the rightmost digit moves up and down by 1, while accounting for the cases where that 1 ought to be after the decimal point. The calculated step-size is the largest such number (but not larger than `1`) that accommodates the minimum number of steps we'd want to have (`MIN_NUM_STEPS`) ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF ...in progress ### TESTING INSTRUCTIONS #### How to reproduce the bug 1. Create a chart using a dataset that has a column whose values are within a range of `1`. E.g. a column all of whose values are between 0 and 1. 1a. If you don't have such a dataset, edit a dataset using "calculated columns" to create one. 2. Create a dashboard that uses that chart. 3. Add a numerical range filter to that dashboard, connected to the column in step (1). 5. Try to use the slider ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> Fixes #24010 - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
