Skip to content

0.2.0: Inspector and history polish

Choose a tag to compare

@llblab llblab released this 21 Nov 12:22
· 27 commits to main since this release
  • The interface measures itself in layout pixels. At 200% the action row reported every action as twice its real width and kept only one plus the "more" menu, and the inspector's shared label column asked for twice the room it needed, so the Phone/200% Fit height action was reachable only inside the overflow menu. The chrome is drawn under transform: scale(--ui), so a painted width is a layout width times the scale: the toolbar's fit and the label column now measure with offsetWidth (web/lib/toolbar.js, web/lib/properties.js, web/tests/chrome.mjs, web/tests/appearance.mjs).
  • A version is read once the runtime's queue has drained. The appearance witnesses took the frame's version while the board's own accepted edit was still queued and were refused as stale; they now drain the queue first, which is what "the current version" means for a shared writer (web/tests/appearance.mjs).
  • Two more witnesses wait for the state they assert. The action bar's count is read only after the board restores its selection, and an inspector action whose row re-fits under the pointer is taken from the overflow menu the way a person would (web/tests/toolbars.mjs, web/tests/controls.mjs).
  • A band's name and its top value share one row. At phone/200% the box model's watermark could reach the centred top value by a pixel and, on a different font stack, cover it. The name and that value now sit in one flow row inside the band — the value centred in what the name leaves — so no width or font can make them collide; long values keep their whole cell (web/lib/properties.js, web/board.css, web/tests/spacing.mjs, web/tests/appearance.mjs).
  • The browser battery checks the contracts that exist now. The Play witness expected a leaving link to navigate the preview frame; it now proves the board's own window opens it while the frame stays on its page. And a far-zoom font capture whose frame is deleted mid-flight answers 404 — the board has already aborted it — so only that exact case stays silent, with each tolerated id checked against the frames that still exist (web/tests/security.mjs, web/tests/features.mjs).
  • The token row explains itself. The --color-brand → bg-brand, text-brand caption under the Tokens add row is gone: the placeholders say what the two fields take, and the row no longer repeats it (web/lib/inspector.js).
  • Box-model side values keep their distance. The left and right values sat flush against their band's frame and read as part of the line; they now keep one pixel of air from it, and the row they take on a narrow panel keeps the width that air would have cost (web/board.css, web/tests/spacing.mjs).
  • The history marker leans to its text. In the history list the marker and its badge are right-aligned in their narrow column instead of centred, so the marker sits next to the change it belongs to and the column reads as one edge against the text (web/board.css, web/tests/history.mjs).
  • Labelled rows line up. Rows that belong to one group now share a label column measured from the widest label in that group, so Center and Self in Layout start their controls on the same line, and the two centring choices fill the width their label leaves (web/lib/properties.js gained syncLabelColumns, web/lib/inspector.js, web/board.css, web/tests/appearance.mjs). The border ring's side menu is now its own value-named button rather than the caption-plus-value selector component, which it was never (web/lib/properties.js, web/board.css).
  • History rows give their width to the text. The Restore / Current / Ahead badge moved out of a column of its own and now stacks under the marker inside the one narrow left column, so the change, its document and its actor get the whole remaining width to read in (web/lib/activity.js, web/board.css, web/tests/history.mjs).
  • History rows read again. A row's document, actor and change detail no longer sit in the 44–80px marker column, where a long document name became a paragraph squeezed into a strip; the marker keeps its own narrow column and those details read under the change in the reading column, wrapping only where there is width for it (web/lib/activity.js, web/board.css, web/tests/history.mjs).
  • The Border block is the band, cut open. The copy of the box model's border band lost its caption, is centred in its section so it sits on the same axis as the band it copies, and has its middle cut away to the panel's own surface where the widget above shows a content band; a radius sits in each corner, a width at each edge's centre and the colour inside the opening (web/lib/properties.js, web/board.css, web/tests/appearance.mjs, web/tests/fluid.mjs).
  • A link is editable and clickable. The inspector gives an anchor its own Link section beside the element's name — the address, and a New tab control that writes target="_blank" with rel="noreferrer noopener" and takes back exactly what it wrote, while an emptied address removes href rather than keeping a link to nowhere; double-clicking a link with no words of its own lands in that field. In Play, a link that leaves the project (https:, mailto:) is now followed: the frame stays sandboxed without popups or top navigation, so the board opens the authored address from the visitor's own click, resolved in full and with its opener cut (core/lib/bridge.js, web/lib/canvas.js, web/lib/inspector.js, web/tests/features.mjs, web/tests/preview-links.mjs). The landing's footer names the GitHub repository as a real link instead of plain text that reads like one (examples/landing/landing.divlet, regenerated cache).
  • The board names its release. Settings carries one quiet caption beside its title — v0.1.2 in the faint tone, with the full release in its tooltip — read from the board state rather than from a second copy of the number: the local host reads its own package manifest and the static site passes the version its bundle was built with, so a published page can never claim a release it is not (core/lib/version.ts, core/tests/runtime.test.js, web/tests/settings.mjs, web/tests/pages.mjs).
  • The geometry block keeps no swap button. Rotating an artboard already lives in its own ⋯ menu and in the palette's Rotate, so the extra icon at the end of the width chips — whose tooltip read “Swap width and height” — is gone, and the size chips end where the width presets end (web/tests/controls.mjs).
  • Every icon paints at one size. The glyphs had drifted apart — parent, play, send, trash, copy and others sat around 11 units while tidy, keyboard and component reached 15, so a row of them read as a decreasing series; four glyphs (gear, pencil, layers, child) drew outside their own box and were clipped. Every glyph now paints at the same optical extent (~13.8 of the 20-unit box) with its own shape repaired, the brand mark keeps its authored geometry, and a caret, tick, close cross and stop square stay deliberately lighter. Chromium checks the painted extent of every glyph in the chrome, not its box (web/tests/chrome.mjs, web/tests/icons.test.js).
  • Expand points in four directions again. The glyph had shrunk to two opposite corners; it is now four arrows out of the centre, each with its bracket in the outer corner, so a collapsed frame reads as the square its viewport occupies — and collapse stays the same four arrows turned inward, which reads as the way out of that view (web/tests/icons.test.js).
  • Overflow is a Layout selector. Visible, Hidden, Clip, Scroll and Auto sit beside Display, read from both axes as one value — Mixed when only one axis is authored, instead of guessing the other — and written as overflow-* with Tailwind or one shorthand declaration without an engine, one Undo step each. The Tailwind provider now reads overflow-* back, including the axis utilities, so the selector shows what the class list already says instead of Default (plugins/tailwind/tests/view.test.js, web/tests/features.mjs, web/tests/static-styles.mjs).
  • The box model keeps its names outside the diagram. The four bands no longer write position, margin, border and padding inside their own rectangles: one legend under the widget lists the layers in nesting order, each name in the tone its band used, beside a swatch of that band's own fill. Every band therefore keeps its whole rectangle for values, and the corner radius moves to a row of its own once the diagram's bottom edge can no longer spare the room (web/tests/spacing.mjs).
  • Effects follows Appearance. The inspector's section order now reads Layout, Spacing, Border, Appearance, Effects: typography and colour sit together with the surface they shape, and opacity, Z-index and blur follow them (web/tests/static-styles.mjs, web/tests/toolbars.mjs).
  • Buttons read as buttons, and no line divides a section. A dropdown selector and a segmented group carried the same fill as the input beside them, so Display, Justify or Style looked like a field you could type in; action controls now take their own surface one clear step deeper than a field's (--control / --control-hover, both schemes) and keep it on hover, with the tone doing the work instead of a border. The palette's search and footer, the settings dialog's blocks and its action row no longer draw separator hairlines — the rhythm of the space between them is the divider (web/tests/toolbars.mjs, web/tests/settings.mjs).
  • The chrome appears at once; only the canvas waits. The chrome is built by the client — every icon, label and tool — so showing it before that module ran was showing the interface without its parts; hiding it until the first artboard preview had painted kept the whole board waiting for the slowest thing on screen, which made every start feel longer than it was. The start now has two halves: the chrome is shown the moment the client has built it, while the canvas alone keeps its own surface and one quiet spinner until its first preview paints, with an expanded page, an empty board or a failed start revealing at once and an 800ms cap keeping a single slow frame from leaving a plain surface (web/tests/chrome.mjs, web/tests/pages.mjs).
  • The line height's unit is a menu, and it opens on percent. %, em and a unitless multiple are one measurement — all three are the element's own font size — so the unit button beside Line height rewrites the same value in whichever spelling the author wants (24px ⇄ 192% ⇄ 1.92em ⇄ 1.92), converting px against that measured size and writing the result as one normal, undoable edit. A bare number below 10 stays the multiple it reads as; at or above 10 it is a percent written without its sign, so 150 means 150%. The colour field's label reads Bg rather than Fill, and each field's unit button shows what is authored instead of a fixed caption (web/tests/appearance.mjs).
  • The inspector's action row opens with Expand, and Delete is red where it stands. The selected artboard's lower action row starts with the same Expand as its heading — the heading's copy is the first control a narrow frame gives up to its ⋯, so the row is where it always is — and the row's own overflow keeps Expand until last, moving the rest into its trailing dropdown. Delete reads in the danger tone at rest, exactly like the same entry in a dropdown, instead of only on hover. The box-model radius field keeps the widget's standard compact field height (web/tests/toolbars.mjs).
  • A text size is read once, and line height has a control. A hand-written text-[12.5px] was read as a colour named 12.5px, so the size appeared in the colour field as well; a bare bracket is now a size when its value reads as a length, and the colour field stays empty. Appearance also gains a line-height field beside size and weight — a multiple, px/%/rem/em or normal — which lowers to leading-* steps and arbitrary utilities, reads back what the page author wrote (leading-6, text-sm/6) and stays a native declaration without an engine (plugins/tailwind/tests/view.test.js, web/tests/appearance.mjs).
  • The corner radius lives in Border's own corners diagram. One custom block replaces the four identical width rows: the four corner radii sit in their corners, the four edge widths between them, and a shared value at the centre applies to every corner at once — px, %, rem, em and full in all five, a bare number read as px, one Undo step per edit. Writing one corner leaves the others as the class list wrote them, and the provider now splits a shorthand radius into per-corner utilities and reads them back. The box model keeps no radius field, so the radius has one home (web/tests/appearance.mjs, web/tests/spacing.mjs, web/tests/fluid.mjs, plugins/tailwind/tests/view.test.js).
  • The box model keeps its names where they were. The bands name themselves again as watermarks in their own left corner, and the px marker in the widget's top-right corner is gone: every number in the diagram is pixels unless it says otherwise (web/tests/spacing.mjs, web/tests/toolbars.mjs).
  • Each history line is one time point. The kind marker no longer leads the row: it sits with the line's metadata in a single narrow left column, the change reads beside it, and the elapsed time is gone — the list is a sequence of states, not a feed of events. The column narrows on a phone instead of squeezing the message (web/tests/history.mjs).
  • History lists the states you can return to, oldest first. The list is no longer an audit log of every change: it holds exactly the states a restore can reach, opening with the boundary of the oldest one, ending the reachable past at the current state and showing the superseded future below in a dimmed tone — dimmed because the next edit may overwrite it, still selectable because it is a real choice until then. Changes that are not an addressable state are no longer rendered at all, and Home/End follow the new order (web/tests/history.mjs, web/tests/controls.mjs).
  • A colour name opens the picker instead of pretending to scrub. The label of a colour field was styled like a numeric drag handle but had nothing behind it; it now shows a click cursor and opens the same picker as the swatch, while a drag on it writes nothing. Only labels that really scrub (numeric fields) keep the sideways-arrow gesture, so a caption such as Center no longer advertises one either (web/tests/appearance.mjs).
  • The box model names its bands as watermarks and centres its side values. position, margin, border and padding sit in their band's top strip as larger type in a darker tone of that band's own fill, 12px in from the left; on a band too narrow for that they move closer to the edge and shrink, never covering a centred value. Left and right values are centred in their own strip instead of against the inner corner, which needed the strip to be measured in the value's own pixels rather than in ch of the band's font (web/tests/spacing.mjs).
  • A colour follows the picker while it is dragged. The value field shows the picked colour at once and the page repaints within one write, instead of waiting for the dialog to close; typing a colour does the same after a short pause. A gesture stays one Undo step, and a fast drag keeps at most one write pending, so the page converges on the colour last picked rather than replaying a queue (web/tests/appearance.mjs).
  • A colour control is one row again. Label, swatch, value and clear sit on one line in Border and in Appearance, and only a value longer than the room left takes a line of its own without being clipped. The content-sized value field was taking the wrapper's full width as its flex base, so it claimed a line by itself and pushed the clear button onto a third. Fill and Text now stay paired only while each field can still hold its own parts on one line (148px each) and otherwise stack whole, instead of squeezing both into a three-line column (web/tests/appearance.mjs).