Skip to content
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

Pattern categories referenced as tags in site editor post taxonomies panel #57076

Closed
richtabor opened this issue Dec 14, 2023 · 7 comments · Fixed by #57094
Closed

Pattern categories referenced as tags in site editor post taxonomies panel #57076

richtabor opened this issue Dec 14, 2023 · 7 comments · Fixed by #57094
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@richtabor
Copy link
Member

Looks like #57049 has led to the pattern categories UI to suggest these are "tags", though they are categories. Perhaps this panel should be updated to use the existing categories UI anyhow; instead of the FormFieldToken, which is used for tags on posts.

As an aside, I think it'd be fine to just have "Categories" as the panel title, as we do the same on the post editor (and the UI already suggests this is a custom post type via the tab).

cc @youknowriad

CleanShot 2023-12-14 at 13 08 01
CleanShot 2023-12-14 at 13 07 20

@richtabor richtabor added [Type] Bug An existing feature does not function as intended [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Dec 14, 2023
@youknowriad
Copy link
Contributor

That's actually they seem to be using the post_tag taxonomy and not some other taxonomy.

@youknowriad
Copy link
Contributor

youknowriad commented Dec 14, 2023

We can probably hard code a label if we detect that it's the "wp_block" post type but I think this was wrong from the start, they should just have been named "tags" if they used the "post_tag" taxonomy.

@richtabor
Copy link
Member Author

Yea, or just used categories properly. 😬

What do you think is the best way forward?

@youknowriad
Copy link
Contributor

I think it can't be categories properly because that taxonomy is hierarchical, and here it's just "tags" actually but we want it to have "categories" as label. The ideal would have been a dedicated taxonomy or embracing the "tags" labels everywhere. If it's too late for the latter, I think our path forward is to just hard code a specific "add new tag" label for this particular post type.

@youknowriad
Copy link
Contributor

I'll take a deeper look tomorrow though :) and I'll have a better answer.

@youknowriad
Copy link
Contributor

My bad here, it turns out, we're doing things correctly with a dedicated taxonomy. The problem is that the labels were not all defined and there's an automatic fallback to tags labels.

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Dec 18, 2023

Perhaps this panel should be updated to use the existing categories UI anyhow; instead of the FormFieldToken, which is used for tags on posts.

Just to confirm the thinking here. As Riad has mentioned we did not use WP categories here as they are hierarchical and we needed a flat taxonomy to match with the existing pattern categories which are also flat. The naming of categories instead of tags was also chosen to match with the existing pattern categories as the alternative of renaming the existing .org and theme categorisation to tags did not seem like the right approach.

Thanks for adding the extra labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants