-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 AddCustomTemplateModalContent
to use updated Composite
implementation
#55256
Migrating AddCustomTemplateModalContent
to use updated Composite
implementation
#55256
Conversation
- Removes `__unstableComposite` imports from `@wordpress/components` - Adds private `Composite*` exports from `@wordpress/components` - Refactors `SuggestionList` and `SuggestionListItem` to use updated `Composite` components
Size Change: +1.24 kB (0%) Total Size: 1.65 MB
ℹ️ View Unchanged
|
packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js
Outdated
Show resolved
Hide resolved
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.
Besides the comment about the extra type
prop, this looks good. Thanks!
packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js
Outdated
Show resolved
Hide resolved
Flaky tests detected in 49a5b8d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6494526461
|
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.
This tests well for me and the code looks great. 👍
Another one bites the dust! 🚀
What?
This PR updates
AddCustomTemplateModalContent
in@wordpress/edit-site
to use the updatedComposite
implementation from #54225.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
SuggestionList
andSuggestionListItem
to use updatedComposite
componentsTesting Instructions
Open the "Add Template" dialog from the "Design > Templates" sidebar and select the "Pages" option.
The list of available pages should be presented as a
listbox
, the behaviour of which should be no different than before. Selecting an option should take you to an editor for the chosen view.Testing Instructions for Keyboard
The
listbox
on the "Pages" view should act as a single tab stop, with arrow keys used to navigate between items. It's questionable if this is the appropriate behaviour, but it is outside the scope of this PR to change that!