Page MenuHomePhabricator

Use MessageWidget (type: 'error') for all errors in FileImporter
Closed, ResolvedPublic2 Estimated Story Points

Description

Switch styles for error messages to match OOUI MessageWidget type: error.

Event Timeline

Lena_WMDE set the point value for this task to 2.

Change 604431 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Display all errors in ImportSuccessSnippet

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

Change 604431 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Display all errors in ImportSuccessSnippet

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

Change 605535 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Use OOUI error box for all failed remote actions

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

Change 605565 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Change all warning/error boxes to use the OOUI design

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

@Lena_WMDE (and possibly @ecohen), as it turns out this ticket allows for several different interpretations. It seems our (the devs) combined memories are not complete enough.

1. Switch to OOUI

I believe we should change all message boxes to use the OOUI style. Open questions:

Should this include the initial, yellow Beta message as well?

Should this include the green success message as well? Note this will include a checkmark icon by default.

2. Change color

Most failures are shown in red. No question here:

However, some of these are not red but yellow. This happens when an import is blocked because of a forbidden template or category. This is not a failure but an expected behavior, therefor yellow. Should this be turned red?

After an import was successful, there might still be an error when FileImporter tries to edit or delete the source file. This is currently shown in yellow below the green success message:

This color decision is somewhat wonky. On the one hand, it's an unexpected failure. The user must manually fix it. On the other hand, the import was successful. Hm. Should we change this to red?

@thiemowmde These are great points - thanks for raising them.

  1. OOUI everywhere -- Yes, agreed that they should all match and be OOUI widgets, including yellow and green.
  1. Changing colors -- I think that the beta mode message would make the most sense as the gray OOUI notice message; I would change this. Also, agree that failures should stay red. As for the gray area of errors during a successful import, I do actually think they should stay yellow. After discussion with @Lena_WMDE , we decided this makes the most sense. They are not blocking the user's primary goal (the import), which has been completed. I do think the other side could be argued, but then a green with red message could be confusing so it seems better to avoid this too.

Change 606646 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Update all remaining failure messages to use OOUI style

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

@ecohen, I'm not sure about this one:

This happens after the user clicked "do the import now" and there is any kind of hard error the user can't do anything about during the import (e.g. an API or a database not responding, a hidden file, a video that's to large). Basically 2 questions:

  • Does it makes sense to have these 2 messages?
  • Both yellow, both red, or one yellow and the other red?

Change 605535 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Use OOUI style for all import success and failure messages

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

Change 605565 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Change all warning/error boxes to use the OOUI design

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

I think it makes sense to be red as the primary goal, importing, has failed. Ideally, it would be one message saying "Import failed. {{Explanation about why it failed}}" Even better might be formatting on two lines like this:

Import Failed
Longer sentence/explanation about why it failed

Is that possible or does it overcomplicate it? If not, then the simplest solution seems to me that they are both red.

Change 606682 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Report failed imports with a red error instead of yellow

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

Change 606682 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Report failed imports with a red error instead of yellow

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

Change 606646 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Update all remaining failure messages to use OOUI style

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

Still to demo:

Showing a successful import with green success message and a yellow warning about a failed remote edit.

This comment was removed by ECohen_WMDE.
Lena_WMDE closed this task as Resolved.Jun 23 2020, 12:21 PM
Lena_WMDE claimed this task.
Lena_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-06-10 board.