Skip to content

Latest commit

 

History

History
144 lines (129 loc) · 10 KB

TODO.org

File metadata and controls

144 lines (129 loc) · 10 KB

Public API

BREAKING Instead of `ValueAt`, just pass the `Tron ()` everywhere (while keeping the `ValueAt`-helpers), then it looks much more clear what actually happens;

BREAKING Close `ProxyValue` constructors from public;

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 API shouldn’t allow `nest` and `choice` with no items;

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 `Builder.noPaging`

NEXTVER The companion helper for building interface from JS;

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 BUG Nesting is not visible when it has no shape;

NEXTVER BREAKING `choiceBy` should accept the `Set a` as the last arguments, for the sake of chaining;

BUG NEXTVER JS `choice` as switch is not sending updates from buttons to JS;

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;

some incoming port to request the latest state of GUI;

UX / Design

NEXTVER Use pixel ratio;

NEXTVER When nestings don’t fit the screen, show something;

NEXTVER BUG Three controls are not positioned in the center;

Find a way to disable browser scrolling on space;

Test keyboard navigation, adapt it to the Dock;

NEXTVER Active condition for a button, some effect for when it is pressed;

Vertical pagination;

NEXTVER Consider selecting the page with current item when update came from JS;

Support touch events;

Nostalgic theme;

Some command palette/Spotlight thing to enter values using assignments;

Allow to enter formulae in the inputs;

Detachable: User can’t get the part of the UI back (use locked-mode for that?);

*** Hide the user view by default, when interface is detached; *** Or give user the choice if to view the original model or not;

Current controls

NEXTVER BUG Text editing is not finishing sometimes (see `BuildFromJs`); one needs to push the text control for it to save;

NEXTVER BUG The values of `Live` controls are fired but not seen while dragging;

Input box for the knobs;

Show the value on XY controllers as well;

What the axes center actually is? move (0,0) to the place where it is?;

New controls

Add slider mode to the knobs;

Multiple-choice control;

Locked controls;

Inner API / Logic

Tests;

  • [ ] Detachable;
  • [ ] Sending updates from/to JS;
  • [ ] …

NEXTVER Separate controls rendering in sub-modules;

NEXTVER Transfer `transient` states to the controls as well;

Move encoding/decoding controls inside their own modules;

Don’t init as (0, 0), rather something?

BREAKING `Tron.Tree.Expose` -> `Tron.Expose`?

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)`;

NEXTVER BUG sending value from JS to the choice is not switching it to the corresponding page;

Store pages inside nesting controls, do not redistribute every time;

NEXTVER Max cols / Max rows should not be needed (replace by enabling/disabling paging);

Too many `fold`s in `Property`; Split things into modules;

Events for `Controls` and Controls’ `update`/`view` should be inside the module;

Abstract `Layout.view` to `Html ((Path, Maybe a) -> 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;

BUG applying updates as several packages from JS gives no effect (see `ForTiler` example);

Detachable mode needs more testing;

BUG `toSwitch` is not sending proper events to JS;

Move keyboard & mouse drag-start/dragging/drag-end logic to controls themselves;

Move all possible control-related logic to the controls themselves;

*** 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 `Util` stuff to the corresponding modules;

Move functions related to controls to the controls themselves, hide the `Control` constructor from others;

Debug `RenderMode` (i.e. ensure `Debug` view still works);

Use `Size Cells`, like integer size, in `Layout`;

`Layout.pack` should also put `a` (from a `Property`) into every cell;

Move `Tron.css` in the code;

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);

Get rid of functions in the `Model`:

*** 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;

Do not store cell size in the `Gui msg`, it should be recalculated every time;

Do not store dock in the `Gui msg`, it should be recalculated every time;

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

Rename `Property` -> `Tree` or smth;

`Zipper` (`These`) as a separate module;

Deployment

For Docker, add ability to run any example using environment variable;

Examples

BUG NEXTVER The issue with coordinates in OneKnob;

BUG NEXTVER “Look at” is not working in Detachable;

BUG NEXTVER For Tiler: pagination is not displayed properly;

BUG NEXTVER DatGui seems no to work almost at all;

UI Constructor;

*** TODO BUG The generated code is outdated;

BUG NEXTVER A-Frame no iterface is visible;

BUG NEXTVER Everything many values are not sent;

ReportToJs A lot of senseless information in the JSON Tree;

Add some indication of the WS server status to the examples;

Include separate `Random` example to only utilize random generator, and, may be, test the detachable functionality, if the server is started;

Include links to the examples in the docs;

Share examples somewhere, i.e. deploy to github;

A-Frame renderer & Demo to some senseful state;

Constructor:

*** Highlight current cell; *** Reorder items in the nesting; *** Choice: ToKnob / ToSwitch;

Other

Blogpost

Tutorial @ GitBook