Page MenuHomePhabricator

QuizGame admin panel: Pressing delete or reinstate should ask for confirmation before performing the action
Closed, ResolvedPublic

Description

Similar to T155322:

After clicking one of these, it'll automatically do whatever action you pressed. They're quite close and thus, easy to accidentally click one of them. Deleting is also a destructive action and reinstating say, an inappropriate-submitted picture game isn't wanted, so it should ask for the person to confirm and acknowledge what kind of action they're performing before it's actually performed.

Event Timeline

Is there any mediawiki special page for confirmation? Or create simple special page, with redirect to AJAX action?

Ok. Decided to use OOjs UI popup. WIll provide patch tomorrow.

@FilipGCI I apologize I didn't get to you earlier! So it's an AJAX action, and you access by visiting Special:QuizGameHome and pressing the button that says "Create a quiz", which will lead you to Special:QuizGameHome&questionGameAction=createForm, here's what it looks like:

http://social-tools.wmflabs.org/w/index.php?title=Special:QuizGameHome&questionGameAction=createForm

Note that social-tools.wmflabs.org is the main, official testing environment for all Social-Tools extensions under the social tools umbrella. :)

Change 332399 had a related patch set uploaded (by Filip):
Added confirmation dialog to delete action.

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

quizgamess.png (783×1 px, 109 KB)

quizgamess2.png (507×1 px, 77 KB)

(Out-dated - reinstate is changed to restore in new PS)

Let me show you a task that's related to this, which is T151112. Here's what I wrote:

If you press the back arrow during an edit, it'll say "Do you really want to abandon your edit?". It'll also give two choices, "Cancel", and "OK".

This is confusing and both are too generic. It doesn't exactly state what will happen next if you press one of them. For me, cancel can mean "Yes, I want to cancel my edit", or "No, I want to continue my edit." Which one is it? I figured it out after experimenting, but I believe it can be restated so it should say:

"Yes, I want to abandon my edit"
"No, I want to continue editing"

TL;DR - They can be very vague labels and confusing to choose from. They should be more specific - in this context, the choices should be:

  • If you choose to delete:
    • Cancel
    • Delete
  • If you choose to reinstate/restore/unflag:
    • Cancel
    • Restore (or whatever we choose)

Not sure what word we're keeping for the latter, it's currently being discussed (on here, on patch, and on IRC).

Uploading updated screenshots.

1.png (707×1 px, 86 KB)

2.png (552×1 px, 80 KB)

@SamanthaNguyen : @ashley: Will wait for merge of this patch before adding this to PictureGame.

@SamanthaNguyen: Not sure, does "Un-flag", should have constructive flag, or destructive?

I'd say constructive, since I'd consider the "destructive" adjective describes an action for making something go away, yet unflag means we're making it reappear. :)

I posted some comments @FilipGCI

Change 332399 merged by jenkins-bot:
Added confirmation dialog to delete action.

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

Patch got merged - closing as resolved