-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Migrating BlockPatternList
to use updated Composite
implementation
#55383
Conversation
- Removes `__unstableComposite` imports from `@wordpress/components` - Adds private `Composite*` exports from `@wordpress/components` - Refactors `BlockPatternList`/`BlockPattern` to use updated `Composite` components
Size Change: +4.69 kB (0%) Total Size: 1.66 MB
ℹ️ View Unchanged
|
Flaky tests detected in 249911b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6589529145
|
@diegohaz are you aware of any conflicts with Some tests are failing in this PR, after I moved from ...
// ...and if not, perform a global search.
if ( ! insertButton ) {
insertButton = await searchGlobalInserter( category, searchTerm );
}
// Throw an error if nothing was found.
if ( ! insertButton ) {
throw new Error(
`Couldn't find "${ searchTerm }" in the ${ category } category.`
);
}
// Insert found entity.
await insertButton.click();
^^^^^^^^^^^^^^^^^^^^^^^^^^^
... I know the node is present, because it's not throwing the error above. But it doesn't seem to actually call the If I slow the test down, and watch it run in a browser, it works fine. So I'm assuming it's some sort of timing issue again. puppeteer-without-delay.movpuppeteer-with-delay.mov |
I'm not aware of any problems with Puppeteer. Are you certain that |
Sigh. I thought I was certain, but turns out that no, it was not resolving to the correct one. The Thanks for the input @diegohaz! |
Is there any specific reason to change the |
What?
This PR updates
BlockPatternList
in@wordpress/block-editor
to use the updatedComposite
implementation from #54225.As an aside to maintain consistency/integrity,
BlockPatternList
is renamed toBlockPatternsList
so as to match both the file name and usage elsewhere.Why?
In #54225, an updated implementation of
Composite
was added to@wordpress/components
. As per #55224, all consumers ofComposite
need to migrate from the old version to the new version.How?
__unstableComposite
imports from@wordpress/components
Composite*
exports from@wordpress/components
BlockPatternList
/BlockPattern
to use updatedComposite
componentsTesting Instructions
Note
To come...
Testing Instructions for Keyboard
Note
To come...