-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Add/Edit Shipping Time Modals to support minimum and maximum shipping times stepper #2609
Update Add/Edit Shipping Time Modals to support minimum and maximum shipping times stepper #2609
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## update/shippings-settings-phase-1 #2609 +/- ##
===================================================================
+ Coverage 63.3% 63.8% +0.5%
===================================================================
Files 322 323 +1
Lines 5119 5134 +15
Branches 1251 1254 +3
===================================================================
+ Hits 3242 3278 +36
+ Misses 1704 1683 -21
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jorgemd24, thanks for implementing the stepper for shipping.
All is working properly although I noticed a few useability issues which we may want to address before releasing.
- The modal size changes when an error is displayed or hidden. If a merchant is using the
+
and-
to set the value then the content jumps and the mouse may move off the button when the error status changes.
Modal.error.message.mov
- Invalid fields aren't highlighted when attempting to save changes. If a merchant is shipping to a number of countries and has different settings for each then it would be quite difficult to spot where the issue is.
-
Locations are immediately grouped if the min/max values match an existing field. at the moment merchants would need to enter an identical value and then focus on a different element before they are grouped.
As it happens when using the steppers we potentially have a situation where we want to use the
+
button to get to4
but it's grouped before that can happen.What do you think of adding a small delay before grouping so that it would be possible to use the stepper to get to a higher number?
Screen.Recording.2024-09-19.at.15.39.25.mov
Thanks @martynmjones for your helpful comments! I’ve addressed points 1 and 3. Regards the second one:
I agree that it's not easy to see which one is incorrect, but this behaviour hasn't changed compared to the one in the I believe the issue is that we're treating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for making those adjustments @jorgemd24! Tested the updated version and both the issues I mentioned previously have been resolved.
I believe the issue is that we're treating shipping_times as a group of inputs rather than individual inputs, which makes it harder to display errors for each input separately. I'll create an issue for this since I think it goes beyond the scope of this PR.
Perfect! Thank you.
Changes proposed in this Pull Request:
Part of #2594
Since we're now working with min and max shipping times, the "Edit" and "Add" modals need to be updated to use the stepper component when creating or editing shipping times. This PR introduces a new component,
MinMaxShippingTimes
, which includes steppers for both the minimum and maximum shipping times.The errors in the modals are displayed within the form instead of beneath the stepper component to prevent issues like this:
Screenshots:
Detailed test instructions:
Additional details:
In this commit 8652d24 I updated the
onBlur
function to align withonIncrement
. However, I'm unsure what's best—whether we should allow users to enter any value and display errors in the form, or restrict input to values within the allowed range, like preventing negative numbers. Any advice would be appreciated.Changelog entry