Page MenuHomePhabricator

VisualEditor: Allow editing of a category link (not just add/remove)
Open, LowestPublic

Description

In the page options menu, you can add a category by typing its name in the "add a category" box and delete a category by clicking the the trash icon in the category inspector. However it's not currently possible to edit the name of the category.

For example, if the page is currently in [[Category:Admirals of World War I]] and I want to put it in [[Category:Admirals of World War II]], I can do that easily in the wikitext editor by simply typing an extra "I". In VisualEditor, I have to completely delete the first category and then add the second from scratch.

Details

Reference
bz65518
Related Changes in Gerrit:

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:25 AM
bzimport set Reference to bz65518.

Just noticed that the User guide[1] says: "On the Page options menu there are options [...] to add, edit, or delete categories."

I'd say that actual "editing" must involve the resolution of this bug, and otherwise it is just adding and deleting.

[1] https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide

(In reply to Amir E. Aharoni from comment #1)

Just noticed that the User guide[1] says: "On the Page options menu there
are options [...] to add, edit, or delete categories."

I'd say that actual "editing" must involve the resolution of this bug, and
otherwise it is just adding and deleting.

[1] https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide

You can edit each category to add, change or remove the sort key for the page for that category.

nshahquinn-wmf renamed this task from VisualEditor: Category names cannot be edited to VisualEditor: Categories cannot be edited, only added or deleted.Jul 24 2015, 12:26 AM
nshahquinn-wmf lowered the priority of this task from Low to Lowest.
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf set Security to None.
Krinkle renamed this task from VisualEditor: Categories cannot be edited, only added or deleted to VisualEditor: Allow editing of a category link (not just add/remove).Jul 1 2016, 5:33 PM
Krinkle updated the task description. (Show Details)

Screen Shot 2016-07-01 at 18.34.20.png (1,186×390 px, 59 KB)

Being able to edit this would make a big difference for UX. Right now it's border-line inaccessible to make the intended change.

Additionally, the label is not selectable by cursor. The category object is shielded from text selection for some reason, requiring the user to retype it from scratch. This gets worse with T139189.

This was just mentioned to me by an experienced editor as the #1 reason why he doesn't use the VE much. I was about to report it, and found that not only it's already reported, but that it's reported by myself :)

Change #1132682 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Allow renaming in the categories dialog

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

Patch works by adding a rename button to the popup, which is a shortcut to removing the category and dropping its name into the new-category input:

CleanShot 2025-04-01 at 09.51.19@2x.png (688×438 px, 42 KB)

CleanShot 2025-04-01 at 09.51.33@2x.png (684×246 px, 26 KB)

UX issues:

  • it might not be obvious that the editor needs to adjust the input contents and then hit enter?
  • it moves the category to the end of the list, so if the position matters then the user would need to drag it back
  • it discards the sort key entirely (but probably should, since presumably it wouldn't apply to a different category)