Block heads, sugar, and placement.
Generated from the language definition for language 1.0.
Blocks
A sugar head prints for a block whose config keys are all in its row; any other block is the generic block <type> [#id] { … }. An id is implicit (derived from the page, the block's index path and its type) unless pinned with #id.
Sugar
| Head | Block type | Renders on | Subject | Options | Config keys | Meaning |
|---|---|---|---|---|---|---|
list | entity_list | list pages | Entity | columns, label, size, search, sort, layout | entity_name, columns, label, page_size, enable_search, default_sort_field, default_sort_dir, layout, fixed_filter, link_columns, query, args, visible_when | A table of an entity's records, or of a query's rows (list from <query>). |
board | job_list | list pages | schema | summary, label, hide, size, layout | schema_id, schema_name, label, summary_fields, exclude_terminal, page_size, layout, visible_when | A workflow's jobs, grouped by state. |
section | section | detail templates | "…" | — | label, children, visible_when | A labelled group of detail blocks. |
field | entity_field | either | field | label, display | field_key, label, display_type, visible_when | One field of the record. |
related | entity_related_list | detail templates | Entity | columns, label, sum, state, empty, sort | related_entity_name, filter_field, source_field, columns, label, sum_field, job_state, empty_message, sort_field, sort_dir, query, args, visible_when | Records of another entity that point at this one (where <field> = this). |
jobs | entity_job_list | detail templates | — | label, summary, updated | schema_id, label, summary_fields, show_updated_at, visible_when | The record's jobs. |
action | action_button | either | "…" | on, confirm, help, permission, visible, enabled | label, schema_id, schema_name, event_type, action, inputs, confirm, help, requires_permission, visible_when, enabled_when | A button that fires a workflow event or runs a script. |
stat | stat | either | "…" | — | label, query, args, value, visible_when | One number: an aggregate expression or a query's single value. |
chart | chart | either | "…" | kind | label, query, args, kind, visible_when | A chart over an aggregate expression or a query. |
card | card | either | — | title | title, children, visible_when | A card with an optional title expression around its children. |
columns | columns | either | — | — | columns, visible_when | Side-by-side columns, each a column { … } of elements. |
tabs | tabs | either | — | — | tabs, visible_when | Tabs, each a tab "…" { … } of elements. |
text | text | either | expr | style, format | value, style, format, currency, visible_when | A value expression rendered as text. |
badge | badge | either | expr | colour | value, colour_by, visible_when | A value expression rendered as a coloured badge. |
image | image | either | expr | alt | src, alt, visible_when | An image whose source is a value expression. |
link | link | either | expr | — | label, page, record, visible_when | A link to a page, with the record it opens (link <label> to <page> (<record>)). |
each | each | either | word | layout, columns | var, source, query, args, layout, columns, param_paths, children, visible_when | The children once per row of a set the server resolves (each <var> in <Entity where …> { … }). |
use | view | either | view | — | view, args, visible_when | A view mounted with its arguments (use <view> (<args>)). |
Options
Written after the block's subject as <word> <value>, in any order; the decompiler prints them in each head's order above.
| Option | Kind | Value | Config keys | Heads | Meaning |
|---|---|---|---|---|---|
columns | field-list | [field, …] | columns | list, related, each | The fields shown as columns. |
label | string | "…" | label | list, board, field, related, jobs | The heading shown over the block. |
size | number | n | page_size | list, board | Rows per page. |
search | boolean | `on | off` | enable_search | list |
sort | sort | `field [asc | desc]` | default_sort_field, default_sort_dir | list |
sort | sort | `field [asc | desc]` | sort_field, sort_dir | related |
layout | word | word | layout | list, board, each | How the rows are laid out. |
summary | field-list | [field, …] | summary_fields | board, jobs | The payload fields shown on each job card. |
hide | enum | terminal | exclude_terminal | board | hide terminal leaves finished jobs off the board. |
display | word | word | display_type | field | How the value is rendered. |
updated | boolean | `on | off` | show_updated_at | jobs |
sum | field-ref | field | sum_field | related | A field totalled under the list. |
state | word | word | job_state | related | Only records whose job is in this state. |
empty | string | "…" | empty_message | related | The text shown when there are no records. |
kind | word | word | kind | chart | The chart type. |
confirm | string | "…" | confirm | action | A confirmation asked before the action runs. |
help | string | "…" | help | action | Help text shown beside the button. |
on | schema-ref | schema | schema_name | action | The workflow the event fires on (else the block binds by an empty schema_id). |
permission | permission | dotted.id | requires_permission | action | The permission a user needs to see the button. |
visible | expr | when expr | visible_when | action | A browser-evaluated gate on showing the button. |
enabled | expr | when expr | enabled_when | action | A browser-evaluated gate on enabling the button. |
types | field-list | [field, …] | types | — | Reserved for forms. |
style | enum | `heading | muted | mono | strong` |
format | word | word | format, currency | text | How the value is formatted (money USD, date, datetime, relative, percent, number). |
colour | enum | `state | enum | none` | colour_by |
alt | value | expr | alt | image | The image's alternative text, a value expression. |
title | value | expr | title | card | The card's title, a value expression. |
Known block types
Observed in the shipped layouts and the two renderers; the generic form accepts any of them (and the ruleset checks placement).
action_button, availability_calendar, badge, booking_portal_link, calendar, captable_overview, captable_table, card, chart, client_portal_settings, columns, data_grid, document_viewer, each, entity_card, entity_field, entity_job_list, entity_list, entity_notes, entity_ref, entity_related_list, export_button, external_launch, fleet_map, foresight_sim, form, form_field, fsm_dashboard, heading, image, job_list, line_item_editor, link, location_picker, paragraph, payroll_review, pos_dashboard, pos_inventory_settings, pos_loyalty_program, pos_print_feed, pos_tax_config, review_due_badge, roster_grid, route_map, section, selected_record, service_report, shift_claims, shift_time_setup, signature_view, split_pane, staff_access, stat, stat_strip, tab_container, tabs, template_updates, text, timeline, turn_by_turn, view, workflow_overview, xero_payroll