BREAKING Instead of `ValueAt`, just pass the `Tron ()` everywhere (while keeping the `ValueAt`-helpers), then it looks much more clear what actually happens;
BREAKING Stick to just one `WithTron.Backed`, since anyway it is possible to convert one to another using `Tron` methods;
NEXTVER Get rid of `maxRows` and `maxCols` in `PanelShape` and switch to manual pagination, do it only when user wants: ability to disable / enable pagination from builder + Move paging inside nested controls;
Detachable: Add `clientId` to the URL when it was generated (so that reloading the page won’t lose changes);
BREAKING do not store `ClientID` in the `RawOutUpdate`, but be able to add it with `Expose.Convert` helpers and so use it only in `Detachable`, where it is needed; (Partly done);
BREAKING? send some special value with `RawOutUpdate` for `Choice` controls or else it is hard to get what was actually chosen;
BREAKING? for choice, give user option either to show icon on the button, or the label, even if the items in the choice have icons;
BUG selecting item on the second page of the choice control could make other panels content disappear; (Tiler: selecting Tile/Tileset breaks Color Scheme/BG Color)
*** It seems `[0, 2]` and `[2, 0]` are conflicting in this case;
NEXTVER BREAKING `Exp.DeduceIn` should not require indices in the path; These paths are used for detachable interface, but the user of JS API is not able to determine indices without using `ack` port;
NEXTVER BREAKING `buttons` and stuff should all be able to be appended using a single function, at least in default case;
*** Also, the set of controls should come as the last arguments for the purpose of chaining : `[ Some, Items ] |> buttons`
NEXTVER BREAKING `choices` and stuff should all be able to be appended using a single function, at least in default case;
*** Also, the set of controls should come as the last arguments for the purpose of chaining : `[ Some, Items ] |> buttons |> choice Some toMsg |> toSwitch`
NEXTVER BREAKING `choiceBy` should accept the `Set a` as the last arguments, for the sake of chaining;
Controls should have some `toCode : Control … -> String` function inside their respective modules, for the `Constructor` to use, or else it will be always outdated;
BUG NEXTVER if the list of options is not defined at the start of the UI, they are sent as empty list;
*** Hide the user view by default, when interface is detached; *** Or give user the choice if to view the original model or not;
NEXTVER BUG Text editing is not finishing sometimes (see `BuildFromJs`); one needs to push the text control for it to save;
- [ ] Detachable;
- [ ] Sending updates from/to JS;
- [ ] …
Consider this module to use for `Tree`: https://package.elm-lang.org/packages/tomjkidd/elm-multiway-tree-zipper/latest/MultiwayTreeZipper
BUG Use labeled paths to communicate with JS, index-based IDs can change if some controls were added/removed, label paths have higher chance to be unique; The safest way is UIDs though;
Store a value even in `Nil` `Property`, so that property would always have some value, no `Maybe`s, it is easier to `map` the `Property` and always have some value inside; Rename `Nil` to `Ghost`; on the other hand `Ghost`s do not need paths or produce messages.... maybe… maybe `Tron msg` could be `Property (Maybe msg)`;
*** Render Text inputs separately for that to work: texts are the only controls that don’t react on click rather on input; *** Or, do it as `Layout.view : ((Path, Property a) -> Bounds -> … -> msg)` and pass controls rendering functions there;
*** Such logic can be found in code by adding some fake `()`-control and checking the places where we have to cover it / compiler fails; *** Also can be found by closing `Property` and `Control` constructors from exposing; *** Partly done as `Tron.Tree.Controls`
Move functions related to controls to the controls themselves, hide the `Control` constructor from others;
BREAKING? Use some safe Unique IDs to reference the position of the control in the tree, so that while the tree structure is changing, ID’s stay the same;
*** Or, store such IDs together with property; *** Consider having `Nil (Property msg)` instead of just `Nil`, so that any property could be hidden, but not absent in the tree; *** Check `indexedMap` usages, so that usage of the index is kept to minimum for nested items (mostly done);
*** do not store tree in the `Gui msg`, build it every time; *** store the actual messages for the current value in the controls, not the handlers (i.e. just `msg` instead of `v -> msg`); **** or don’t even store the messages, but only values, and only transform them to messages on the `view` stage; **** …like in the model it’s `Tron ()`, but *** for `.over`, traverse two trees with the same structure (don’t forget about ghosts) and move transient states between them; *** DONE BREAKING?: `Control`/`Tron`.`andThen` — due to handler and `Maybe`, now it is impossible to implement, so I did `Tron.with`; *** Remove `evaluate__` functions; *** Consider `Control setup msg value = Control (setup -> (Cmd msg, value))`
`(Path, LabelPath)` pairs are used quite often as well as `Path.advance` & `labelPath ++ [ label ]`, find something egeneric for that cases;
BREAKING? Change choice and nest to work with `Array`s since we usually need to get item by index? But Array syntax is not very friendly for API
*** TODO BUG The generated code is outdated;
Include separate `Random` example to only utilize random generator, and, may be, test the detachable functionality, if the server is started;
*** Highlight current cell; *** Reorder items in the nesting; *** Choice: ToKnob / ToSwitch;