Last modified: 2014-10-09 00:09:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68145, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66145 - Special:Block should use mediawiki ui destructive
Special:Block should use mediawiki ui destructive
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
MediaWiki UI (Other open bugs)
1.24rc
All All
: Normal enhancement (vote)
: ---
Assigned To: Douglas Gardner
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-04 22:40 UTC by Jon
Modified: 2014-10-09 00:09 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Block this user (53.07 KB, image/png)
2014-06-04 22:40 UTC, Jon
Details
screenshot of reblock user interface (37.65 KB, image/png)
2014-10-07 22:33 UTC, Douglas Gardner
Details

Description Jon 2014-06-04 22:40:55 UTC
Created attachment 15567 [details]
Block this user

The `Block this user` button is not a constructive/destructive button. See screenshot in mobile (also effects desktop but is less obvious).
Comment 1 akansh 2014-08-31 05:54:48 UTC
I am new to open source, I need to know are you looking for css styling of this form? 
If that`s the case can I attach a css style file?
Comment 2 Andre Klapper 2014-08-31 13:00:28 UTC
akansh: Welcome! In short, the button should correctly use existing CSS (mw-ui- prefix).  In general, please check https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker#Get_started - Fixes (as patches) are welcome in the code review tool at http://gerrit.wikimedia.org/
Comment 3 Jon 2014-09-04 11:12:37 UTC
Update: With $wgUseMediaWikiUIEverywhere = true MediaWiki UI is applied but the button is constructive rather than destructive.

Solution in https://gerrit.wikimedia.org/r/157709 should make this an easy fix.
Comment 4 Douglas Gardner 2014-10-07 22:20:29 UTC
Do we still want the block button to be destructive? This bug was originally about it not having any style at all -- it now has a constructive style.

According to the style guide, destructive should be used for "actions which result in the destruction of data". However, no data is destroyed when a user is blocked: it is merely a "final action in the process that results in a change of state", which is what constructive is used for.

Another thing to think about: if the "block" button should be destructive, what about the "amend" button? Is it still destructive, even if we're shortening a block? Is it still constructive, even if we're lengthening it?

For reference, the style guide is located at https://tools.wmflabs.org/styleguide/desktop/section-2.html.
Comment 5 Jared Zimmerman (WMF) 2014-10-07 22:26:02 UTC
I would argue that it is destructive, when it comes to a user's (the target of the block) ability to interact with the site. You're right that it isn't destroying data, but clearly applies to the larger sense of a "destructive action"
Comment 6 Jared Zimmerman (WMF) 2014-10-07 22:27:22 UTC
I can't see the Amend UI can you include a screen shot? my guess (without seeing it) would be that it is neutral.
Comment 7 Douglas Gardner 2014-10-07 22:33:56 UTC
Created attachment 16698 [details]
screenshot of reblock user interface

It is identical to the block user interface, except (in the English localization) instead of "Block this user", it states "Re-block the user with these settings".
Comment 8 Jared Zimmerman (WMF) 2014-10-07 22:35:36 UTC
Thanks Douglas, is this interface mostly used to increase, or decrease the block timespan? if it is to increase I would suggest Destructive, otherwise, I'd suggest Neutral
Comment 9 Douglas Gardner 2014-10-07 23:00:01 UTC
(In reply to Jared Zimmerman (WMF) from comment #8)
> [I]s this interface mostly used to increase, or decrease the
> block timespan?
That would presumably depend on the wiki, or indeed the blocking user. I'm not sure we can really make assumptions on how the interface is used. I suppose one /could/ make some JavaScript to change the button as the user edits the fields, but that's probably taking it rather too far.

Thinking about it, having the button change color suddenly might be jarring: it is literally the same form, so an admin could feasibly:

1. Visit [[Special:Unblock]]
2. Type in the name of an already blocked user, and other details
3. Click the destructive "block user" button
   (page reloads)
4. Check the newly-appearing "confirm block" checkbox
5. Click the now constructive/neutral "amend user" button

[Although: there are other, perhaps more common, ways to access the "amend" form directly (e.g. [[Special:Block/10.11.12.13]], through the toolbox on user pages), in which case the button would be the second color from the get-go.]

Neutral feels like the wrong choice though, it *is* submitting data and performing an action; it's not something passive.
Comment 10 Jared Zimmerman (WMF) 2014-10-07 23:06:24 UTC
Douglas, we already have the concept of a button that changes color and style based on input validation, e.g. in Flow the submit button is disabled and grey until valid input   is entered then the button changes to Constructive. 

Given what you described, weather the amount of time is changed it is still a block, and that is still destructive (for the target of the actions, the blocked user) So I'm going to recommend we always use Destructive for this. 

How about we make it destructive for now, and gather feedback to see if this aligns with how people use the form via feedback?
Comment 11 Gerrit Notification Bot 2014-10-07 23:08:57 UTC
Change 165392 had a related patch set uploaded by Microchip08:
change [[Special:Block]] to destructive

https://gerrit.wikimedia.org/r/165392
Comment 12 Jon 2014-10-07 23:54:47 UTC
Thanks Doug for this input. Jared, Doug is right that if we refer to the current style guide we only advise using destructive when destroying data. If we want to change this to destructive we should also update the usage instructions.

We update the style guide usage instructions to change the wording. What should we change it to?
Comment 13 Jon 2014-10-08 23:21:56 UTC
See bug 71856 for the documentation concern.
Comment 14 Gerrit Notification Bot 2014-10-08 23:26:45 UTC
Change 165392 merged by jenkins-bot:
change [[Special:Block]] to destructive

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links