Page MenuHomeMiraheze

Create tags in ManageWiki/WikiDiscover
Open, LowPublic

Description

To make even better use of categorisation and allow users to find wikis via WikiDiscover, I think it would be worth adding tags

In addition, I also think since tags could be quite numerous users with the 'managetag' (Stewards) permission should be able to manage them from Special:ManageTags


  • Add 'tags' to ManageWiki and allow users to add/remove pre-defined tags via ManageWiki (pull request)
  • Add 'tags' to WikiDiscover and allow users to search wikis by tag/multiple tags
  • Add 'tags' to CreateWiki and allow users to add tags when requesting a new wiki (pull request)
  • Add a special page that allows Stewards (or whatever designated group) to manage (create/delete) tags

Event Timeline

Reception123 created this task.

I have been thinking about this briefly, I have seen people complain in the past with "but my wiki spans multiple categories", why don't we consider wiki tags instead of categories? That way we can define many/infinite list of wiki 'tags' and a wiki can select multiple that suite their wiki needs. This would allow fine grain searching for wiki discovery while prevent the problem of "but the categories are not specific enough or not expansive".

That would be an interesting idea to consider. Perhaps then the Request for Feedback should focus on that idea.

Reception123 renamed this task from Create subcategories in ManageWiki/WikiDiscover to Create subcategories/tags in ManageWiki/WikiDiscover.Feb 22 2022, 06:48
Unknown Object (User) subscribed.Sep 19 2022, 07:28
Unknown Object (User) moved this task from Backlog to Features on the WikiDiscover board.Sep 19 2022, 07:31
Unknown Object (User) moved this task from Unsorted to Long Term on the Universal Omega board.

Assigning to Agent for community consultation. I would recommend having two main options for implementation: either we keep one main category and then tags or we just have tags

Reception123 renamed this task from Create subcategories/tags in ManageWiki/WikiDiscover to Create tags in ManageWiki/WikiDiscover.Nov 1 2022, 12:07

While not wanting to pre-empt the discussion at https://meta.miraheze.org/wiki/Community_noticeboard#Request_for_Feedback:_Categories_and_the_tagging_system it seems quite clear that there is wide support so far from the community to both keep the current category system but also to add a new 'tag' system. While obviously work shouldn't start before the RfF is completed, after a discussion with @Universal_Omega I think it would be best to do this in three stages (originally I thought of two but @Agent_Isai suggested #3). The rationale is that between Stage 1 and 2 wikis can start getting used to the new system and tagging their wikis and Stage 2 wouldn't be very useful at the beginning of the process in any case.

Stage 1: Add 'tags' to ManageWiki and allow users to add/remove pre-defined tags via ManageWiki
Stage 2: add 'tags' to WikiDiscover and allow users to search wikis by tag/multiple tags
Stage 3: Add a special page that allows Stewards (or whatever designated group) to manage (create/delete) tags. Also include categories in this for consistency.

Reception123 reassigned this task from Agent_Isai to Unknown Object (User).Nov 9 2022, 20:06

The RfF has now been closed and we will therefore be proceeding by adding the option of having five pre-defined tags in addition to the current categories system.

After further discussions with @Universal_Omega I believe Stages 1 and 3 will be done at the same time with Stage 2 to come at a later time. This can be implemented whenever you have time.

Unknown Object (User) removed Unknown Object (User) as the assignee of this task.Mar 18 2023, 03:26
Unknown Object (User) removed a project: Universal Omega.
Unknown Object (User) unsubscribed.

Regarding the addition of a user right for stewards to modify tags: how often do we anticipate tags actually needing to be modified? Is it necessary for a special page to modify them vs just putting them in a config parameter?

We thought about that but I think given the nature of tags there would probably be a lot compared to categories which are quite static. Though if it seems difficult to do we could probably start with config and see how frequent it really is in practice. That's also why that part is only Stage 3, as it would be the last thing to be done in either case.

Should people be able to specify tags during the wiki creation process? (Could be done as a part of T9153)

Should people be able to specify tags during the wiki creation process? (Could be done as a part of T9153)

Yeah, in the same way that one can currently select a category when requesting a wiki, it also does make sense that one should be able to set the tags when requesting.

I started to take a look at potential ways to implement this, and from a frontend UX standpoint the best result was using OOUI's MenuTagMultiselectWidget. The major downside to using this is that it requires JavaScript.

That being said, I am wondering: is it a priority of ours to ensure that there is no-JS support for a feature like this? We're a bit limited in OOUI form capabilities using only the PHP components, and I don't think we'd be able to create a particularly good user experience for no-JS users for something like this. All I can really think of would be to have a normal text input where users would need to comma separate the tags themselves as a fallback, or maybe checkboxes (although if we plan to have a lot of tags this would not look good)

Here's what the JS widget looks like:

firefox_7xTFM7382M.png (92×340 px, 2 KB)

I'm not aware of there being any particular adversity to JS use, since a task like T10408 also exists.

Joritochip moved this task from Backlog to Features on the CreateWiki board.
Joritochip moved this task from Backlog to Features on the ManageWiki board.

In order to make querying tags efficient we'll likely need a new table on the mhglobal database cw_wikitags with wiki_dbname and tag_id columns... Although we could store the tags as JSON or CSV in cw_wikis, trying to query that would be slow

How come it would be that different than querying categories with the current system?

Since there can only be one category per wiki, the query only needs to look for an exact match. If we were to store tags as strings in JSON format or as comma separated lists, we'd need the query to check for any occurrence of each tag being filtered for every wiki. That kind of query is slow in SQL.

Having a separate table, where each row is for one tag on one specific wiki (meaning up to 5 rows per wiki) will take relatively more database storage, but would result in faster querying

There may be other solutions too, those are just the two that came to the front of my mind

In that case a separate table should be fine.

I took a look at how WikiDiscover implements the "number of wikis with setting" magic word, and it actually just fetches every wiki from the DB, parses its settings JSON, and checks if the setting has the desired value... we could take the same approach here instead of a separate table for consistency reasons, although I don't think doing it that way is particularly scalable if there was a significantly larger amount of wikis (since we only have ~6k it's not that big of a performance worry)

I don't think it's particularly likely for the number of wikis to suddenly grow so in that case the same model could be adopted and we can worry about scalability when we get there.

Unfortunately due to some external circumstances I do not have the time to finish this task at the moment, I will pick it up again when I have time if nobody else claims it in the meantime. The work in progress commits I made are linked in the original post if someone wants to continue working based on what I had done