Page MenuHomePhabricator

Review current style and integrate Messages and message boxes (errors, warnings) as WikimediaUI component
Closed, ResolvedPublic

Assigned To
Authored By
Volker_E
Feb 19 2016, 12:49 AM
Referenced Files
F29759759: Messages_20190713_error_boxed_level_AA_&_properties.png
Jul 13 2019, 7:28 PM
F29608265: Messages_20190617_M101.png
Jun 20 2019, 11:02 PM
F28340336: image.png
Mar 7 2019, 8:47 AM
F15240696: image.png
Mar 13 2018, 7:24 AM
F11805828: Снимок экрана 2017-12-13 в 14.50.19.png
Dec 13 2017, 11:49 AM
F11805817: Снимок экрана 2017-12-13 в 14.48.11.png
Dec 13 2017, 11:49 AM
F10812421: Screen Shot 2017-11-15 at 11.57.02 AM.png
Nov 15 2017, 8:00 PM
F7451633: pasted_file
Sep 27 2017, 4:19 PM
Tokens
"Yellow Medal" token, awarded by thiemowmde."Like" token, awarded by MusikAnimal."Like" token, awarded by Ladsgroup."Orange Medal" token, awarded by Krinkle.

Description

Messages and Message boxes are used in various places and should be part of M101

Current status quo

MediaWiki coremediawiki.UI
Message boxes 2016-02-18.png (589×618 px, 55 KB)
T127405 Form messages - MediaWiki Living Styleguide 2016-09-27.png (425×323 px, 30 KB)
.warningbox in application
image.png (258×2 px, 63 KB)
OOUIMobileFrontend
pasted_file (213×372 px, 12 KB)
Screen Shot 2016-09-20 at 10.02.40 AM.png (103×677 px, 13 KB)
Screen Shot 2016-10-28 at 11.01.06 AM.png (690×998 px, 64 KB)
MW core: .fmbox-editnoticeMW core: PostEdit messages
T127405 Messages – Editing Front end - Wikipedia 2017-01-06 13-02-26.png (306×1 px, 101 KB)
pasted_file (84×264 px, 8 KB)
Editing a disambiguation page on English Wikipedia, with an fmbox-editnotice on top and anonymous user edit warning with class .warningbox (core messages) below
MW core: .mw-warningMW core: .mw-warning-with-logexcerpt
Screen Shot 2017-11-15 at 11.57.02 AM.png (510×733 px, 102 KB)
(e.g. https://en.wikipedia.org/w/index.php?diff=666058337&oldid=666058325&useskin=vector)
Снимок экрана 2017-12-13 в 14.50.19.png (127×951 px, 43 KB)
(e.g. https://en.wikipedia.org/w/index.php?title=User:Vetazo_Khesoh&action=edit&redlink=1)
Special:UploadWizardExtension:Collections
T127405 Upload Wizard - Wikimedia Commons 2016-10-28 00-39-52.png (114×600 px, 25 KB)
Screen Shot 2017-05-31 at 4.09.13 PM.png (596×1 px, 239 KB)

Scope of this task are the visual aspects of message boxes.
Finding guidelines on Voice & Tone is important, but are not part of this specific task.

Definition of messages

  • Messages, neutral notices
  • Success messages
  • Warnings, define clear separation from:
  • Errors

Success criteria

  • Responsive
  • Color coding not the only way to identify type, additionally icons (definition of treatment) and voice&tone(?)
  • WCAG 2.0 level AA color contrast sufficient
  • Support of limited rich text and not only text, although be strict about limitation.
    • Rich text examples: Links, bullet and numbered lists, bold text
  • Works as block and toast messages (overlays)

Proposed solution

Messages_20190713_error_boxed_level_AA_&_properties.png (1×1 px, 182 KB)

Related Objects

StatusSubtypeAssignedTask
Resolved Spage
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
InvalidVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
DuplicateVolker_E
ResolvedNone
ResolvedJdlrobson
ResolvedJdlrobson
Resolved Nirzar
ResolvedVolker_E

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Also, MobileFrontend features some more styles

@colorWarningBackground: #feb;
@colorWarningBorder: #fde29b;
@colorWarningText: #850;
@colorSuccessBackground: #e1fddf;
@colorSuccessBorder: #b7fdb5;
@colorSuccessText: #009000;
@colorErrorBackground: #fae3e3;
@colorErrorBorder: #fac5c5;

Ouch!

Yup. We have warning, error and success states would be great to consolidate all these things. First things first they'll need to be created the same way...

@Jdlrobson For me this is not about the technical creation, it's about using one set of CSS classes. That's what WMUI Base is for.

JGirault renamed this task from Review current style and integrate Messages and message boxes as MediaWiki UI component to Review current style and integrate Messages and message boxes (errors, warnings) as WikimediaUI component.Oct 28 2016, 12:21 AM

I have a requirement for displaying a warning message in Maps (for more details see T148883).

Based on the new color palette and a brief discussion with @Nirzar , here is how the message may look like:

border=Y50, text=Y70, bgColor=Y10, fontWeight=bold
Screen Shot 2016-10-27 at 5.35.03 PM.png (519×614 px, 199 KB)
border=Y50, text=Y70, bgColor=Y10, fontWeight=normal
Screen Shot 2016-10-27 at 5.37.58 PM.png (517×615 px, 199 KB)
border=none, text=Y70, bgColor=Y10, fontWeight=bold
Screen Shot 2016-10-27 at 5.41.07 PM.png (516×614 px, 200 KB)
border=none, text=Y70, bgColor=Y10, fontWeight=normal
Screen Shot 2016-10-27 at 5.41.25 PM.png (518×614 px, 200 KB)
border=none, text=Y70, bgColor=B10, fontWeight=bold
Screen Shot 2016-10-27 at 5.45.01 PM.png (518×614 px, 200 KB)

Note: I left the icon black because for now we don't really have a solution for coloring the OOjs UI icons , besides generating new files.
Another note: the warning text is there as a placeholder, and is likely to change for a more precise message.

Also, as a separate discussions, we can discuss the position of the icon in case of a longer message:

Screen Shot 2016-10-27 at 5.49.21 PM.png (74×224 px, 12 KB)

Please give your feedback and suggestions

See also MobileFrontend implementation

Screen Shot 2016-10-28 at 11.01.06 AM.png (690×998 px, 64 KB)

Here are a few collected thoughts on UI:

  1. As color shouldn't be the only indicator (for accessibility reasons) it seems preferable to have an icon for these messages as well.
    1. Is it an icon on rounded background? Or do warning feature a triangle and errors an octagon or a rectangular shape?
    2. Are messages supposed to have an icon as well (example: “Log in to contribute” in MobileFrontend)?
  2. Are we going to feature two types of messages, one for the general use case, for example above login, or in a form, flat and one with box-shadow on products like maps, and also not fully opaque background-color?

Another one in Flow using the color that should be reserved for interactive elements only:

T116573 Manual talk:Coding conventions:CSS - MediaWiki 2017-01-05 11-18-35.png (146×746 px, 32 KB)

Another one in Flow using the color that should be reserved for interactive elements only:

T116573 Manual talk:Coding conventions:CSS - MediaWiki 2017-01-05 11-18-35.png (146×746 px, 32 KB)

At the time the accent color was consider appropriate for use as background color for messages. Using it only on interactive elements can be a useful cue, but I'm not sure that was already decided as the way to go or we need to refine the criteria a bit (e.g., should progress bars be blue?).

Currently a bug prevents the message to be connected to the input area as intended (framing the active interactive element as te blue borders do):

Screen Shot 2017-01-06 at 10.41.13.png (415×712 px, 50 KB)

(I created a separate ticket for that: T154762 )

Ok, so in deriving a solution for the Flow message some kind of yellow background was among the discussed options as well T108762.

Ok, so in deriving a solution for the Flow message some kind of yellow background was among the discussed options as well T108762.

To add a bit of context: the goal was for the message to be (a) noticeable (to prevent you from posting anonymously by mistake) but (b) not present it in a negative way as an error/warning (since it is legitimate to post anonymously if you want to do so). I think we can explore different solutions if needed, but I think we need to preserve these two properties.

Hello, what is the progress of this task? :)

Based on what I saw further up I made a mock to discuss on.


  • Regarding the colors: I kept red for an error, yellow for a warning and green for a success message. I could see grey as a remark, so it doesn't appear to be an actionable item. Have it without color makes it less "judging" I think, which is in my understanding, what these remarks should be.

    Picking parts of this up again in current work in T92026.
    I agree in various points with @Hanna_Petruschat_WMDE proposal.
    And have provided feedback on M241 itself, an example of UploadWizard:

    image.png (408×1 px, 70 KB)

    There is also the JS popup notice used by the watchlist star icon and some other things, native form errors (HTML5 form validation attributes which are handled by the browser directly - try submitting a registration form with an empty password for example), edit notices (which VisualEditor hides into a weird dropdown thing and the old editor just pastes on top of everything), wikitext parse errors (they use the errorbox, but not always, I think? maybe it depends on preview vs. save?), Lua console errors (open a Module: namespace page for editing and enter something into the debug window at the bottom); AbuseFilter warnings/errors. If you want to get into templates as well then also {{error}}.

    MediaViewer also has its own homegrown error page (open some image in MediaViewer, disconnect from internet, open another image on same page). Also there's the Varnish error page when MediaWiki servers are not available at all, although hopefully these days that's not shown much.

    @Tgr Yes, we have several native elements, which we leave as is as the browser doesn't let us reach into the elements (optgroup cross-browser or autocomplete menus in recent Chrome as examples aside of the error styles).
    This task is about the error notes which are already in place and styled by us.
    There's also T113114: Make all wiki-facing error pages consistent for error page styles.

    Change 517197 had a related patch set uploaded (by VolkerE; owner: VolkerE):
    [wikimedia-ui-base@master] Add user system message variables

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

    Change 517197 merged by jenkins-bot:
    [wikimedia-ui-base@master] Add user system message variables

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

    This has been merged and is now part of Design Style Guide's Components overview.
    Further amendments will be made on project-specific tasks.