- Hubdone
- Meterdone
- Tariffcurrent step
- Batteryto do
Onboarding
Setting something up: stations along a groove (done ones with their lamp lit, the current one a raised cap) and a checklist of check keys with a progress slot.
Kit part · Knobs · Onboarding · Steppers
Onboarding as the program dial of an appliance on its first run. Each step is a detent on a rotary dial, its number and name engraved round it, and the panel beside it shows that step’s few fields. A step that is done lights a green lamp by its mark, and the one you are on an amber one. The dial turns back freely, and forward only as far as the first step not yet done.
Name and email.
A name and a region.
Anyone else who should be in.
Lode is ready.
Link the repository.
Ship the first release.
Lode is ready.
Name and email.
A name and a region.
A card, or an invoice each month.
Anyone else who should be in.
Lode is ready.
Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.
Aluminium
| Part | Done | Current | To do | Locked |
|---|---|---|---|---|
| Mark |
|
|
|
|
Graphite
| Part | Done | Current | To do | Locked |
|---|---|---|---|---|
| Mark |
|
|
|
|
| Name | Kind | Values | What it does |
|---|---|---|---|
| <tui-setup-dial> | element | label · step · done | The dial and its panel. label names the slider; step is where it starts, from 1; done lists the steps already done, "1,2". |
| section.tui-setup-dial__step | element | data-name | A step: a heading, a line and a few fields. data-name is the word engraved by its mark. Two to six of them. |
| .tui-setup-dial__dial · __marks · __seat · __knob | class | built | The dial: the steps engraved round it, the round seat with a tick at every detent, and the knob, role="slider". |
| .tui-setup-dial__mark[data-state] | class | done · current · open · locked | A step’s mark: its lamp, number and name. Green and lit is done; amber and lit is the step the dial points at. |
| .tui-setup-dial__panel · __keys · __say | class | built | The panel beside the dial with the step in it, Back and Next under it, and a line that says why the dial will not turn. |
| step · done | property | from 1 | Where the dial points, and the steps that are done. |
| go(n) · next() · back() | method | true · false | Turn to step n if the dial may go there; check this step’s fields and move on; go back one. Each says whether it moved. |
| tui-step | event | detail.step · of · name · done · reach | Whenever the dial moves. reach is the furthest step it may turn to. Bubbles. |
| Arrows · Page keys · Home · End | keyboard | on the knob | A step back or on, the first step, and the furthest it may reach. Enter in a field is Next. |
| --sd-d · --sd-rm | custom property | length | The knob’s size, 104px, and how far out the marks sit, 82px. |
| setupDialFaceHTML · setupDialReach · setupDialTurn · setupDialState · setupDialAngle · setupDialNearest · setupDialText · setupDialMark | function | kit.mjs | The face as markup, and the rules under it, pure: how far the dial may go, where a turn ends, what each step is, a detent’s angle and the one nearest a drag, the slider’s words, and where a mark sits. |
<tui-setup-dial label="Set up Lode">
<section class="tui-setup-dial__step" data-name="Account">
<h3>Your account</h3>
<p>Who you are, for the audit log.</p>
<label class="tui-field"><span class="tui-label">Work email</span>
<input class="tui-input" type="email" name="email" required></label>
</section>
<section class="tui-setup-dial__step" data-name="Workspace">…</section>
<section class="tui-setup-dial__step" data-name="Invite">…</section>
<section class="tui-setup-dial__step" data-name="Done">…</section>
</tui-setup-dial>import '/kit/kit.mjs'; // defines <tui-setup-dial>
const dial = document.querySelector('tui-setup-dial');
dial.addEventListener('tui-step', (e) => {
e.detail.step; // 2
e.detail.name; // 'Workspace'
e.detail.done; // [1]
e.detail.reach; // 2: as far as the dial may turn
});
dial.next(); // check this step, mark it done, turn on: false if a field is wrong
dial.go(4); // false: step 4 is locked until 2 and 3 are doneNeeds kit.css and kit.mjs. How to install the kit.
aria-current="step".Each step is a section of your own; the element moves them into a panel and builds the dial beside it with setupDialFaceHTML(). The detents are spread over the 270 degrees a program knob travels. The knob’s angle is one registered custom property, --sd-turn, so it eases into each detent with a slight overshoot. The fluting round its skirt is a repeating conic gradient that starts at that angle, under a light that does not move. The grip bar across the cap is rotated by it, and its own gradients are turned back by the same angle, so its lit edge stays toward the lamp at every step; its shadow is a drop-shadow on the cap below, which does not turn. The marks are placed round the middle with the sine and cosine of each detent, their words running away from the dial on either side. What the dial may do is pure: setupDialReach is the first step not done, and setupDialTurn stops a forward turn there and never a backward one.
For a first run of a few short steps, where each step opens the next.
6 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.
Setting something up: stations along a groove (done ones with their lamp lit, the current one a raised cap) and a checklist of check keys with a progress slot.
A rotary control for continuous or stepped values where space is square. Its knurl and pointer turn; its light does not.
A small integer with − and + keys either side, in one well.