GlenDC / trixel

An easy to use webtool, to make trixel art.
http://www.glendc.com/trixel/
MIT License
18 stars 0 forks source link

Clean up arguments of Layout functions #109

Open GlenDC opened 9 years ago

GlenDC commented 9 years ago

The layout system is pretty good now. The arguments lenghts however are quite lengthy, and the resulting generators aren't very flexible style wise.

The latter is especially true for generators that ar ea collection of multiple elements, in which styling the individual elements beyond the given options is impossible. Example:

field : FieldType -> (String -> TrWorkActions.Action) -> String -> String -> String -> TrColor.RgbaColor -> TrColor.RgbaColor -> TrColor.RgbaColor -> TrColor.RgbaColor -> Float -> Float -> TrLayout.Generator
field fieldType toAction label help value color inputColor inputBackground inputBorder labelSize size =
    {-| ... -}

As a user of the above given example generator:

Proposed solutions:

GlenDC commented 9 years ago

It's also not possible for now to add any other attributes to Html elements.

We know that it is important to keep the layout module simple, but at the same time it shouldn't sacrafice usability and control.