If "max" slider setting is not divisible by chosen "step" value (e.g. step is 1000, minimum value in search is 599, max is 13990) so the generated slider will have "max" setting equal to 13599 - other results will be cut.
As soon as minimum and maximum values are dynamic, I believe we should make a step setting dynamic too. For example it would be set as a fixed number like now but changed a little after every search to divide the range completely.
It's also possible to change max value to be divisible by stepm but such decision will be less informative.
Comments
Comment #2
borisson_Fix + test.
Comment #4
borisson_Reroll for cs fixes.
Comment #5
borisson_@Alex Zu: can you confirm that this works?
I confirmed that this should work at drupalcon vienna - but I'd love to have your approval as well.
Comment #6
alezu commented@borisson_,
Except I could not find a branch with SliderProcessorTest.php file and had to edit your patch to skip patching it, everything looks good.
Comment #7
borisson_Awesome, I'll reroll the patch and we can commit this. Thanks!
Comment #8
borisson_Reroll attached.
Comment #10
borisson_Comment #17
borisson_Crediting the people who validated this at DrupalCon Vienna.
Comment #19
alezu commentedProblem still appears in some circumstances. For instance, we have two products with prices 123 and 123124 and range slider step 100. In this case max value equals 123200 and cycle generating the slider will break at value 123123. I suggest to count maximum value just summing with step value without subtracting modulo.