Issues with range slider

Created on 8 December 2020, almost 4 years ago
Updated 27 May 2024, 4 months ago

I faced several issues on the Range slider facet and have the issue with apply patches for them separately because of changing the common places.

Issue 1.
For range slider enough to set min and max values in results without processing all steps.
Because it will be processed by the jquery slider.
But in my patch I'm not overriding the postQuery fully, just call parent with special flag.
πŸ› Improve performance for range widgets Needs review

Issue 2.
Facet slider incorrectly work with float step
#3182839: Facets slider processor modulo wrong results. β†’
+ possibility to confige round precision for displayed values

In addition to discussion in task I found the next bug:
min = 0.716, max = 2.079, step = 0.01

New max calculated to 2.08, but in jquery it's recalculated to 2.076.
It happens because of some js bugs with float number:
Math.round( ( 2.086 - 0.716 ) / 0.01 ) * 0.01 => 1.37
1.37+0.716 => 2.0860000000000003
And after it checks that new max is less than original, so it became 2.076.

So on the Drupal side I've changed the calculation for the max to do that similar to in the jquery slider + adding 0.01 as a workaround for extra float precision.
So I'll have max 2.086 instead of 2.076.

Issue 3.
I want to be able to display range depends on all results without applying active facet values.
#3186701: Let modules to skip apply active facets during search api query β†’

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia kiseleva.t

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024