Page MenuHomePhabricator

Don't use trash icon for 'return to search'
Closed, ResolvedPublic

Description

After selecting a template, there's a red trash icon at the top right of the template form, which closes the template form and returns to search. The tool tip is 'Remove template', but it doesn't really remove anything, and it definitely doesn't delete anything (which is what the trash icon is usually used for).

Instead of this, the close icon at top left should be changed to a back arrow, and the trash icon removed. This will also match how the VisualEditor template dialog works.

The 'remove' phrasing is also used in the warning that's shown when you try to close a template form:

image.png (323×712 px, 34 KB)

Remove template?
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.
[Cancel] [Remove template]

Event Timeline

@JSengupta-WMF @AAlhazwani-WMF Do you have an opinion on the message that's shown when a user tries to go back from a form that's had data entered (see above)?

Change #1131883 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateWizard@master] Move the 'remove' button to the top left

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

@JSengupta-WMF @AAlhazwani-WMF Do you have an opinion on the message that's shown when a user tries to go back from a form that's had data entered (see above)?

i would use the same exact wording from VE

image.png (884×1 px, 129 KB)

if we can use the OOUI quick confirm dialog, it would look like this

image.png (1×2 px, 289 KB)

That sounds good. The error state is built in to the OOUI dialog, so it'd be easier to keep it. With the new wording, it'll look like this:

image.png (563×720 px, 32 KB)

That sounds good. The error state is built in to the OOUI dialog, so it'd be easier to keep it. With the new wording, it'll look like this:

image.png (563×720 px, 32 KB)

sounds good! if feasible, i'd suggest to use the MessageWidget (type: 'warning') instead of the error. semantically speaking, it feels more suitable.

also, i don't know if we're using the same exact QQX from VE, or if this messaging will be a new QQX. if it's a new one, we could split the message to make the copy less redundant.

CleanShot 2025-03-31 at 12.50.35@2x.png (1×2 px, 332 KB)

sounds good! if feasible, i'd suggest to use the MessageWidget (type: 'warning') instead of the error. semantically speaking, it feels more suitable.

I'll do that as a follow-up to the current change.

also, i don't know if we're using the same exact QQX from VE, or if this messaging will be a new QQX. if it's a new one, we could split the message to make the copy less redundant.

Yep, these are separate messages (because TemplateData needs to be able to be installed without VE), so I've updated to "Your changes will be lost. This cannot be undone."

Change #1131883 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Move the 'remove' button to the top left

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

Samwilson changed the task status from Open to Stalled.Apr 10 2025, 3:55 AM

sounds good! if feasible, i'd suggest to use the MessageWidget (type: 'warning') instead of the error. semantically speaking, it feels more suitable.

I'll do that as a follow-up to the current change.

It turns out that this is not currently possible, and it appears to be a shortcoming of OOUI (although perhaps it's intentional). I've raised T391548: ProcessDialog warnings are displayed as errors.

Quiddity subscribed.

Re: User-notice / Tech News, I'm going to hesitantly decline this proposed entry (and then un-subscribe myself), as it doesn't seem like a significantly different change (i.e. It's not likely to confuse, nor delight, anyone) but is more of a nice small improvement that will make intuitive sense to anyone. If you disagree, feel free to re-add the tag, and we can discuss how to phrase an entry to highlight the important aspects to the movement. Thanks!

Sure, that sounds fine. We mainly thought of it because this is the only part of the template-favoriting project that's not behind the feature flag, and as such will be deployed immediately. But yeah, it's hopefully not a disruptive change!

Change #1135848 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateWizard@master] Change form-closing message from an error to a warning

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

Change #1138137 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateWizard@master] Remove error handling now dialog can't be closed from the form

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

Samwilson changed the task status from Stalled to Open.Apr 23 2025, 2:33 AM

Change #1135848 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Change form-closing message from an error to a warning

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

Change #1138137 merged by jenkins-bot:

[mediawiki/extensions/TemplateWizard@master] Remove error handling now dialog can't be closed from the form

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

dom_walden subscribed.

I don't see any trash icon anymore on enwiki beta.

What I see when I try to go back or press escape after changing the parameters of a template:

esc_after_param_change.png (557×723 px, 31 KB)