rossvideo / Catena

Other
5 stars 1 forks source link

consider defining a common subset of widget names #92

Closed mejohnnaylor closed 3 weeks ago

mejohnnaylor commented 6 months ago

discussion

JP - needs to be extensible - won't use an enum. Could crib from OGP JSON - move some into client hints - e.g. orientation. SDKs should include the common list of widgets.

JP will sieve the widgets we want from the current DB list.

format: all lower snake case. they-should-look-like-this to maintain backwards(ish) compatibility.

james-peltzer commented 4 months ago

These are the core widgets from DashBoard. In the cases where we have variations like include spinner, don't include labels, horizontal vs. vertical, etc. I have only included one option here - the we should only keep the prefix and make all variants config options.

WIDGET_DEFAULT = "default"; // client decides most appropriate WIDGET_TEXT_DISPLAY = "text-display"; // a read-only text view WIDGET_HIDDEN = "hidden"; WIDGET_LABEL = "label"; WIDGET_TEXT_ENTRY = "text"; // a text entry field WIDGET_PASSWORD = "password"; // a text entry field designed for password entry WIDGET_COMBO_ENTRY = "combo"; // a.k.a. dropdown list WIDGET_COLOUR_DOT = "dot"; // a status dot with some text - this one might be too DashBoard specific WIDGET_RICH_TEXT_LABEL = "html-text"; // text display with HTML formatting WIDGET_MULTILINE_TEXT_ENTRY = "multiline-text"; WIDGET_BUTTON_TOGGLE_STR = "toggle"; // a single toggle button designed for a choice constraint where option 0 = off and option 1 = on WIDGET_CHECKBOX_STR = "checkbox"; // same as toggle but render as a text box WIDGET_RADIO = "radio"; // show all choices as radio buttons WIDGET_RADIO_TOGGLE_BUTTONSTR = "radio-toggle"; // show all choices as toggle buttons WIDGET_LIST_STR = "list"; // regular list WIDGET_TREE_STR = "tree"; WIDGET_TREE_POPUP_STR = "tree-popup"; WIDGET_COLOR_CHOOSER = "color-picker"; WIDGET_COLOR_CHOOSER_POPUP = "color-picker-popup"; WIDGET_FILE_PICKER = "file-picker"; WIDGET_SPINNER = "spinner"; WIDGET_SLIDER = "slider"; WIDGET_TOUCH_WHEEL = "wheel"; WIDGET_VERTICAL_FADER = "fader"; WIDGET_DATEPICKER = "date-picker" WIDGET_TIMEPICKER = "time-picker"; WIDGET_EQ_GRAPH = "eq-graph"; //possibly too DashBoard specific WIDGET_LINE_GRAPH = "line-graph"; //possibly too DashBoard specific WIDGET_BUTTON = "button"; WIDGET_IP_ADDRESS = "ip"; //IP v4 entry WIDGET_PROGRESBAR = "progress"; // a progress bar paired with range constraints WIDGET_AUDIO_METER = "level-meter"; WIDGET_TIMER = "timer"; // this one is designed to automatically count in the UI... possibly a little too DB-specific WIDGET_ABSOLUTE_POSITIONER = "positioner"; WIDGET_JOY_STICK = "joystick"; WIDGET_TABLE = "table";
WIDGET_SCROLL = "scroll"; // scroll bar

mejohnnaylor commented 4 weeks ago

can we have ip-v4 and ip-v6 instead of just ip? I agree we should drop timer