billmania / roboquest_ui

The front-end logic for the RoboQuest project
0 stars 1 forks source link

Reduce cognitive load for configuring non-gamepad widgets #149

Open billmania opened 2 weeks ago

billmania commented 2 weeks ago

Implement for the Button, Indicator, Joystick, Slider, and Value widgets the same improved configuration process as was done for the gamepad widget via Issue #148.

billmania commented 2 weeks ago

The process to configure a new widget begins by opening the #newWidget dialog and calling setWidgetConfigDefaults.

The process of modifying the configuration of an existing widget begins by calling openConfigureWidgetDialog which in turn calls populateWidgetConfigurationDialog.

This enhancement may modify (or replace) the widgetDefaults object.

The input elements for these widgets are defined in index.htm and varies slightly based on the widget type.

Button Can only call a service, so service, serviceType, and serviceAttribute:constant. Remove the separate clickValue.

Value Can only subscribe to a topic and one attribute, so topic, topicType and topicAttribute. topicDirection is always 'subscribe'.

Slider Can only publish to a topic, so topic, topicType, and topicAttribute. topicDirection is always 'publish'.

Indicator Can only subscribe to a topic, so topic, topicType, and topicAttribute. topicDirection is always 'subscribe'.

Joystick Can only publish to one topic at a time, so topic, topicType, and topicAttribute. topicDirection is always 'publish'.