You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the successMessageInput sets the notice flash message rather than a success flash. I was wondering if instead it could set a success flash and then provide a noticeMessageInput or allow passing a key to into successMessageInput that then determines the flash message key? The second option is probably the more flexible and controllers could then check for the a successMessageKey parameter to determine the notice level.
The reason for suggesting this mostly stems from wanting to have more stylised flash messages on the frontend or cp for success messages e.g they have a check mark icon, green background, however sometimes that styling doesn't always sit quite right in the context of the UI and the flash message better fits into the current notice category.
Admittedly the differentiation between success and notice is very minor on the surface and really is only a UI level issue and only really strikes you when you see it in action.
success: for critical user actions like saving an address
notice: for non critical user actions like logging out or a session expiring
error: for when things have gone wrong
I understand this could be a breaking change depending on if/how it's implemented, so the second option of passing a key to successMessageInput would be safer. successMessageInput could check to see if the second param is a string or array
and default to notice.
{{ successMessageInput('Saved') }}
<input name="successMessage" value="Saved">
<input name="successMessageKey" value="notice"> or set the default in the controller
{{ successMessageInput('Saved', { id: 'foo' } ) }}
<input name="successMessage" value="Saved" id="foo">
{{ successMessageInput('Saved', 'success') }}
<input name="successMessage" value="Saved">
<input name="successMessageKey" value="success">
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently the
successMessageInput
sets thenotice
flash message rather than asuccess
flash. I was wondering if instead it could set asuccess
flash and then provide anoticeMessageInput
or allow passing a key to intosuccessMessageInput
that then determines the flash message key? The second option is probably the more flexible and controllers could then check for the asuccessMessageKey
parameter to determine the notice level.The reason for suggesting this mostly stems from wanting to have more stylised flash messages on the frontend or cp for success messages e.g they have a check mark icon, green background, however sometimes that styling doesn't always sit quite right in the context of the UI and the flash message better fits into the current
notice
category.Admittedly the differentiation between
success
andnotice
is very minor on the surface and really is only a UI level issue and only really strikes you when you see it in action.I understand this could be a breaking change depending on if/how it's implemented, so the second option of passing a key to
successMessageInput
would be safer.successMessageInput
could check to see if the second param is a string or arrayand default to
notice
.Beta Was this translation helpful? Give feedback.
All reactions