Adds multi-select to categories on Latest Posts#20781
Adds multi-select to categories on Latest Posts#20781draganescu merged 4 commits intoWordPress:masterfrom
Conversation
draganescu
left a comment
There was a problem hiding this comment.
Great work @Ringish :) Left some comments about the code. As a general note i advise you to follow the setup in the code contribution guide to benefit from automatic linting and early problem detection.
Setting up locally Docker and the @wordpress/wp-env package will also allow you to run failing tests locally and debug.
Looking forward for testing this again after you've went through my suggestions! 🚀
Really good feedback. Thank you! I've pushed a new commit. |
|
Tested this locally by filtering on multiple categories and LGTM! |
|
Will we still see the list of possible categories below the multiselect box? |
|
@paaljoachim not at this point, no. That is a disatvantage of this tokenized system. When implementing such a system you basically trat categories like tags and type two letters to get a fuzzy match list. On another note, I will open an issue to move the control token select to |
| featuredImageSizeWidth, | ||
| featuredImageSizeHeight, | ||
| } = attributes; | ||
| const suggestions = categoriesList.reduce( |
There was a problem hiding this comment.
We should rename suggestions to categorySuggestions
|
The change of attribute schema for this block here should have been accompanied with provisions for migration, especially considering that this is a dynamic block. |
Description
Adds possibility to add & select posts in
LatestPostsby multiple categories as described in #20046.How has this been tested?
Added a couple of posts and categories, and used the new implementation to test, edit and save.
Screenshots
Types of changes
Adds ability to filter by multiple categories. May be breaking change? Probably this could break blocks with the old implementation.
Checklist: