The vendored flare-ui was a Nov-4 snapshot with no recorded pin. Advance it to the furthest-along upstream branch: blueflare/flare-ui `sprint` (0e1f5a259faa), which is 247 commits beyond `main`, 71 beyond `next`, and already contains `next` in full. The scattered 1-3 commit leads on individual sp/* feature branches are unmerged side-work, not a more-ahead integration line, so vendoring one of those would drop the 247-commit integration; `sprint` is the single most-ahead branch. This brings sprint's flare-ui crate additions (form.rs, page.rs, page/, table.rs and the flare-ui-axum / flare-plugin-host crates) into the tree. Record the pin in flare-ui.lock so the next re-vendor is reproducible. alkane-os builds against it with no source changes: the console (console.rs) and the rest compile clean, clippy -D warnings is clean, and 183 lib + integration tests pass (including the dashboard schema tests, so the wschema model stayed compatible). Re-verified the live console on sprint: --serve-sim boots, the flare-ui shell and control pages render, and stop -> ambient:18000 -> start all succeed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
338 lines
29 KiB
HTML
338 lines
29 KiB
HTML
{#- The dashboard studio: palette, canvas, toolbar, properties panel and
|
|
keyboard list, shared by every page that embeds the editor.
|
|
|
|
Plain HTML with no template syntax. The comments are Jinja-style comment
|
|
blocks, so a template engine that includes this file
|
|
drops them at build time, and a plain consumer removes them before it
|
|
inserts the markup (README.md, "Consuming the editor"). Nothing else in
|
|
this file may use template delimiters, and tests/fragment.test.mjs holds
|
|
that.
|
|
|
|
The host supplies what is not here: an element carrying
|
|
`data-dashboard-editor` around this markup, optionally with
|
|
`data-sources-href` naming the source-list route; the raw JSON pane (a
|
|
textarea carrying `data-dashboard-raw` inside a details element, with a
|
|
`data-dashboard-raw-error` beside it); and the save control. -#}
|
|
{#- data-mode is the whole selection model: "nav" while the canvas owns the
|
|
arrow keys and "edit" while the properties panel has the focus. It is
|
|
an attribute rather than a class because studio.css reads it and
|
|
dashboard-editor.js writes it, and neither wants to own a list of
|
|
class names the other has to match. -#}
|
|
<div class="bf-studio" data-dashboard-studio data-mode="nav">
|
|
{#- Undo and Redo act on the document, so they sit above all three
|
|
columns rather than in the palette (which adds a block) or in the
|
|
properties panel (which edits one). Disabled until there is
|
|
something to undo, which is also how a fresh editor says the stack
|
|
starts empty. -#}
|
|
<div class="bf-row bf-studio__bar">
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-dashboard-undo disabled>Undo</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-dashboard-redo disabled>Redo</button>
|
|
{#- The dashboard as a .wdash file (docs/wdash.md), in and out. They
|
|
act on the whole document like Undo and Redo, so they share the
|
|
bar, at its far end.
|
|
|
|
Each control belongs to a form the host supplies outside its own
|
|
editor form, by id, because a form cannot nest: the host's
|
|
`dashboard_import_form` (POST, multipart, with whatever hidden
|
|
fields it checks) and `dashboard_export_form` (GET). With
|
|
scripting off they are those forms' own controls, so an import
|
|
posts the file and an export downloads it with no script at all.
|
|
dashboard-file.js hides the file field behind Import, sends the
|
|
file without leaving the page, and hides any control whose form
|
|
the host does not supply. An import never stores: the file's
|
|
document lands in the editor, and Save keeps it. -#}
|
|
<span class="bf-row bf-studio__file" data-dashboard-file>
|
|
<input class="bf-input" type="file" name="file" form="dashboard_import_form" accept=".wdash,application/json" required aria-label="Dashboard file to import" data-dashboard-file-input>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="submit" form="dashboard_import_form" title="Open a .wdash file in the editor. Nothing is stored until Save." data-dashboard-import>Import</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="submit" form="dashboard_export_form" title="Download the saved dashboard as a .wdash file" data-dashboard-export>Export</button>
|
|
</span>
|
|
{#- What the last import did. The refusal is the reader's own reason,
|
|
and the notice says the document is not stored yet. Both are
|
|
empty, and so take no room, until there is something to say. -#}
|
|
<p class="bf-field-error bf-studio__file-note" role="alert" data-dashboard-file-error></p>
|
|
<p class="bf-studio__file-note" role="status" data-dashboard-file-notice></p>
|
|
</div>
|
|
|
|
<aside class="bf-studio__palette" aria-label="Block palette">
|
|
<h3>Blocks</h3>
|
|
{#- Rendered disabled and enabled by dashboard-editor.js, which is the
|
|
only thing that makes them work: with scripting off a click on one
|
|
of these built nothing, said nothing and left the canvas showing a
|
|
sentence telling the operator to use it. renderPalette() sets the
|
|
disabled state of every one of them on its first pass, so this
|
|
costs the script nothing beyond the attribute. -#}
|
|
<button class="bf-studio-tool" type="button" data-add-widget="metric" disabled><strong>Metric</strong><span>Numeric telemetry</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="status" disabled><strong>Status</strong><span>State or presence</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="text" disabled><strong>Text</strong><span>Notes and context</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="card" disabled><strong>Card</strong><span>A reading and its state</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="gauge" disabled><strong>Gauge</strong><span>A reading in its range</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="chart" disabled><strong>Chart</strong><span>A reading over time</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="heading" disabled><strong>Heading</strong><span>Names a section</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="separator" disabled><strong>Separator</strong><span>Divides sections</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="status_grid" disabled><strong>Status grid</strong><span>Many things at once</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="table" disabled><strong>Table</strong><span>Readings side by side</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="row" disabled><strong>Row</strong><span>Blocks side by side</span></button>
|
|
<button class="bf-studio-tool" type="button" data-add-widget="section" disabled><strong>Section</strong><span>A named group</span></button>
|
|
{#- Why the palette stopped. A document holds a bounded number of
|
|
blocks (dashboard::MAX_BLOCKS) and the server is the authority on
|
|
it, but a palette that simply no longer responds teaches nothing:
|
|
the operator used to find the cap in a refused save. -#}
|
|
<p class="bf-field-error" role="alert" data-dashboard-palette-note></p>
|
|
|
|
{#- Patterns: a prebuilt arrangement inserted as a unit.
|
|
|
|
Most dashboards here are the same few shapes, and building one of
|
|
them from the palette is a dozen operations that are the same
|
|
dozen every time. Built by dashboard-doc.js rather than rendered
|
|
here, because the list is one thing and the cap arithmetic over it
|
|
is another. Served empty and filled by the script, which is also
|
|
what disables a pattern the document has no room for. -#}
|
|
<div class="bf-studio__patterns" data-dashboard-patterns hidden>
|
|
<h3>Patterns</h3>
|
|
<div data-dashboard-pattern-list></div>
|
|
</div>
|
|
|
|
{#- List view: the document as a tree, in exactly the order it draws.
|
|
|
|
It is the accessible navigation path and the reliable one for
|
|
structural work. On the canvas a block inside a narrow row is a
|
|
small target and a nested group is a box inside a box; here every
|
|
block is one full-width row at its own indent, so selecting the
|
|
third block of a row two levels down is one click rather than a
|
|
hunt. Selection is shared with the canvas in both directions, and
|
|
the block toolbar follows it, so this panel needs no controls of
|
|
its own.
|
|
|
|
Closed by default and filled by dashboard-list.js: with scripting
|
|
off there is no canvas either, and the raw pane below is the whole
|
|
editor. That script also makes each row draggable, which is why
|
|
the rows carry no draggable attribute here: a row that offers to
|
|
move and lands nowhere is worse than one that never offered. -#}
|
|
<details class="bf-panel bf-list-view" data-dashboard-list-view hidden>
|
|
<summary>List view <span data-list-view-count></span></summary>
|
|
<ul class="bf-list-view__tree" role="tree" aria-label="Dashboard blocks" data-dashboard-list></ul>
|
|
</details>
|
|
</aside>
|
|
|
|
<section class="bf-studio__canvas" aria-label="Dashboard canvas" data-dashboard-canvas>
|
|
{#- True of the page as served. dashboard-editor.js replaces it with
|
|
"Add a block from the palette.", which is true only where the
|
|
palette answers a click. -#}
|
|
<p class="bf-studio__empty" data-dashboard-empty>This canvas needs scripting. The document is in the Raw dashboard JSON pane below, which posts without it.</p>
|
|
|
|
{#- One toolbar, server-rendered once and moved onto whichever block is
|
|
selected, rather than one per block. It is the only place a block's
|
|
own operations live, which is what keeps them reachable when the
|
|
properties panel is stacked below the canvas on a narrow screen.
|
|
|
|
role="toolbar" and a roving tabindex: the whole thing is one Tab
|
|
stop and the arrow keys move between its buttons, so a person
|
|
tabbing through the page passes it in one press instead of six.
|
|
Alt+F10 reaches it from the canvas. -#}
|
|
<div class="bf-block-toolbar" role="toolbar" aria-label="Block actions" data-block-toolbar hidden>
|
|
<span class="bf-block-toolbar__label" data-block-toolbar-label></span>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="up" tabindex="-1">Move up</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="down" tabindex="-1">Move down</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="duplicate" tabindex="-1">Duplicate</button>
|
|
{#- Both flows, because the two are one operation with a direction
|
|
and offering only the row made the section reachable solely by
|
|
grouping into a row and then changing the flow in the panel. -#}
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="group-row" tabindex="-1">Group into row</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="group-section" tabindex="-1">Group into section</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="ungroup" tabindex="-1">Ungroup</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-block-action="insert" aria-expanded="false" tabindex="-1">Insert</button>
|
|
<button class="bf-btn bf-btn--danger bf-btn--sm" type="button" data-block-action="remove" tabindex="-1">Remove</button>
|
|
</div>
|
|
|
|
{#- The inserter. The palette appends at the end of the document,
|
|
which is the only position a palette can mean; this one inserts at
|
|
a position, directly after the selected block and in that block's
|
|
own list, so an insert inside a row stays in the row. On the grid
|
|
it had to push everything below down by the height of the block
|
|
going in; a flow document has no rows to run out of, so it is a
|
|
splice. The same kinds the palette offers, because a second list
|
|
of kinds is a second list to keep in step. -#}
|
|
<div class="bf-block-inserter" data-block-inserter hidden>
|
|
<p>Insert under this block</p>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="metric" disabled><strong>Metric</strong><span>Numeric telemetry</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="status" disabled><strong>Status</strong><span>State or presence</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="text" disabled><strong>Text</strong><span>Notes and context</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="card" disabled><strong>Card</strong><span>A reading and its state</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="gauge" disabled><strong>Gauge</strong><span>A reading in its range</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="chart" disabled><strong>Chart</strong><span>A reading over time</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="heading" disabled><strong>Heading</strong><span>Names a section</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="separator" disabled><strong>Separator</strong><span>Divides sections</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="status_grid" disabled><strong>Status grid</strong><span>Many things at once</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="table" disabled><strong>Table</strong><span>Readings side by side</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="row" disabled><strong>Row</strong><span>Blocks side by side</span></button>
|
|
<button class="bf-studio-tool" type="button" data-insert-block="section" disabled><strong>Section</strong><span>A named group</span></button>
|
|
</div>
|
|
</section>
|
|
|
|
<aside class="bf-studio__properties" aria-label="Block properties">
|
|
<h3>Properties</h3>
|
|
<div data-dashboard-properties-empty class="bf-help">Select a block to edit it.</div>
|
|
<div data-dashboard-properties hidden class="bf-stack">
|
|
{#- The note is the server's own rule where the title is typed:
|
|
dashboard::validate refuses a block whose title trims to empty,
|
|
and the canvas used to take one and call the block Untitled. It
|
|
is not a `required` attribute, because a constraint on a control
|
|
this panel hides is exactly what made Save refuse in silence. -#}
|
|
<div class="bf-field"><label class="bf-label" for="widget_title">Title</label><input class="bf-input" id="widget_title" data-widget-field="title" maxlength="80"><span class="bf-field-error" role="alert" data-dashboard-title-note hidden>Every block needs a title. A save is refused while this one is empty.</span></div>
|
|
{#- A block reads a source or carries a literal value, and the
|
|
document holds one of the two, so setting either clears the
|
|
other and the help says so. The fields a kind does not have are
|
|
hidden rather than ignored: a unit posted on a text block is a
|
|
key that kind does not carry, and the server refuses it. A kind
|
|
this build does not draw hides all three and says why, because
|
|
its attributes belong to the build that wrote them. -#}
|
|
{#- The source, both ways. The field is the one control holding the
|
|
value: the picker writes into it and the editor reads it from
|
|
there, so there is one write path and one undo step.
|
|
|
|
Browse is served hidden and dashboard-sources.js shows it,
|
|
because nothing else answers it. With scripting off the field
|
|
and its help text are the whole of this control, which is what
|
|
they were before the picker existed. -#}
|
|
<div class="bf-field" data-dashboard-field="source"><label class="bf-label" for="widget_source">Source</label><input class="bf-input" id="widget_source" data-widget-field="source" maxlength="128" placeholder="telemetry.metrics.cpu_pct">
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-source-open aria-expanded="false" hidden>Browse readings</button>
|
|
<div class="bf-source-picker" data-source-picker hidden>
|
|
<div class="bf-row">
|
|
<input class="bf-input" type="search" data-source-search placeholder="Search readings" aria-label="Search readings">
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-source-close>Close</button>
|
|
</div>
|
|
{#- Not hidden. It is a live region, and one revealed in the
|
|
same step as its first message is one some screen readers
|
|
were not watching yet. It is empty until there is
|
|
something to say, which occupies one line of an already
|
|
open panel. Serving it hidden and leaving the script to
|
|
reveal it is what made every message it carries
|
|
invisible. -#}
|
|
<p class="bf-help" role="status" data-source-status></p>
|
|
{#- Named and grouped, because the list scrolls and Firefox
|
|
makes a scrollable region a Tab stop of its own. Without
|
|
a role and a name that is an unlabelled stop between the
|
|
Close button and the first reading. -#}
|
|
<div class="bf-source-picker__list" role="group" aria-label="Readings" data-source-list></div>
|
|
</div></div>
|
|
<div class="bf-field" data-dashboard-field="value"><label class="bf-label" for="widget_value">Literal value</label><input class="bf-input" id="widget_value" data-widget-field="value" maxlength="500"></div>
|
|
<div class="bf-field" data-dashboard-field="unit"><label class="bf-label" for="widget_unit">Unit</label><input class="bf-input" id="widget_unit" data-widget-field="unit" maxlength="24"></div>
|
|
<div class="bf-field" data-dashboard-field="caption"><label class="bf-label" for="widget_caption">Caption</label><input class="bf-input" id="widget_caption" data-widget-field="caption" maxlength="120"></div>
|
|
{#- The recent history of a reading, drawn under it. A select rather
|
|
than a checkbox, like every other yes/no in this panel: the
|
|
canvas reads `value`, and the two spell the answer out where a
|
|
checkbox makes the reader work out what unticked means.
|
|
|
|
Offered only while the block reads a source. A literal has no
|
|
history, dashboard::validate refuses that pairing, and
|
|
dashboard-doc.js hides the control for the same reason. -#}
|
|
<div class="bf-field" data-dashboard-field="trend"><label class="bf-label" for="widget_trend">Recent history</label><select class="bf-select" id="widget_trend" data-widget-field="trend"><option value="0">Do not draw it</option><option value="1">Draw a trend line</option></select></div>
|
|
{#- A chart's window. A select rather than a number field: the
|
|
server takes 1 to 24 and every value between is legal, but an
|
|
operator picking a trend length is choosing between an hour, a
|
|
shift and a day, not typing 17. -#}
|
|
<div class="bf-field" data-dashboard-field="hours"><label class="bf-label" for="widget_hours">Window</label><select class="bf-select" id="widget_hours" data-widget-field="hours"><option value="1">Last hour</option><option value="3">Last 3 hours</option><option value="6">Last 6 hours</option><option value="12">Last 12 hours</option><option value="24">Last 24 hours</option></select></div>
|
|
{#- A gauge's range. Numbers, and required by the server rather than
|
|
optional like a threshold: a gauge whose ends are equal has no
|
|
bar to draw and dashboard::validate refuses it, so the panel
|
|
offers both together and says what the pair is for. -#}
|
|
<div class="bf-field" data-dashboard-field="min"><label class="bf-label" for="widget_min">Range from</label><input class="bf-input" id="widget_min" type="number" step="any" data-widget-field="min"></div>
|
|
<div class="bf-field" data-dashboard-field="max"><label class="bf-label" for="widget_max">Range to</label><input class="bf-input" id="widget_max" type="number" step="any" data-widget-field="max"></div>
|
|
{#- A grid's cells as one line each, rather than a repeater widget.
|
|
A line is `label = source`; a line with no `=` is a cell showing
|
|
its own text, so nothing an operator types can produce a document
|
|
the server refuses. -#}
|
|
<div class="bf-field" data-dashboard-field="cells"><label class="bf-label" for="widget_cells">Cells</label><textarea class="bf-input bf-textarea" id="widget_cells" data-widget-field="cells" placeholder="Engine 1 = telemetry.engine.oil_temp" rows="6"></textarea></div>
|
|
{#- A table as lines: `Label | unit` per column, `Label | cell | ...`
|
|
per row, a cell a source or a "quoted" literal. Rows are cut or
|
|
padded to the columns, so the save is never refused. -#}
|
|
<div class="bf-field" data-dashboard-field="columns"><label class="bf-label" for="widget_columns">Columns</label><textarea class="bf-input bf-textarea" id="widget_columns" data-widget-field="columns" placeholder="Oil temp | C" rows="3"></textarea></div>
|
|
<div class="bf-field" data-dashboard-field="rows"><label class="bf-label" for="widget_rows">Rows</label><textarea class="bf-input bf-textarea" id="widget_rows" data-widget-field="rows" placeholder="Engine 1 | telemetry.engine.oil_temp" rows="6"></textarea></div>
|
|
<div class="bf-field" data-dashboard-field="level"><label class="bf-label" for="widget_level">Heading rank</label><select class="bf-input" id="widget_level" data-widget-field="level"><option value="2">Section</option><option value="3">Subsection</option></select></div>
|
|
{#- Thresholds are two numbers and a direction. Empty means the card
|
|
draws no state, which is the honest rendering of a reading nobody
|
|
has said anything about, so neither is required. -#}
|
|
<div class="bf-field" data-dashboard-field="caution"><label class="bf-label" for="widget_caution">Caution at</label><input class="bf-input bf-input--num" id="widget_caution" data-widget-field="caution" type="number" step="any"></div>
|
|
<div class="bf-field" data-dashboard-field="critical"><label class="bf-label" for="widget_critical">Alarm at</label><input class="bf-input bf-input--num" id="widget_critical" data-widget-field="critical" type="number" step="any"></div>
|
|
<div class="bf-field" data-dashboard-field="rising"><label class="bf-label" for="widget_rising">Alarms when</label><select class="bf-input" id="widget_rising" data-widget-field="rising"><option value="1">Reading rises</option><option value="0">Reading falls</option></select></div>
|
|
<p class="bf-help" data-dashboard-unsupported hidden>This editor does not draw this block's kind, so its own settings are not offered here. Move it, resize it, retitle it or remove it; saving keeps everything else about it as it is.</p>
|
|
{#- The frame a flow document has. There are no coordinates: a block
|
|
sits where it is written. Width is a share of a row and is only
|
|
offered to a row's children, because a stack has nothing to
|
|
divide. -#}
|
|
<div class="bf-field" data-dashboard-field="width"><label class="bf-label" for="widget_width">Share of the row</label><select class="bf-input" id="widget_width" data-widget-field="width"><option value="1">1/12</option><option value="2">2/12</option><option value="3">Quarter</option><option value="4">Third</option><option value="6">Half</option><option value="8">Two thirds</option><option value="9">Three quarters</option><option value="12">Whole row</option></select></div>
|
|
<div class="bf-field" data-dashboard-field="min_rows"><label class="bf-label" for="widget_min_rows">Minimum height</label><select class="bf-input" id="widget_min_rows" data-widget-field="min_rows"><option value="">Fit contents</option><option value="2">2 rows</option><option value="3">3 rows</option><option value="4">4 rows</option><option value="6">6 rows</option><option value="8">8 rows</option></select></div>
|
|
<div class="bf-field" data-dashboard-field="space_before"><label class="bf-label" for="widget_space">Space above</label><select class="bf-input" id="widget_space" data-widget-field="space_before"><option value="none">None</option><option value="small">Small</option><option value="medium">Medium</option><option value="large">Large</option></select></div>
|
|
{#- A group's own settings. -#}
|
|
<div class="bf-field" data-dashboard-field="flow"><label class="bf-label" for="widget_flow">Children run</label><select class="bf-input" id="widget_flow" data-widget-field="flow"><option value="stack">Top to bottom</option><option value="row">Left to right</option></select></div>
|
|
<div class="bf-field" data-dashboard-field="group_heading"><label class="bf-label" for="widget_group_heading">Section heading</label><select class="bf-input" id="widget_group_heading" data-widget-field="group_heading"><option value="">None</option><option value="2">Section</option><option value="3">Subsection</option></select></div>
|
|
{#- The variation picker, on an empty row and nowhere else. This is
|
|
the one interaction the column canvas was better at: laying out
|
|
a row of three equal blocks meant three drags. WordPress answers
|
|
it with a variation picker on a fresh Columns block, and this is
|
|
the same thing: one click fills the row with blocks already
|
|
sharing the line in the proportions named on the button. -#}
|
|
<div class="bf-field" data-dashboard-field="row_variation">
|
|
<span class="bf-label">Fill this row</span>
|
|
<div class="bf-row bf-variations">
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="12">Whole row</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="6,6">Halves</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="4,8">Third, two thirds</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="8,4">Two thirds, third</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="4,4,4">Thirds</button>
|
|
<button class="bf-btn bf-btn--secondary bf-btn--sm" type="button" data-row-variation="3,6,3">Narrow, wide, narrow</button>
|
|
</div>
|
|
</div>
|
|
<div class="bf-field" data-dashboard-field="stack_narrow"><label class="bf-label" for="widget_stack_narrow">On a narrow screen</label><select class="bf-input" id="widget_stack_narrow" data-widget-field="stack_narrow"><option value="1">Fold to one column</option><option value="0">Stay in one line</option></select></div>
|
|
{#- Move up, Move down and Remove used to be here as well as on the
|
|
selected block. They are only on the block now. A block's own
|
|
operations belong with the block, and a control that exists in
|
|
two places is two places to look for it and two to keep working;
|
|
this panel is the block's fields and nothing else. -#}
|
|
</div>
|
|
</aside>
|
|
</div>
|
|
|
|
{#- Exactly the shortcuts this editor implements, and no others. A list of
|
|
chords a page does not answer is worse than no list, so this one is
|
|
short on purpose: an assistive-technology user cannot remap these, and
|
|
a chord with three modifiers collides with screen reader and operating
|
|
system bindings, so fewer of them is better than more.
|
|
|
|
Every one of them is also a control. The toolbar carries the four
|
|
block operations, the palette appends a block, Undo and Redo are
|
|
buttons above the canvas, and the properties panel holds the frame
|
|
fields, so nothing here is a gesture with no visible equivalent.
|
|
|
|
Dragging a block is the one gesture with no chord of its own, on the
|
|
canvas and in the list view both. It needs none: every placement a drop
|
|
can make, the Alt arrows above make too, which is why they exist. A
|
|
pointer reaches no arrangement a keyboard cannot.
|
|
|
|
A <details> rather than a <dialog>: the CSP allows the open attribute
|
|
and nothing has to script it open.
|
|
|
|
It is rendered hidden and revealed by dashboard-editor.js, because
|
|
every chord in it is answered by that script and by nothing else. With
|
|
scripting off the list was drawn in full, all seven entries were false,
|
|
and the sentence naming the undo depth had a hole where the script
|
|
writes the number: "up to steps". -#}
|
|
<details class="bf-panel" data-dashboard-shortcuts hidden><summary>Keyboard shortcuts</summary>
|
|
<ul>
|
|
<li>Tab reaches the canvas, and the selected block is its one tab stop. Arrow keys move the selection from block to block.</li>
|
|
<li>Enter edits the selected block, which moves the caret to the properties panel. Escape comes back to the canvas; Escape again clears the selection.</li>
|
|
<li>Alt with the up or down arrow moves the selected block one place along the blocks it sits with. Past either end of a group it moves out of that group.</li>
|
|
<li>Alt with the right arrow moves the selected block into the group above it, and Alt with the left arrow moves it out of the group it is in.</li>
|
|
<li>Ctrl+G puts the selected block in a section, and Ctrl+Shift+G lifts a group's blocks back out.</li>
|
|
<li>Delete or Backspace removes the selected block.</li>
|
|
<li>Alt+F10 moves to the block toolbar. Arrow keys move along it, Escape returns to the block.</li>
|
|
<li>Ctrl+Z undoes and Ctrl+Shift+Z redoes, up to <span data-undo-depth></span> steps. Neither fires while the caret is in a text field, where the browser's own undo is the better one.</li>
|
|
<li>Shift+Alt+H opens this list.</li>
|
|
</ul>
|
|
</details>
|
|
|
|
{#- What changed, for a reader who cannot see the outline move. A visible
|
|
outline is not an announcement, so selection, mode and the operations
|
|
that rearrange the document are all said here. -#}
|
|
<div class="bf-visually-hidden" role="status" aria-live="polite" data-dashboard-status></div>
|