-
Notifications
You must be signed in to change notification settings - Fork 219
[GlobalStep] User is able to set negative values in "Filter Products by Price" block. #2695
Comments
Thanks for reporting this! I can reproduce. This isn't a block bug so it has a lower priority but definitely something that will get added to our backlog. |
This issue has been marked as |
Can reproduce still. |
I think we need to define what the expected functionality for the text inputs is. Thinks I have observed during testing:
In the current setup, where input values are applied on focus (no button), one proposal could be:
|
🐛 🐛 🐛 🐛 @ralucaStan regarding your proposal:
If we are currently filtering by min and max, say I am filtering from 20-40, and then I change my mind and want to filter between 0 and 20, if I try to edit max first it will fail. I would have to do min first, then max. Do you think this is acceptable? Would an alternative be to reset min to 0 if possible, before rejecting the new value?
Same as above. Do we reject, or shift max to the actual maximum or next interval above the inputted value?
👍🏻 We should also define what the expected result is from an invalid input. Do we:
|
For this use case, I think a button would be necessary because you are trying to modify the interval as a whole and not just a limit value. And that interval would also need to be validated on button click. I was proposing solutions for modifying one of the limits of the existing interval. If the value from the input is invalid, then we could just revert to the previous value. These are 2 possible use cases of the component, and I think we might need some help from @SpacePol to make this a usable component. I also noticed that the component also has an option to show a button, but it does not influence the inputs' behavior. When the user writes new values, the slider is updated automatically. A button click is necessary to filter the products list. |
After reading the post, I think we can start by make a couple of things: As @ralucaStan said, we should expect these behaviours:
I would add:
When I try to use the filter, as soon as I change a value, the page reloads and goes up the top. We can change this behaviour and show an "Apply" button to trigger the operation. This will make the action expected. |
This issue has been marked as Internal: After 10 days with no activity this issue will be automatically be closed. |
This issue has been marked as Internal: After 10 days with no activity this issue will be automatically be closed. |
This issue has been marked as Internal: After 10 days with no activity this issue will be automatically be closed. |
This issue has been marked as Internal: After 10 days with no activity this issue will be automatically be closed. |
… Price block #2695 Don't allow to insert negative values on input for Filter Products By Price block
… Price block #2695 Don't allow to insert negative values on input for Filter Products By Price block
Environment:
Windows 10: Chrome(v83.0.4103.61)(64-bit), Firefox(v77.0.1)(64-bit)
Steps to Reproduce:
Note: Also All products show random products irrespective of the filter applied.
Actual Result:
User is able to set negative price in "Filter by Price" block.
Expected Result:
User should not be able to set negative price as product price cannot be negative.
Refer Artifact:
#2695.zip
The text was updated successfully, but these errors were encountered: