Page MenuHomePhabricator

Display categories in Flow side rail
Closed, ResolvedPublic2 Estimated Story Points

Description

A category can be added to a Flow board's side rail by editing the content in the side rail.

A user can add a category tag directly, and many of the metadata templates add categories.

Adding a category to a Flow board means that the board (Talk:Foo) appears in the category list.

Category tags that are added to the topic summary of an individual Flow discussion will not affect the Flow board categories -- those are only displayed on Topic pages.

If there are no categories added to the page, the "Categories" box doesn't appear. (same as with wikitext pages now.)

The design should look like the category box that currently exists on article pages, as seen below:

categories box.jpg (436×390 px, 189 KB)

Please check whether this category box will still work with the HotCat gadget: https://en.wikipedia.org/wiki/Wikipedia:HotCat
If you have any questions about HotCat support, ask @Quiddity

Related Objects

Event Timeline

Do we have an ETA for this? Please note that "Roadmap" tasks should not be in "Unscheduled" state for more than two weeks per roadmap policy (see roadmap project summary page). Also, please ensure that "Roadmap" tasks have a task description that is meaningful outside the context of the "Flow" team, i.e. the project should at least be mentioned in the task title. Thanks!

Sorry, this is unintentional. When you use "Create Subtask", it copies the projects. Normally, this works well, but Roadmap is an exception to this (a roadmap task usually will be broken down in to other tasks, but the latter should not be roadmap-level).

I fixed this in a couple cases earlier, but I missed it here.

Mattflaschen-WMF renamed this task from Add category list and editor to right rail to Add category list to right rail.Apr 27 2015, 6:44 PM
Mattflaschen-WMF updated the task description. (Show Details)
DannyH renamed this task from Add category list to right rail to Display categories in Flow side rail.Apr 27 2015, 11:44 PM
DannyH updated the task description. (Show Details)
DannyH edited a custom field.

Change 230017 had a related patch set uploaded (by Mooeypoo):
[wip] Add categories to the sidebar

https://gerrit.wikimedia.org/r/230017

This can't work with HotCat because, as far as I could see, there's no way to listen to changes made by HotCat. That gadget really needs to be updated for us to be able to support it.

@Mooeypoo: Can you expand on what would be needed to support HotCat changes?

@Mooeypoo: Can you expand on what would be needed to support HotCat changes?

The problem is that there is no way to know when HotCat made an actual change. There is no event emitted anywhere that I could see.

I need to be able to listen to an "add" or "remove" or "change" (or all?) event(s) so that in the Flow code we could adjust for them.

Ideally, btw, it would be the other way around; ideally HotCat would adjust for Flow's different presentation. I need to take a much closer look at how HotCat works, but we need to figure out a way for Flow to be updated; either because HotCat updates the correct "box" (which is different than other category boxes in other pages) or because Flow listens to events emitted by HotCat and updates itself.

... Flow listens to events emitted by HotCat and updates itself.

This would be awful. MW extension's code should not depend on local user scripts/gadgets. It should be the other way around.

... Flow listens to events emitted by HotCat and updates itself.

This would be awful. MW extension's code should not depend on local user scripts/gadgets. It should be the other way around.

Absolutely correct, I should have been more clear; what I meant was that Flow could be made to support extensions and gadgets *in general* if it listens to something like mediawiki.content[1] event or something similar. That wouldn't make Flow adjust itself specifically for HotCat or any specific extension, but it would allow Flow to adjust to any extension and gadget (or, for that matter, any future development in MW core) that manipulates things not the "usual" way Flow expects.

The main issue is that Flow's categories are working differently than any other MW content. We have the board and we have individual topics. Boards' categories are set up by adding them to the board description, and topic categories can be added by a topic summary. We essentially have two sets of categories in the same MW-page when you're on a board, but only one of them "catches". When you're on a board display it's the board categories that apply, and if you're on a single-topic view, the topic categories apply.

So we're already different enough from many other pages to warrant working on making sure we're able to accommodate the "usual" way things work. This doesn't mean Flow needs to adjust itself to any and every extension and gadget separately (or adjust to a specific one at all) but it does mean we should probably come up with a good way to bridge the different behavior in a way that makes other gadgets, extensions and MW-core future features "talk" to Flow better.

That's also why I said that we should figure out a way between both Flow and HotCat. From my impression (and I just skimmed HotCat, really) I think that the gadget will have to have some adjustments to be able to do this. In fact, I think this adjustment (emiting some event or hooking to some existing event in MW) will make it better not just for Flow, but in general. On the flip side, Flow should ideally accommodate, in general, manipulations of this type, especially if we support those in general in MW pages.

Hope that makes more sense?

[1] The event could be any other, I just tossed out the first that came to mind.

Some questions

  1. Categories added to a post - they do not affect "categorization" of a Flow topic/board?
  2. Adding/removing categories requires additional page refresh after Save to view updates in Categories
  3. editing Board description in VE displays empty CE - clicking Save wipes previously saved Categories
  4. a post (or a Summary) that has only Categories in VE is displayed as an empty post/Summary - something should be done about it?
  5. View a post with Categories, then switch to VE and click Save - "Post has no content." message. A user should click on Cancel or to enter some content - which is confusing.

Sorry, I shouldn't have moved this to QA Review just yet, because the change hasn't actually been merged (and so it isn't on beta labs yet). Something's wrong with Jenkins and it keeps refusing to merge Flow changes. I'll move this back to Code Review Started until it's actually merged.

Some questions

  1. Categories added to a post - they do not affect "categorization" of a Flow topic/board?

That's right. Only categories added to the board description have any affect. I think that's weird but it's how things work right now.

  1. Adding/removing categories requires additional page refresh after Save to view updates in Categories

That should be fixed once this change is actually merged.

  1. editing Board description in VE displays empty CE - clicking Save wipes previously saved Categories

That... shouldn't happen. Let's see if that still happens once this change is merged.

  1. a post (or a Summary) that has only Categories in VE is displayed as an empty post/Summary - something should be done about it?

I think that's correct behavior.

  1. View a post with Categories, then switch to VE and click Save - "Post has no content." message. A user should click on Cancel or to enter some content - which is confusing.

Hmm, so the wikitext editor does let you save that but VE doesn't? I kind of understand why, but that should be fixed. This might also be related to #3.

Change 230017 merged by jenkins-bot:
Add categories to the sidebar

https://gerrit.wikimedia.org/r/230017

  1. Adding/removing categories requires additional page refresh after Save to view updates in Categories

filed as T115357

  1. editing Board description in VE displays empty CE - clicking Save wipes previously saved Categories

filed as T115362

Checked in betalabs.

  • Blocking issues are resolved.

T115357: Adding/removing categories to Board description requires additional page refresh
T115362: Board description: Switching to VE and clicking Save removes Categories
T111110: Categories box is misaligned on Flow pages?

  • The only remaining issue (partially fixed): T115411 "Categories flash and disappear on Flow pages"