Page MenuHomePhabricator

OOUI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in WikimediaUI theme)
Closed, ResolvedPublic

Assigned To
Authored By
matmarex
Sep 14 2016, 7:33 PM
Referenced Files
F28338639: image.png
Mar 6 2019, 9:56 PM
F28333479: image.png
Mar 6 2019, 2:09 AM
F28195237: image.png
Feb 11 2019, 11:26 PM
F15917880: image.png
Mar 20 2018, 6:43 PM
F4491169: Screen Shot 2016-09-20 at 10.02.40 AM.png
Sep 22 2016, 7:49 PM
F4468719: pasted_file
Sep 14 2016, 7:33 PM
F4468721: pasted_file
Sep 14 2016, 7:33 PM

Description

In T85853#2550072, @Tgr wrote:

OOUI error messages seem awkward to me, even apart from the issue fixed in T142639: there is just no visual sign I would recognize as error (such as red color or background). I feels closer to the explanatory text created with the 'help' keys on VForm.

I think the styling in the Apex theme is actually a bit better. (Screenshots below are from https://gerrit.wikimedia.org/r/284902.)

WikimediaUIApex
pasted_file (213×372 px, 12 KB)
pasted_file (199×339 px, 10 KB)

Warnings are even worse, they are set in the same font and color as any random label and only highlighted with a small icon.

Screen Shot 2016-09-20 at 10.02.40 AM.png (103×677 px, 13 KB)

The styles here were created by myself when implementing this feature (which we needed urgently for OOUI HTMLForm: T106947) and I probably spent about 30 seconds thinking about them. We should rethink them ;)

We might draw some inspiration from the success/warning/error message boxes in MediaWiki, see T127405: Review current style and integrate Messages and message boxes (errors, warnings) as WikimediaUI component.


Improvements integrated

WikimediaUIApex
image.png (582×1 px, 74 KB)
image.png (241×673 px, 28 KB)
  • Increased visibility by changing color of errors to destructive Red50,
  • invented a separate warning message with a Yellow50 icon, but black text for achieving WCAG 2.0 level AA contrast (also makes code semantically cleaner)
  • gonna provide a tad more whitespace to let messages better focus
  • put icon on top position for immediate identification on mobile on multiline messages
  • add icons to Apex for better message focus and identification
  • clean up some unnecessary properties to remove code duplication

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
ResolvedMarkTraceur
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
DuplicateNone
InvalidNone
ResolvedJdlrobson
ResolvedBUG REPORTmatmarex
Resolvedmatmarex
OpenNone
Resolved Esanders
DuplicateNone
ResolvedTTO
ResolvedJayprakash12345
DuplicateNone
ResolvedJdlrobson
ResolvedVolker_E
ResolvedVolker_E

Event Timeline

matmarex renamed this task from OOjs UI FieldLayout errors do not look sufficiently like errors (especially in MediaWiki theme) to OOjs UI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in MediaWiki theme).Sep 22 2016, 7:49 PM
matmarex updated the task description. (Show Details)
Jdforrester-WMF renamed this task from OOjs UI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in MediaWiki theme) to OOjs UI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in WikimediaUI theme).May 20 2017, 8:24 AM
Volker_E renamed this task from OOjs UI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in WikimediaUI theme) to OOUI FieldLayout errors/warnings do not look sufficiently like errors/warnings (especially in WikimediaUI theme).Jan 6 2018, 7:49 AM
Volker_E updated the task description. (Show Details)

In OOUI 0.26 they look like this:

image.png (110×313 px, 8 KB)
…which is maybe a bit better, but not much better.

Currently, I can't identify use cases for differentiating between user message groups 'errors' and 'warnings'. OOUI's handling as of v0.30.2 is that we offer 'notice' and 'warning/error' messages, where latter labels are used interchangably.
For the time being it seems more reasonable to
a) provide only a 'warning' flag (warning, as not every warning is an error, but every error is a warning, so resulting in more application flexibility) or
b) have an 'error' flag that is 1:1 equivalent to 'warning'

It's unsettling to have oo-ui-fieldLayout-messages-error > oo-ui-flaggedElement-warning

A note on the naming: in OOUI, there are "errors" and "notices"; in MediaWiki, they are correspondingly called "errors" and "warnings". This inconsistency is stupid and I'm afraid it is my fault. (In OOUI, there is also a "warning" flag, which is completely unrelated, and I think here someone else is to blame.)

The difference is that errors have to be corrected by the user before a form can be submitted, while notices/warnings do not. (This is just the convention, not enforced by the code.)

For example, UploadWizard uses both errors and notices/warnings in this manner:

image.png (980×1 px, 127 KB)

Change 489917 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] Implement 'error' flag and 'warning' type messages

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

Change 489917 merged by jenkins-bot:
[oojs/ui@master] Implement 'error' flag and 'warning' type messages

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

A bit of context to the change above and several other smaller amendments:

  • We've increased visibility by changing color of errors to destructive Red50,
  • invented a separate warning message with a Yellow50 icon, but black text for achieving WCAG 2.0 level AA contrast (also makes code semantically cleaner)
  • gonna provide a tad more whitespace to let messages better focus
  • put icon on top position for immediate identification on mobile on multiline messages
  • add icons to Apex for better message focus and identification
  • clean up some unnecessary properties to remove code duplication

Change 494827 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] Apex theme: Bring icons and layout styles from WikimediaUI theme

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

Volker_E updated the task description. (Show Details)

Change 494827 merged by jenkins-bot:
[oojs/ui@master] Apex theme: Bring icons and layout styles from WikimediaUI theme

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

We're staying with inline messages similar to MediaWiki's core, while message boxes are for places like full article messages.

Volker_E claimed this task.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.
Volker_E moved this task from Reviewing to OOUI-0.30.4 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.30.4); removed OOUI.

Re-opened as color emphasis on warning/notices not yet given.

Change 494864 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] themes: Provide 'emphasized' color for messages

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

Change 494864 merged by jenkins-bot:
[oojs/ui@master] themes: Provide 'emphasized' color for messages

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

Change 494883 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.30.4

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

Change 494883 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.30.4

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