Migrating AddCustomTemplateModalContent to use updated Composite implementation - #55256
Merged
andrewhayward merged 2 commits intoOct 12, 2023
Merged
Conversation
- Removes `__unstableComposite` imports from `@wordpress/components` - Adds private `Composite*` exports from `@wordpress/components` - Refactors `SuggestionList` and `SuggestionListItem` to use updated `Composite` components
6 tasks
|
Size Change: +1.24 kB (0%) Total Size: 1.65 MB
ℹ️ View Unchanged
|
brookewp
reviewed
Oct 12, 2023
ntsekouras
approved these changes
Oct 12, 2023
ntsekouras
left a comment
Contributor
There was a problem hiding this comment.
Besides the comment about the extra type prop, this looks good. Thanks!
|
Flaky tests detected in 49a5b8d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6494526461
|
tyxla
approved these changes
Oct 12, 2023
tyxla
left a comment
Member
There was a problem hiding this comment.
This tests well for me and the code looks great. 👍
Another one bites the dust! 🚀
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
This PR updates
AddCustomTemplateModalContentin@wordpress/edit-siteto use the updatedCompositeimplementation from #54225.Why?
In #54225, an updated implementation of
Compositewas added to@wordpress/components. As per #55224, all consumers ofCompositeneed to migrate from the old version to the new version.How?
__unstableComposite*imports from@wordpress/componentsComposite*exports from@wordpress/componentsSuggestionListandSuggestionListItemto use updatedCompositecomponentsTesting 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
listboxon 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!