Hold the tile title still in edit mode, and thin crowded slider ticks

The grip's `-m-1 p-1` pair cancelled on three sides only: `.dui-frame-head`
sets `margin-top: -0.5rem` unlayered in core.css, which beats a Tailwind
utility, so the padding above went uncancelled and the title dropped 4px the
moment the editor opened. The grip's geometry moves into core.css beside the
head's own half step, where one declaration cancels all four sides.

Slider tick labels were placed in percent with nothing measured, so five
four-character labels crowded on a tile narrower than the default four
columns. A ResizeObserver on the slider reports its width and every Nth label
is kept, N a divisor of the interval count so the first and last stay.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1moruzue2kTJd3uVisgNk
This commit is contained in:
2026-08-28 14:20:02 +02:00
co-authored by Claude Opus 5
parent 841209a630
commit 42048881f7
8 changed files with 78 additions and 22 deletions
@@ -105,7 +105,7 @@ export function Switch(props: SwitchProps) {
}
export function Slider(props: SliderProps) {
const { fraction, inputProps, marks } = useSliderDrag(props)
const { fraction, inputProps, marks, trackRef } = useSliderDrag(props)
const orientation = props.orientation ?? "horizontal"
return (
<div
@@ -114,6 +114,7 @@ export function Slider(props: SliderProps) {
orientation === "horizontal" && "w-full",
)}
data-orientation={orientation}
ref={trackRef}
style={{ "--dui-fraction": fraction } as React.CSSProperties}
>
<div className="dui-slider-body">