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
tl;dr :info flashes are not really :info, they're :success.
When I put_flash(conn, :info, message), I don't expect the flash will have green success classes and a "Success!" header.
Example
This code:
Results in this flash:
Whether we want to say the Reset Password operation not erroring out is a success is a matter of professional opinion, but from a pure code perspective, my expectation is put_flash(:info, message) would pop a generic informational flash to the user and :success would pop the "Success!" toast.
Potential improvement
In my own projects I've wired @kind == :success to the "Success!" header and :info to a more vanilla "Info" flash styling/header in the flash/1 core component.
I can attempt to open a PR to add this to the core components and to the generators if desirable. I realize this is a departure from how these flashes have been by default for some time, but IMHO it'll reduce confusion.
The text was updated successfully, but these errors were encountered:
tl;dr
:info
flashes are not really:info
, they're:success
.When I
put_flash(conn, :info, message)
, I don't expect the flash will have green success classes and a "Success!" header.Example
This code:
Results in this flash:
Whether we want to say the
Reset Password
operation not erroring out is a success is a matter of professional opinion, but from a pure code perspective, my expectation isput_flash(:info, message)
would pop a generic informational flash to the user and:success
would pop the "Success!" toast.Potential improvement
In my own projects I've wired
@kind == :success
to the "Success!" header and:info
to a more vanilla "Info" flash styling/header in theflash/1
core component.I can attempt to open a PR to add this to the core components and to the generators if desirable. I realize this is a departure from how these flashes have been by default for some time, but IMHO it'll reduce confusion.
The text was updated successfully, but these errors were encountered: