forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix validation behavior (woocommerce#38194)
* Create ValidationContext * Add ValidationProvider to the product editor * Add new validation to the name block * Add new validation to the Save button * Store validations within a useRef instead of useState to improves re-renders * Create find first visible and invalid element function * Add focus first invalid element feat when submitting * Integrate autofocus with name block * Migrate sale-price block to the new validation system * Add changelog file * Migrate regular-price block to the new validation system * Migrate schedule-sale block to the new validation system * Migrate inventory-quantity block to the new validation system * Migrate shipping-dimensions block to the new validation system * Remove old validation hook * Add validation to the save-draft button * Add validation to the preview button * Expose validation hooks to be used outside of the package * Make sure the product is in fact saved before calling the onPublishSuccess
- Loading branch information
Showing
25 changed files
with
484 additions
and
347 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Fix validation behavior#37984 |
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
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
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
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
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
Oops, something went wrong.