Last modified: 2014-10-09 00:09:11 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).
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?
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/
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.
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.
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"
I can't see the Amend UI can you include a screen shot? my guess (without seeing it) would be that it is neutral.
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".
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
(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.
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?
Change 165392 had a related patch set uploaded by Microchip08: change [[Special:Block]] to destructive https://gerrit.wikimedia.org/r/165392
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?
See bug 71856 for the documentation concern.
Change 165392 merged by jenkins-bot: change [[Special:Block]] to destructive https://gerrit.wikimedia.org/r/165392