-
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 UI to support minimum and maximum shipping times. #2594
Update UI to support minimum and maximum shipping times. #2594
Conversation
… into add/min-max-time-inputs
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## update/shippings-settings-phase-1 #2594 +/- ##
======================================================================
- Coverage 66.3% 63.3% -2.9%
======================================================================
Files 475 322 -153
Lines 17927 5119 -12808
Branches 0 1251 +1251
======================================================================
- Hits 11879 3242 -8637
+ Misses 6048 1704 -4344
- Partials 0 173 +173
Flags with carried forward coverage won't be shown. Click here to find out more.
|
js/src/components/free-listings/configure-product-listings/checkErrors.js
Outdated
Show resolved
Hide resolved
js/src/components/free-listings/configure-product-listings/checkErrors.test.js
Outdated
Show resolved
Hide resolved
It's handled by the error checker but I think it would be even better if we add some checks on the onChange method to verify that |
Thanks @puntope for looking at this, I've addressed your comments, could you please take another look? Regards these points:
I think to keep consistency with the rest of the form, we could use this change to all fields or leave it as it is. I'm not sure what was the reason to show the validation only when clicking "continue," but if we think it's worth changing, we could explore it in a separate PR.
Thanks for the suggestion! I'll discuss this with the designers to see what's best for this form, for now I think we can keep it as it is and then I can adjust it. |
Thanks @jorgemd24 I found a new issue when setting Screen.Recording.2024-09-13.at.13.23.48.mov |
Hi @puntope, thanks for reviewing this! The issue was linked to a change I made in the other PR, where I also found a small issue with the handleBlur function and the original value, which I've fixed here: f218b47 Could you please take another look? Thanks! PS: The PHP tests failed because of this issue: pb22l9-3cx-p2#comment-3657 but they are OK locally. |
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.
Thx @jorgemd24 for the tweaks. Now it's working as expected.
Just one thing about the UI. I see the minus symbol in the right. When normally the standard is to place it in the left.
I believe maybe we can discuss with UI. But not a blocker.
Thanks @puntope for the review
I understand your point, however, the new version of the product editor uses the minus symbol on the right, so the plan is to maintain that style for consistency. |
cd67ca0
into
update/shippings-settings-phase-1
Changes proposed in this Pull Request:
Part of pcTzPl-2qP-p2
This PR introduces a UI to manage minimum and maximum shipping times, and it updates the input to include increase and decrease buttons (like a stepper input). Additionally, we're considering showing "Same Day" instead of 0 to make it clearer for merchants.
Since mixing a string like "Same Day" with the actual integer values for shipping times could make the code more complex, I opted to use the placeholder attribute to display "Same Day" instead of 0 days to keep things simple. However, I'm open to other suggestions or approaches.
For more context see this comment here: pcTzPl-2qP-p2#comment-3652
Other Steeper Inputs in WC
https://github.com/woocommerce/woocommerce/blob/64dcafe29b52cff2dee1d56f5e06caad09a0c470/packages/js/product-editor/src/components/number-control/number-control.tsx#L166-L222
Screenshots:
Detailed test instructions:
Additional details:
I haven't updated the add and edit modals to use the stepper component yet to make reviewing this PR easier. Also, I want to ask for confirmation from the designers to see if we want to implement it there as well.
Changelog entry