Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.75 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 1855def. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24712515306
|
tyxla
left a comment
There was a problem hiding this comment.
Thanks @ntsekouras, this is looking good to start with 👍
I've got some suggestions, but I believe we can work on most of them after landing.
This tests mostly well, there's some weird behavior when editing taxonomies (we don't always see the change immediately), which we should take a look at.
| 'delete_published_posts' => 'manage_options', | ||
| 'edit_others_posts' => 'manage_options', | ||
| 'delete_others_posts' => 'manage_options', | ||
| 'publish_posts' => 'manage_options', |
There was a problem hiding this comment.
Should we also add:
read_private_postsdelete_private_postsedit_private_posts
There was a problem hiding this comment.
Definitely not a blocker. Right now there is no way to create a private post in the UI
| return null; | ||
| } | ||
|
|
||
| $config = json_decode( (string) $record->post_content, true, 8 ); |
There was a problem hiding this comment.
Should we consider storing config in post meta? This seems a bit fragile.
There was a problem hiding this comment.
We should definitely consider how the config should be handled best. I think it will become more obvious when we'll add the rest of the taxonomies fields. We need to have a secure way of storing/consuming the data and also flexible to be used efficiently for queries and our APIs.
I'll soon open an initial tracking issue and this should be part of it.
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
tyxla
left a comment
There was a problem hiding this comment.
I think this is good to go 👍 Thanks!
There are some follow-ups to be done (see open comments), but since this is an experiment, we can address them in subsequent PRs.
🚀
|
Thanks for working on this! I'd like to follow the progress on this experiment. |
| ), | ||
| isValid: { | ||
| required: true, | ||
| pattern: '^[a-z0-9_-]{1,32}$', |
There was a problem hiding this comment.
Apologies for the late notice, as the PR has already been merged, but would it be possible to relax this regular expression rule?
I'm sure that lowercase alphanumeric characters, dashes, and underscores are recommended, but in fact, only the length of the text is checked. And I know that in Japan, at least, there are many users who use non-alphabetic characters in slugs on a daily basis.
There was a problem hiding this comment.
Of course, @t-hamano. Note that this is still in a very early state, and we'll be iterating in the coming weeks. You can also see I had a lot of feedback in this PR that we haven't addressed.
There was a problem hiding this comment.
@t-hamano circling back on this. AFAIK there are many places where sanitize_key() is ran on the taxonomy slug in core, which will remove any characters that are not alphanumeric, dashes, or undescores. This may lead to subtle bugs in many places, like various checks not working as intended, or even capabilities being broken. AFAIK this is why core has been recommending the current limitation, even if it doesn't seem to be explicit during registration. Thoughts?
Sounds like a new label will be needed. I'm fine with creating that a later point if we decide we need it. |
There was a problem hiding this comment.
While looking into #77497 (comment), when the build failed in #75814, catching that missing dependency, I noticed that the routes/* use TypeScript but are never type-checked. You can use any non-existent type imports, but npm run clean:package-types && npm run build never catches them.
|
@hanneslsm I created a label for this experiment, but please be aware that we might update or remove it eventually. |
|
All follow-ups that haven't already been addressed are listed in #77600 and we'll address them separately. Thanks everyone for helping here 🙌 |
What?
In the same spirit with: #77487
This PR adds under a Gutenberg experiment the ability to add and edit custom taxonomies. For now you can manage only a few necessary fields and not all of them - we will iterate.
Let's see how far we can get with the current APIs and how possible it can be to support the majority of use cases for custom taxonomies (and later for post types), where it's assumed that the majority of the cases are the simpler ones.
How
Testing Instructions
Content types: manage custom taxonomiesexperimentSettings/Taxonomiesand play around with adding and editing taxonomies.Screenshots or screencast
Screen.Recording.2026-04-20.at.4.55.20.PM.mov
Use of AI Tools
Opus 4.7