Page MenuHomePhabricator

Add topic button should become disabled after click
Closed, ResolvedPublic

Description

At the moment it looks like the add topic button is clickable even when you are in the act of writing a new topic. The button should appear disabled so that it discourages editors from attempting to click on it.

Screen Shot 2022-05-05 at 12.40.34 PM.png (606×1 px, 188 KB)

Event Timeline

ppelberg edited projects, added Editing-team; removed Editing-team (Kanban Board).

@matmarex is this ticket needed or is the Add topic button within the sticky header's disabled stated covered by what you already implemented in T304187?

It's not covered by that task. I just had a look, and there seems to be no way to actually mark it as disabled…

To elaborate: the only way to make a mw-ui-button look disabled is to set the disabled attribute, but that only works on <button> and not <a>. In addition, even if we hacked around that, there's no way to make the icon color/transparency adjust to the disabled state. I'm not very comfortable hacking around this many things, and also not comfortable inventing a new "proper" way to do it for a twice-deprecated legacy UI library.

@Esanders came up with a marvellous hack for this, which doesn't require us to reinvent the world and which seems unlikely to break anything else. Let's try that.

Change 819168 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Make "Add topic" button in Vector sticky header disabled after click

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

Change 819168 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Make "Add topic" button in Vector sticky header disabled after click

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

EAkinloose added a subscriber: EAkinloose.

✅ Add topic button should become disabled after click
Testing on https://cs.wikipedia.beta.wmflabs.org/wiki/Diskuse_s_wikipedistou:TestEsther

Screenshot 2022-08-03 at 04.07.20.png (1×3 px, 345 KB)