Widgets

Widgets are the core building blocks of a Workshop module’s user interface. Each widget is a self-contained functional unit that you place in the module layout, such as a table, chart, filter, or button. Widgets pass data to each other through the module’s variables rather than referencing each other directly. For example, a Filter List widget outputs a filter that is applied to an object set variable, and an Object Table widget displays that object set. Because widgets share data through variables, you can add, rearrange, or replace widgets without rebuilding the rest of the module.

Widgets are primarily designed to work with the Ontology. They display objects and their properties, let users filter and explore object data, and trigger actions that write decisions back to the Ontology. Together, these capabilities let builders structure how users reach and record decisions, which is what distinguishes an operational application from a read-only dashboard.

To build an application, place widgets into the layout and configure each widget's input and output variables, display options, and actions for your use case. If the built-in widgets do not cover your use case, you can build a custom widget.

To add a widget to a module, hover over any empty section to reveal the + Add widget button, then select it. You can also select the + button in a section or module header. Then, choose the desired widget from the widget selector modal that opens.

Screenshot of the Widget selector modal

Widget configuration

Once a widget has been added to a Workshop module, select the widget to reveal its configuration options on the right side of the screen. The example below will explain the general core concepts of Workshop widgets while showing how to configure a Filter List widget.

Widget setup

The core configuration options of a widget live within the Widget setup tab. This is where a module builder will configure the input and output variables of a widget (that is, the data that initially populates a widget and, when applicable, the data that is then produced and output by the widget) as well as any additional configuration and display options.

The screenshot below shows the initial state of a newly added and not yet configured Filter List widget:

Screenshot of an empty configuration for a Filter List widget

In the example of the Filter List widget seen above, the core configuration options are the following:

  • Object Set: This is the input variable to the Filter List widget and determines the filter options that will be available. This configuration accepts either an existing object set variable defined elsewhere in this Workshop module or a new object set variable to be created.
  • Filter List: This determines the filter options that will be shown in the widget. This configuration option is revealed in more detail once the Object Set is populated; it will then show the property types seen within the initial object set and allow searching by keyword on all properties and filtering by linked object presence.
  • Allow Users to Add and Remove Filters: This option adds a user interface to the widget that allows module users to add and remove the displayed filters.
  • Filter Output: This option is an Object Set Filter variable that is an output of the widget. This filter may be applied to another Object Set variable to filter the objects within the specified variable. By default, an output variable will be created when adding a Filter List widget to the module.

The below screenshot shows an example of the Filter List’s Widget setup tab after it has been configured:

Screenshot of a completed configuration for a Filter List widget

Metadata

The Metadata tab allows you to rename your widget and also access the widget’s raw JSON configuration.

Editing the Widget Name option will affect how the current widget is referenced through Workshop, most notably as a component in the Layout panel, and also in default variable names.

The Raw Widget Configuration displays how the current widget’s setup is stored in JSON and offers advanced module builders the option to quickly view, edit, or copy this configuration in its raw format.

Display

The Display tab enables configuration of the size of the current widget and allows module builders to switch between Auto (max), Absolute, and Flex sizing.

  • Auto (max): Automatically scale the height of a widget based on its contents while setting a max height. This option is not available for setting the width of widgets in a column layout.
  • Absolute: Specify a fixed pixel size for the widget.
  • Flex: Specify the ratio of this widget's height or width to that of other widgets in the current module so that widgets can scale appropriately as screen sizes or resolutions change.

The Display tab also includes Display optimization settings that control when a widget mounts and unmounts as users navigate within a module. These settings are useful for custom widgets that hold local state, widgets with expensive initial loads, or widgets that users return to frequently. For more details, see Widget display optimization.

Reuse widgets

After configuring a widget, you can copy it to reuse anywhere in the module. This capability is especially useful for recreating complex widget configurations; however, if the widget configuration may change often over time, an embedded Workshop module widget may be more appropriate. To copy a widget for reuse, select the widget and use Cmd+C (macOS) or Ctrl+C (Windows). Use Cmd+V (macOS) or Ctrl+V (Windows) to paste the widget into the Unused widgets area located at the bottom of the Layouts section in the left side panel. Add the widget to your module by choosing + Add widget, then find it in the Unused widgets tab of the widget selector modal.

Find the pasted, unused widget in the widget selector modal.

Alternately, the controls found for duplicating sections may be used to copy, cut, and paste widgets.

Input and output variables

Input and output variables control how data moves within a Workshop module.

Input variables define the data passed into a given widget, usually to then be displayed within the widget. An example input variable is the object set input that is passed to the Object Table, Filter List, Charts, and Map widgets.

Output variables define the data passed out of a given widget to then be consumed by a subsequent downstream widget or another variable. Example output variables include the “Selected Objects” object set output produced by the Object Table widget or the "Selected Value“ string output produced by the String Dropdown widget.

The Widget Configuration example above includes details on how the input variable (object set) and output variables (active object and selected objects) are configurable for an Object Table widget. For more detail on variables in general, see the Variables documentation.

Types of widgets

Widgets offer a variety of uses from visualizing information to enabling events and data writeback to be triggered from within a Workshop module. The widget overview lists many commonly used Workshop widgets, grouped into the following categories:

Formatting

Many widgets offer formatting options that help users style their displays. Two of these options are value formatting and conditional formatting.

Value formatting

Value formatting applies special formatting when rendering values in user-facing applications, making raw values more display-friendly. For example, value formatting in Workshop can be used to render values when setting up time series property columns in the Object Table widget and time series property displays in the Metric Card widget. This formatting is local to the Workshop module and not global to the Ontology. Learn more about setting up value formatting.

Numeric value formatting includes options to control the number of decimals displayed. Use the Fraction digits field to set the minimum and maximum digits shown after the decimal point; setting the maximum rounds longer values to that length without changing the underlying data. You can also control significant digits, integer digits, grouping separators, and notation. See Add value formatting for the full list of options.

The example below shows how value formatting is used to style the value displayed in an Object Table column named Weekly Cases, which shows the weekly number of COVID-19 cases observed in each country.

An Object Table column named Weekly Cases with value formatting applied to its values.

Conditional formatting

Conditional formatting applies rules to determine how numbers and sparklines are styled. In Workshop, conditional formatting can be used to style time series property columns in the Object Table widget and time series property displays in the Metric Card widget. This formatting is local to the Workshop module and not global to the Ontology. Learn more about setting up conditional formatting.

The example below shows how conditional formatting is used to style the summarized value and the sparkline displayed in an Object Table column named Weekly Cases, which shows the weekly number of COVID-19 cases observed in each country.

An Object Table column named Weekly Cases with conditional formatting applied to its summarized values and sparklines.