-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data: Build the basic data controls into every store (#25362)
* createRegistrySelector: don't bind to defaultRegistry by default We intend to register some controls created by `createRegistryControl` as built-ins with every store. In order to do that, we need to break a dependency cycle where registry creation depends on store registration which depends on creating controls which depends on default registry. The solution is to remove the `defaultRegistry` binding, which is there only to satisfy a typechecker anyway, and doesn't have any runtime impact. * Data: add built-in controls for select, resolveSelect and dispatch Instead of shipping them in a separate `data-controls` package and require the store author to register them, build them in into every store. * data-controls: Remove implementation of built-in data controls The implementation and the unit test have been moved to the `@wordpress/data` package. The `data-controls` package now exposes only legacy aliases. * Update unit tests that depend on internal representation of data controls Updates unit tests of actions (in `block-directory`, `edit-site` and `core-data`) that inspect the internal properties (like `type`) of controls that the action generator yields. A test that verifies if the action _behaves_ correctly wouldn't need to be changed like that. * Block Editor: replace a home-grown SELECT control with builtin one * Mark the deprecated controls as deprecated * Comment out the deprecations until all Gutenberg packages are updated
- Loading branch information
Showing
17 changed files
with
663 additions
and
606 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
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.