I’m building a page with elm-ui (the most recent one) where I have a couple of floating elements that may or may not appear depending on certain conditions.
I express this with a list of inFront attributes for the layout element. For now I make them appear and disappear by swapping them the inFront content with Element.none, like so
I would extract the if model.toSave ... portion out to another top level function. Something like viewSaveButton : { a | toSave : Bool } -> Element Msg or possibly viewSaveButton : Bool -> Element Msg. Then your parent element is