vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
469 stars 83 forks source link

Notification presets #5769

Open rolfsmeds opened 1 year ago

rolfsmeds commented 1 year ago

Describe your motivation

Notifications are highly configurable: you can set a theme variant, a duration, and a position. This is good, as it gives developers a lot of flexibility in creating the kinds of notifications they want. But it doesn't provide good out-of-the-box defaults for common types of notifications.

Describe the solution you'd like

A number of notification presets (vaguely similar to the notification types in Vaadin 8) that provide good default presets for common types of notifications:

Info

Success

Warning

Error

Describe alternatives you've considered

No response

Additional context

Would be nice if these presets were globally configurable somehow, but that can be a later enhancement, as these hardcoded presets will in no way affect existing applications or prevent the level of configurability we have today.

rolfsmeds commented 1 year ago

Actually bundling theme variants like this might be problematic since they are theme-specific: currently only the Lumo theme has them; Material has none and the application might be using neither (although that would be rather niche).