Open rmoorman opened 2 weeks ago
Hi @rmoorman, thank you for contributing! Did you see https://github.com/phoenixframework/phoenix/pull/5844 and especially https://github.com/phoenixframework/phoenix/pull/5844#issuecomment-2218478212?
Oh my! @SteffenDE , I indeed didn't see that.
I suppose @josevalim didn't have a change of heart yet in this matter? 😄
IMHO it is likely that at least one neutral message kind/style is often needed (instead of green).
On one hand this could be added (like in this PR at the moment). In case it would be feasible/wanted to move this forward, of course I would also amend the inline documentation.
But on the other hand, indeed the :info
style could be adjusted to be more neutral without adding another kind. I can also amend this PR to give the info flash message a more neutral styling. (wondering though how the title could be made more neutral 🤷🏻 )
Just let me know how you would like me to proceed.
Personally I think this introduces a very useful and intuitive option that most people would likely self-implement. An "official" option makes total sense.
Introduce a
:success
kind for flash messages in the generator output and update relevant documentation.Success messages that previously used
:info
now use:success
, ensuring they continue to appear in green with a "Success!" title.In certain cases (e.g. password reset),
:info
is retained to avoid disclosing too much information (such as the existence of an account). These messages now appear in blue with a "Please note" title.Rationale for those changes:
Differentiate informational messages from successful actions
Avoid confusion from informational messages styled in green, which can imply success
Ensure
:info
is used for neutral messages, and use:success
to clearly indicate completed actions