SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

Table types #202

Closed SimonBiggs closed 6 years ago

SimonBiggs commented 6 years ago

Change the table types to align with variable types used within ScriptedForms.

For example allow both tick and toggle. Also allow dropdown.

Convert between scriptedform types and pandas types intelligently.

Make it so that the type selection box is not visible by default. Make a flag parameter "type-editing" or something similar which makes the type selection display.

Have a "type lock". This can be passed to the table. It would then lock the type to be number, string, dropdown, tick, toggle, or output.

The "output" type would just display and not allow inputs.

Need to think of a way to pass dropdown options to a particular column.

SimonBiggs commented 6 years ago

Leave the pandas json type editor as is. Still don't display it by default.

Have the type lock just influence the interface. A "number" type lock will mean only number input boxes ever show up in that column. A "tick" type lock means no matter what the underlying pandas type is, tick boxes will only ever display in that column.

Have the read only type be called "readonly".

Define the type lock using a python dictionary. Keys correspond to column names, items corresponding to the type to be locked to. A type lock is not required at all, or some columns can be left out. If no type lock is applied then the display will be either a string input (which can handle number and string) or a set of tick boxes (for boolean).

Suspect that the use of {} will mess up the Angular template. Need to solve that before a stable release.

SimonBiggs commented 6 years ago

All but dropdown implementation is complete.

SimonBiggs commented 6 years ago

Complete.