-
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
base: update/shippings-settings-phase-1
Are you sure you want to change the base?
Update Add/Edit Shipping Time Modals to support minimum and maximum shipping times stepper #2609
Conversation
Codecov ReportAttention: Patch coverage is
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 5133 +14
Branches 1251 1257 +6
===================================================================
+ Hits 3242 3276 +34
+ Misses 1704 1684 -20
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?
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