Add Toasts to OMAP #24
Replies: 2 comments 1 reply
-
Short Addition: One advantage of this approach is, that the toasts and their contents can be set via the backend and will simply be displayed when showing the page. So all logic stays in the backend and no async stuff is required (like websockets or other compexity).
|
Beta Was this translation helpful? Give feedback.
-
Short update here... there already is a working stimulus controller here: https://www.stimulus-components.com/docs/stimulus-notification/ and it works perfectly fine to change the css in a way that multiple toasts can be displayed: |
Beta Was this translation helpful? Give feedback.
-
I had a short discussion with @PaulMirsch this morning and we came to the topic "Toasts", i.e. "Notifications" that are shown after successfull (or failed?) operations.
I like the idea very much and would go for a "simple" implementation following our general development pattern.
My initial idea was to add a stimulus controller that takes a set of divs as "toasts" (similar to the map controller that takes a div for each point) and takes care about the rendering (styled via tailwind ofc) and also hiding / removing them after some time.
@Mario-glitch what are your thoughts about this?
Beta Was this translation helpful? Give feedback.
All reactions