Section author: Jonathon Love
User-interface definition (.u.yaml
-files)¶
Overview¶
The UI definition is a YAML-file in thejamovi/
directory, with the extension.u.yaml
. The UI definition is pretty straightforward. It follows a tree structure that defines the child/parent-relationship between the controls. The top level or root control is the first thing that is described by the UI YAML. The file is named to match the name of the analysis it describes, but converted to lowercase. An example isttestis.u.yaml
.
Properties¶
Property Description Form name
The name of the analysis. Unique string title
Sets the title to be displayed at the top of the option panel. string jus
Defines the syntax version used by the u.yaml
-file.string of form ‘number.number’ stage
Sets the stage display filter. 0 - Released1 - In development2 - ProposedcompilerMode
Sets the compiler interaction mode. enum: tame, aggressive children
Sets the child control definitions. Array of valid control definitions. Example
name: descriptives title: Descriptives jus: '2.0' stage: 0 compilerMode: tame children: # array of child definitions
Further Detail¶
The root control is a
ParentControl
and as the name suggests serves as a parent to child controls. All parent controls contain the propertychildren
which defines an array of control definitions to be embedded. All UI design happens within thechildren
node of the root control. Control definitions are added here in the form we design.When controls are added to the root control they are added in a list form, from top to bottom of the options panel.
Controls¶
There are many different controls that can be used within the jamovi options UI panel. Each control has been designed for a specific option type(s). For example, a
CheckBox
is designed around aBool
option type, where as aComboBox
displays and writes data to aList
option. jamovi provides a solid array of basic controls to cover all the current option types. Controls will continue to be developed as jamovi grows but the current list covers most use cases.When adding child controls to any
ParentControl
, at the very least thetype
property needs to be specified (as well as the minimum requirements for that control).name: descriptives title: Descriptives jus: '2.0' stage: 0 compilerMode: tame children: - type: LayoutBox margin: large children: - type: Label label: jamovi is great? - type: Label label: Of cause it is!Now we can add, move or adjust any control to meet our needs. Here is a list of controls that can make that possible: