Closed GlenDC closed 9 years ago
Part of it would also to centralise some constant UI actions into a record with a minimum amount of information available.
For example: right now we render menu buttons in the following way:
viewSvgButton
ActionIcons.info_outline
(viewLabel showLabels "About")
"General information on Trixel."
[]
(model.work.state == TrState.About)
size model TrWork.address
(TrWorkActions.SetState TrState.About)
The unique properties of such a UI element are:
This is probably the minimum amount of information needed for a button. The record could also be extended for special buttons such as a toggle button that has additional property on top of the previously mentioned properties:
Implementations such as this will help to make the code more modular and cleaner by seperating the definition of UI elements and the actual render code, as it should be.
This should also revolve the mess that Graphics.elm now is.
UI Problems could be seperated in:
Once we're done with implementing the previously existing features of the editor and its ui, it would be a good idea to study the code base related to rendering and see if we can do better.