This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Add requireExactMatch
prop to ComboBox
to prevent wrong country/state values being sent to the server
#6426
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opr
added
status: needs review
type: bug
The issue/PR concerns a confirmed bug.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
labels
May 18, 2022
rubikuserbot
requested review from
a team and
tarunvijwani
and removed request for
a team
May 18, 2022 15:33
Size Change: +149 B (0%) Total Size: 873 kB
ℹ️ View Unchanged
|
alexflorisca
approved these changes
May 18, 2022
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.
Look good, nice one 👍
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
May 18, 2022
…ce/woocommerce-gutenberg-products-block into fix/state-country-wrong-values
Besides the translation ones, the E2E tests that fail in this PR pass locally, I'll merge notwithstanding. |
gigitux
pushed a commit
that referenced
this pull request
May 19, 2022
…tate values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input
gigitux
pushed a commit
that referenced
this pull request
May 19, 2022
…tate values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input
gigitux
pushed a commit
that referenced
this pull request
May 20, 2022
…tate values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input
7 tasks
gigitux
added a commit
that referenced
this pull request
May 20, 2022
don't splitChunk frontend scripts simplfy output folders reduce minimum chunk size to 10kb add all inner blocks for loading better splitChunks update translation code wait for scripts try sleeping fix loading translation fix tests for mini cart simplfy po logic Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input revert changes skip broken test add timeout remove localstorage check now try update test try click on label remove fdescribe Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (#6426) * Add requireExactMatch prop to ComboBox & only run onChange if value matches * Set requireExactMatch to true for Country and State inputs * Add unit tests for ComboBox * Update expected value for onChange call * Re-add autocomplete option to country input * Use correct case for autoComplete in country input Add check to allow for value completion in combobox Improve tests for combobox add comment
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
type: bug
The issue/PR concerns a confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the ComboBox would run
onChange
before an actual value was entered (example: you start slowly typingUnited Kingdom
but it would sendUnited Arab Emirates
to the server because it was the first value encountered when typingUn....
)This PR makes the following changes:
ComboBox
component calledrequireExactMatch
- the purpose of this prop is to make theComboBox
only run theonChange
function if the entered value exactly matches one of the allowed options.Fixes #6423
Other Checks
Testing
Automated Tests
User Facing Testing
Use same address for billing
.Country/Region
input on the Billing Address formUni
and wait 3-4 seconds, without leaving the field, scroll up and verify theCountry/Region
in the Shipping Address form is still empty.United Kingdom
.Country/Region
in the Shipping Address form is still empty.WooCommerce Visibility
Changelog