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

Taxonomy Support (Tags, Categories) #489

Closed
jauyong opened this issue Mar 5, 2020 · 18 comments
Closed

Taxonomy Support (Tags, Categories) #489

jauyong opened this issue Mar 5, 2020 · 18 comments
Assignees
Labels
Group: Document Panel Group: WordPress Changes related to WordPress or Gutenberg integration Group: Workspace A group encompassing all of workspace – everything inside the canvas and sidebar P2 Should do soon Type: Enhancement New feature or improvement of an existing feature Type: Support Questions & Feedback from support escalation. UX Needed

Comments

@jauyong
Copy link

jauyong commented Mar 5, 2020

Feature Description

  • Adding new tab to the Document panel of the editor that allows users to set tags and categories of their story.
  • This will mimic the ability to add, edit, delete tags and categories to a story that users have for traditional posts in WordPress.

UI draft from Aug 28, 2021 (where the part on the leftt is what Gutenberg (WordPress) does now and the bit on the right is to implement in the editor):
image


(March 4, 2020 - original description)
This was taken out of #405

Feature Brief


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

  1. Authors are able to add a new category
  2. Authors are able to add a new tag
  3. Authors are able to edit the categories
@jauyong jauyong changed the title Tags and Catgegories Tags and Categories Mar 5, 2020
@swissspidy swissspidy added the Group: WordPress Changes related to WordPress or Gutenberg integration label Apr 23, 2020
@swissspidy swissspidy added Group: Document Panel Type: Enhancement New feature or improvement of an existing feature labels May 12, 2020
@o-fernandez o-fernandez added the P1 High priority, must do soon label May 14, 2020
@miina
Copy link
Contributor

miina commented May 18, 2020

Couldn't find design currently in Figma for this, assuming it should be in the Document panel.
Probably UX Needed?

@o-fernandez -- adding UX Needed label, LMK if the design actually exists and I missed it, so we can add it to the description as well.

cc @samitron7

@o-fernandez
Copy link
Contributor

@pbakaus @swissspidy Want your thoughts here. IIRC, our main way of getting the story into the site's various feeds and distribution will be by having users embed their story into a post they publish. Is that still the plan?

If so, then the priority of this could possibly drop, since the article/post where the story is embedded could be where the right categories/tags are added. Let me know what you think.

@swissspidy
Copy link
Collaborator

our main way of getting the story into the site's various feeds and distribution will be by having users embed their story into a post they publish. Is that still the plan?

Yes. I think this would be more about helping publishers organize their content in the admin rather than having to do anything with distribution.

@o-fernandez
Copy link
Contributor

Great, thanks for confirming @swissspidy. I think that makes sense, and definitely important to do, but lowers the urgency in my mind. Let me discuss prioritization with Sam in our upcoming 1-1.

@swissspidy
Copy link
Collaborator

Sounds good.

To give some more context:

Right now stories already support adding tags & categories via the "All Stories" view (aka classic WordPress list table):

Screenshot 2020-05-18 at 16 01 43

They're also already shown in the Dashboard:

Screenshot 2020-05-18 at 15 48 21

Maybe that's a bit confusing for users?

So this issue would only be about adding them to the Document panel in the editor.

Another interesting aspect: right now the tags and categories are shared with regular posts. So if you have the tag "Awesome", it can be added to both a post and a story. However, we could also make them unique to stories, and not shared with posts.

@o-fernandez
Copy link
Contributor

Open questions:

  • do users need both categories and tags to organize their stories?
  • do they want to use the same categories/tags as they use for the rest of WP, or story-specific tagging?

If we feel comfortable saying that we have answers for these, then we could build this now. Otherwise, do we have the option to hide these from the dashboard and "all stories" sections until we have user feedback/need to determine how we should implement this?

@swissspidy @pbakaus @carlos-kelly

@swissspidy
Copy link
Collaborator

  • do users need both categories and tags to organize their stories?

I don't think so. Even in WordPress itself many users find it confusing to have both options.

IMO 1 option - tags - is enough.

  • do they want to use the same categories/tags as they use for the rest of WP, or story-specific tagging?

Sharing tags can cause issues in WP, as the counts for how often a tag is used can be wrong inn this case. Personally I'd argue for not doing this sharing.
If someone really wants it, they could build a small WordPress plugin to do so.

Otherwise, do we have the option to hide these from the dashboard and "all stories" sections until we have user feedback/need to determine how we should implement this?

Yes we do. Should be relatively simple to make this change.

My suggestion: let's do that until we have user feedback. It's not a V1 feature anyway.

@o-fernandez o-fernandez added P3 Nice to have and removed P1 High priority, must do soon labels May 20, 2020
@o-fernandez
Copy link
Contributor

Thanks @swissspidy - that sounds good! Moving this out of the Beta/Stable release. Filed #1884 for now.

@swissspidy
Copy link
Collaborator

There was a user request for this at #3107

@barklund barklund added the Group: Workspace A group encompassing all of workspace – everything inside the canvas and sidebar label Oct 5, 2020
@swissspidy
Copy link
Collaborator

This one is quite likely needed for the upcoming block library work. Users need a way to categorize stories so they can display stories on their websites for particular topics.

We can start with tags only for now, and have them not shared with posts.

The feature should be built in an agnostic way independent from specific implementations.

In other words, if we ever add a "Country", "Color" or "Whatever" taxonomy, there should be no changes needed to the editor or dashboard.

@o-fernandez WDYT?

So we need:

  • a short spec for this
  • some UX work for how this looks like in editor / dashboard

Not 100% blocked by UX. For the time being users could just use the "All Stories" view.

@swissspidy swissspidy added P2 Should do soon and removed P3 Nice to have labels Oct 29, 2020
@o-fernandez
Copy link
Contributor

@swissspidy agree that this will be important for the blocks. Curious, though, why would we make this independent from posts? My thinking is - categories and tags are probably something publishers set up to match the different page experiences they want to create, so asking them to set a new taxonomy for these posts may not be great. But, wondering if there are WP reasons for which you recommend not doing this?

@amedina and I had discussed this ticket a few weeks ago when talking about embeds and agreed it would be important to do this as part of the enhanced blocks. I think @amedina had some thoughts on how this could work, so may be good to sync on it.

My short spec would be (I can put it in a brief)

  1. Allow user to add tags and categories in the "document" tab in the editor, mimicking how it works for posts/pages except in our editor UI.
  2. I would have recommended to use the same category and tags taxonomy as the rest of the site, but open to change this.
  3. User should be able to modify this categories and tags in the "All Posts/classic view"
  4. We can file a separate ticket to surface tags and categories in the dashboard and let people modify them from there, to not force features into the classic "all posts" view. But, non-blocking to ship the feature.

If this generally sounds good, we can file tickets for 1 (workspace change) and 4 (dashboard change), but LMKWYT.

@swissspidy
Copy link
Collaborator

I suppose we'll need to refine what the goal of this is.

Is it purely for managing content in the backend, or also for showing stories of these categories in the archives? For example, WP by default has archives like example.com/category/my-awesome-category/ that lists posts of this category only. It would not display stories out off the box (unless we'd use something like https://github.com/spacedmonkey/built-in-taxos-cpt)

I would have recommended to use the same category and tags taxonomy as the rest of the site, but open to change this.

One issue with that is that WordPress will have troubles counting how many content items have a specific category, because by default it only counts posts, not custom post types like stories.

Another issue is the archives situation above.

@dreamofabear
Copy link
Contributor

Bumping due to a FR from NCA, which consists of two user flows:

  1. [P0] Allow registering/associating an existing taxonomy with the web-story post type (on the Settings page?)
  2. [P1] Allow setting a story with a registered taxonomy in the editor (in the Document panel?) and displaying existing associated taxonomy values

I think this is pretty close to the existing proposals above, just generalized.

@swissspidy swissspidy changed the title Tags and Categories Taxonomy Support (Tags, Categories) Jun 24, 2021
@swissspidy
Copy link
Collaborator

  1. [P0] Allow registering/associating an existing taxonomy with the web-story post type (on the Settings page?)

This is not something we should add to the settings page. This belongs to where taxonomies are registered.

Wherever NCA is registering custom taxonomies in their plugin(s), they should just update their register_taxonomy() call or use register_taxonomy_for_object_type() accordingly. Examples:

register_taxonomy( 'my-cool-taxonomy', [ 'post', 'web-story', 'some-other-post-type' ];

register_taxonomy_for_object_type( 'my-cool-taxonomy', 'web-story' );
  1. [P1] Allow setting a story with a registered taxonomy in the editor (in the Document panel?) and displaying existing associated taxonomy values

This ticket's goal, essentially.

register_taxonomy() allows registering two types of taxonomies, hierarchical (e.g. categories with sub-categories) and non-hierarchical ones (e.g. tags).

We we would take the list of all taxonomies registered for the web-story post type and display them in the document panel. The UI component being used depends on whether it's hierarchical or not.

This is how this works in WP elsewhere and what users and developers would expect here as well.

Example UI for hierarchical and non-hierarchical taxonomies in Gutenberg:

Screenshot 2021-06-24 at 08 51 45

@bmattb
Copy link

bmattb commented Aug 18, 2021

requires UX direction on a multi-select dropdown,

@bethanylang bethanylang added the Type: Support Questions & Feedback from support escalation. label Sep 22, 2021
@mobisterdev
Copy link

  1. [P0] Allow registering/associating an existing taxonomy with the web-story post type (on the Settings page?)

This is not something we should add to the settings page. This belongs to where taxonomies are registered.

Wherever NCA is registering custom taxonomies in their plugin(s), they should just update their register_taxonomy() call or use register_taxonomy_for_object_type() accordingly. Examples:

register_taxonomy( 'my-cool-taxonomy', [ 'post', 'web-story', 'some-other-post-type' ];

register_taxonomy_for_object_type( 'my-cool-taxonomy', 'web-story' );
  1. [P1] Allow setting a story with a registered taxonomy in the editor (in the Document panel?) and displaying existing associated taxonomy values

This ticket's goal, essentially.

Is there any update on this? So far, it is still not possible to assign another taxonomy other than the initial to the web-story post type. Is it a possibility?

@swissspidy
Copy link
Collaborator

So far, it is still not possible to assign another taxonomy other than the initial to the web-story post type. Is it a possibility?

@rmetzker You can use code such as the above to assign your custom taxonomies to web stories. There are also plugins that let you do this. We do not provide a UI for this though.

@mobisterdev
Copy link

I was trying to use them but nothing was happening. Neither 'init' nor 'plugins_loaded' was doing the job when calling add_action to register the custom taxonomy. I had to use 'init' with a higher priority to get it to work. It's functional! Thanks @swissspidy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Document Panel Group: WordPress Changes related to WordPress or Gutenberg integration Group: Workspace A group encompassing all of workspace – everything inside the canvas and sidebar P2 Should do soon Type: Enhancement New feature or improvement of an existing feature Type: Support Questions & Feedback from support escalation. UX Needed
Projects
None yet
Development

No branches or pull requests