* fix: restore translucent dashboard styling
* fix: restore dashboard widget transparency
* fix: address dashboard review feedback
* fix: apply board opacity to containers
* fix: flatten demo board container
* fix: default board roundness to sm
* fix: restore assistant widget transparency
* Revert "fix: default board roundness to sm"
This reverts commit c235cbdf2b.
* fix: address remaining dashboard review comments
* test: align grid geometry expectations
1.5 KiB
Fixed dashboard geometry
The board uses fixed logical units:
- one
1 × 1item is exactly200 × 200logical pixels; - the gap matches Mantine's
smspacing at12logical pixels, giving a212pixel track pitch; - multi-cell items include the gaps between their cells (
2 × 1is412 × 200); - the canvas is zoomed once with one uniform scale derived from its available width.
Items keep the same logical dimensions at every viewport. The viewport reserves
the painted size while the inner canvas remains at its logical dimensions, so a
widget's clientWidth, clientHeight, and ResizeObserver measurements stay
stable. The visual canvas always fits the available width, every root lane
keeps at least one viewport of height, and edit-mode previews extend it downward
as needed.
The read-only renderer should:
- convert persisted
xOffset/yOffset/width/heightvalues tox/y/w/h; - apply collapsed container heights and call
getCollapsedDisplayLayout; - render DOM children in
sortGridPlacementsForReadingOrderorder; - position children with
getLogicalItemStyle; - wrap them with
getScaledCanvasStylesand the read-only semantic helpers.
Edit mode can use any interaction library, but its final coordinates should be
normalized through this core. placeGridItem is the deterministic
keyboard/numeric fallback: the active item is pinned while collisions move out
of the way and all other items compact vertically. Pointer coordinates from a
scaled editor can be converted with toLogicalCanvasPoint.