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

Alex Zu created an issue. See original summary.

borisson_’s picture

Status: Active » Needs review
StatusFileSize
new2.52 KB

Fix + test.

Status: Needs review » Needs work

The last submitted patch, 2: some_search_results_can-2910828-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new663 bytes
new2.55 KB

Reroll for cs fixes.

borisson_’s picture

Issue tags: +Vienna2017

@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.

alezu’s picture

@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.

borisson_’s picture

Status: Needs review » Needs work

Awesome, I'll reroll the patch and we can commit this. Thanks!

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new2.55 KB

Reroll attached.

Status: Needs review » Needs work

The last submitted patch, 8: some_search_results_can-2910828-8.patch, failed testing. View results

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new827 bytes
new2.57 KB

  • borisson_ committed 5bec101 on 8.x-1.x
    Issue #2910828 by borisson_, Xano, dawehner, bircher, ekes, drunken...

borisson_ credited Xano.

borisson_ credited bircher.

borisson_ credited ekes.

borisson_’s picture

Status: Needs review » Fixed

Crediting the people who validated this at DrupalCon Vienna.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

alezu’s picture

StatusFileSize
new729 bytes

Problem 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.