Page MenuHomePhabricator

Add all the overlays required for TemplateWizard
Closed, ResolvedPublic5 Estimated Story Points

Description

With the new TemplateWizard design, we have a bunch more popups to show to the user.

Popups covered in this ticket:

  • Giving the user a confirmation popup when they try to delete the template with data in any of the fields.
    • Head: Remove template?
    • Text: The template you are attempting to remove contains data you have input. Removing the template will also remove the information you have added to the template. This action is not reversible.
    • Options: Cancel, Remove template.
  • Giving the user a confirmation popup when they hit 'Cancel' with data entered anywhere in the template fields.
    • Head: Leave wizard?
    • Text: Leaving the wizard will result in loss of any data that you have added to the template.
    • Options: Cancel, Discard changes.

Popups covered elsewhere:

  • Giving the user a confirmation popup when they hit 'Insert' with data mismatch in any of the fields. (Addressed in T191264)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika set the point value for this task to 3.Mar 20 2018, 11:12 PM
Niharika renamed this task from Prevent submission of empty required fields to Popup on submission of empty required fields; Popup on hitting cancel with data in form.Apr 2 2018, 11:49 PM

The first part of this will be covered by T191264, because empty required fields are treated as a type of validation exception and so are caught along with misformed values etc.

Is it okay to have the same message for required fields as for others (the one specified in T191264)?

Niharika renamed this task from Popup on submission of empty required fields; Popup on hitting cancel with data in form to All the popups!.Apr 25 2018, 12:46 AM
Niharika updated the task description. (Show Details)
Niharika changed the point value for this task from 3 to 5.
Niharika added a subscriber: Niharika.

@Samwilson Let me know if I missed anything!

Hi @Niharika, the strings for cancel look good. Do you need a mock of this text in Zeplin or in the Invision? (Sorry I know we touched on this yesterday afternoon, but now I forgot what we decided).

Hi @Niharika, the strings for cancel look good. Do you need a mock of this text in Zeplin or in the Invision? (Sorry I know we touched on this yesterday afternoon, but now I forgot what we decided).

Na, that's fine. I just wanted to make sure the wording was correct. Thanks for taking a look!

Niharika renamed this task from All the popups! to Add all the overlays required for TemplateWizard.Jul 5 2018, 10:33 PM
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.

Giving the user a confirmation popup when they try to remove a field with any data.
Giving the user a confirmation popup when they hit "Remove all fields" with data in any of the non-required fields.

The current behaviour is that a field with a value in it can be added and removed without the value disappearing. Is this okay, or should the value be wiped? If it's stored, it means there's not much point in warning people in these two situations.

Giving the user a confirmation popup when they try to remove a field with any data.
Giving the user a confirmation popup when they hit "Remove all fields" with data in any of the non-required fields.

The current behaviour is that a field with a value in it can be added and removed without the value disappearing. Is this okay, or should the value be wiped? If it's stored, it means there's not much point in warning people in these two situations.

That's a good point. If that is already the behavior, I think we should skip the warnings for these two cases.

@Mooeypoo: should the close-template button be turned into an ActionWidget that's tied to the dialog? Or do actions only appear in the header and footer of a dialog?

I think by default, actions appear on top and bottom, so while that is considered OOUI dialog's "normal" behavior (to have buttons on footer/top, if the design is different here, then we shouldn't bother.
An ActionWidget would just be a [widget][button] set, like input/button or input/label, etc.

What I would recommend, though, is that both icon buttons have 'title' property (you can add those in the config) for both screen readers and for clarity for users, so they see a string when they over over the icons -- especially the "link" icon. It's not 100% clear what that means.

I think by default, actions appear on top and bottom, so while that is considered OOUI dialog's "normal" behavior (to have buttons on footer/top, if the design is different here, then we shouldn't bother.
An ActionWidget would just be a [widget][button] set, like input/button or input/label, etc.

I was thinking that if it were an action, we'd use ProcessDialog.showErrors() to show the actual error (because we want to use the same Dialog error system). But maybe that can be done even if it's not an action, i.e. is it permitted to raise our own error and do some custom handling of it? Or should the .oo-ui-processDialog-error div be created manually?

Change 445941 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/TemplateWizard@master] Warn when closing template form with values

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

I've had a crack at the first warning, building a matching error div to the one that's made by showErrors(). This feels like a bit of a clunky way to do it... anyway, will comment further on the above patch.

I wrote a comment on the ticket; if we hack, let's hack on the "make it a hidden action" rather than build a whole window that looks like the error message.

Change 445941 merged by jenkins-bot:
[mediawiki/extensions/TemplateWizard@master] Warn when closing template form that contains any values

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

Niharika moved this task from QA to Q1 2018-19 on the Community-Tech-Sprint board.