-
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
Transform categories title into blocks in the categories block #66522
base: feature/add-sorting-by-name-or-count-in-categories-block
Are you sure you want to change the base?
Transform categories title into blocks in the categories block #66522
Conversation
Size Change: +760 B (+0.04%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Question, why is a term title block needed, when there is a query title block that already shows the term name? |
I am not familiar with that block, but the way I understand it, it is the title of the query loop block, right? This term title would be the equivalent of post title but for terms/taxonomies. It could be used outside of the query loop, like post title, or inside this "Categories" block, for example. Having said that, this is just an exploration, so maybe it makes sense to explore higher abstractions. Like having a query loop that works for taxonomies and not only posts. |
I wouldn’t deprecate a block unless there's a really compelling reason. IMO, the fact that the name and functionality are somewhat at odds isn't reason enough: It'd be outweighed by the hassle to take care of transforming existing instances of a block into a new one. (We did that with the old Post Comments block, but IIRC, it had only been around for one WP release at the time and not widely used. And the workaround was kinda gnarly regardless.) It would be a different pair of shoes to introduce a new version of the block, i.e. via the block deprecations/migrations framework.
Agree that it would be good to allow changing the styling of the individual category links. Can we use Global Styles' link-specific styling concepts? I.e. essentially opt the block into block-supports for link color, and additionally apply link element styling? These two sound like bugs, but I'm not entirely sure I'm following. Could you add screencasts to illustrate the issues?
Agree 👍 AFAICS, it should be possible to tackle the styling and inline script related issues without deprecating the block. My suggestion would be to file individual PRs for each issue, as they also seem orthogonal to each other, so it should be easier to address each issue individually and land the fixes faster 😊 |
FWIW, there's an issue for a "Term Query Loop Block": #49094 🙂 |
No, the "title of the query loop" would be what used to be called the post title block, now the title block. |
What?
In this pull request, I'm exploring the possibility of creating a new "Term title" block and using it inside the Categories block. Right now, the categories list markup is "hardcoded", and it limits the users for customization. With this approach, it would work similar to Post Template & Post Title, where users can apply styles to the Post Title and be applied in all the existing ones in the Query Loop:
Categories.block.inner.blocks.mp4
Should we deprecate the Categories block in favor of a Taxonomies block?
While working on this, I wondered if the whole categories block should be deprecated in favor of a new "Taxonomies" block. These are some reasons for this:
Why?
How?
Testing Instructions
WIP