vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Purpose of notification’s “p-notification__status” isn’t obvious

Open matthewpaulthomas opened this issue 5 years ago • 5 comments

Pattern to amend

Notification

Visual

TBD

Context

[Expanded from #2664]

Twice this week I’ve seen the boilerplate p-notification__status text from Vanilla’s examples copied into production code where it isn’t appropriate:

All else being equal, if it’s possible to convey something effectively with visual design, that’s better than doing it with text, because it’s quicker to comprehend.

That’s why in most component libraries — including Vanilla — an alert’s visual design conveys what kind of notification it is. That makes vague text like “Information” or “Success” an anti-pattern. Many libraries allow alerts to have headings, but they do not use headings for that purpose.

What should happen:

  • In Vanilla’s code examples, <span class="p-notification__status"> should not contain “Warning:”, “Error:”, “Success:”, or “Information:” that could be mistaken for a real suggestion.
  • The reference should describe when to use p-notification__status, and what kind of text it should contain.

matthewpaulthomas avatar Nov 22 '19 13:11 matthewpaulthomas

@bartaz @lyubomir-popov is this still relevant or can it be closed (also considering the new notification pattern coming)?

clagom avatar Apr 28 '21 14:04 clagom

@clagom @wgx's spec contains the solution I think - but our current examples still contain the problem described in this issue. Once we update the examples to match Will's spec, this will be resolved.

In other words this is ready for development I think - the task being to update the examples to match the copy here: image

lyubomir-popov avatar Apr 28 '21 16:04 lyubomir-popov

Notifications pattern was updated and the "status" element was renamed to "title" which should make it purpose clear.

bartaz avatar Jul 15 '21 10:07 bartaz

The renaming may help, and one of the two errant examples has been fixed. Unfortunately, one remains, and another has appeared:

Error: Node must be connected to a network. Success: Code successfully reformatted.

(You could say this is fine, but if so, why don’t the Information and Caution variants do the same?)

It may also help for the reference to call the variants something other than “severity levels” since they aren’t really.

matthewpaulthomas avatar Jul 18 '21 08:07 matthewpaulthomas

@matthewpaulthomas thanks for pointing this out. @bartaz can we just use what @wgx's has used in his wireframes?

lyubomir-popov avatar Jul 20 '21 08:07 lyubomir-popov