-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose flash keys ERROR and SUCCESS #468
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably we should expose not these constants, but METHODS forbreading/adding these flash values?
@asolntsev I disagree. there are standard methods for that, like We currently have those same constants in our code, simply because they are not exposed and i dont like to use stings everywhere. :) |
Can you share a code sample - how do you use those constants? |
@asolntsev suuure: flash.get(ERROR)?.let {
div("hint hint--error") { +it }
}
flash.get(SUCCESS)?.let {
div("hint hint--optional") { +it }
} div(if (flash.contains(SUCCESS) || flash.contains(ERROR)) "low-top-margin" else "") {
// ...
} |
Thank you. This is what I meant. (though, it's not very important because internals of "flash" are already leaked anyway...) |
@asolntsev Updated it, have a look |
We had them defined locally, which it weird: they should come from the source.