Is your feature request related to a problem?
There's no way to nudge an element a few cells from where layout placed it while leaving its neighbors put. The only offset tool today is floating, which pulls the element out of flow so siblings reflow to fill the gap. A fixed(5) row holding element a (text A) followed by text B renders "AB "; we can't shift A two cells right while B stays put, since anything that moves A collapses B back to column 0. That rules out small visual nudges (badges, carets, hover) that shouldn't disturb surrounding layout.
Describe the solution you'd like
A render-time translate that shifts an element's painted cells (and its descendants') by {x, y} after flow layout, mirroring the CSS translate property (exact name TBD). It does not change layout: the element keeps its computed flow slot and siblings don't move. It's purely a visual displacement, with the element's reported bounds following the shift so hit-testing stays correct. Above, a keeps its slot at x=0, B stays at column 1, and a paints two cells over to yield " BA ".
const node = open("a", {
layout: {
translate: { x: 2, y: 0 },
},
});
Describe alternatives you've considered
floating removes the element from flow (siblings collapse), so it can't do an in-place nudge. Post-processing the rendered grid in TS can't see clip regions, backgrounds, or descendant bounds, and info.bounds would still report the un-shifted position—breaking hit-testing and hover. A renderer-side translate keeps bounds and paint in sync.
Additional context
Failing test case on nm/repro/translate (test · diff). Today bounds.x is 0 instead of 2 and the row renders "AB " instead of " BA ". This likely lives in ops.ts:97-120 (the pack layout group has no translate slot) and ops.ts:245-253 (OpenElement.layout has no translate field), with the render-time shift applied where the layout group is decoded (src/clayterm.c:499-516).
Is your feature request related to a problem?
There's no way to nudge an element a few cells from where layout placed it while leaving its neighbors put. The only offset tool today is
floating, which pulls the element out of flow so siblings reflow to fill the gap. Afixed(5)row holding elementa(textA) followed by textBrenders"AB "; we can't shiftAtwo cells right whileBstays put, since anything that movesAcollapsesBback to column 0. That rules out small visual nudges (badges, carets, hover) that shouldn't disturb surrounding layout.Describe the solution you'd like
A render-time
translatethat shifts an element's painted cells (and its descendants') by{x, y}after flow layout, mirroring the CSStranslateproperty (exact name TBD). It does not change layout: the element keeps its computed flow slot and siblings don't move. It's purely a visual displacement, with the element's reported bounds following the shift so hit-testing stays correct. Above,akeeps its slot at x=0,Bstays at column 1, andapaints two cells over to yield" BA ".Describe alternatives you've considered
floatingremoves the element from flow (siblings collapse), so it can't do an in-place nudge. Post-processing the rendered grid in TS can't see clip regions, backgrounds, or descendant bounds, andinfo.boundswould still report the un-shifted position—breaking hit-testing and hover. A renderer-side translate keeps bounds and paint in sync.Additional context
Failing test case on
nm/repro/translate(test · diff). Todaybounds.xis 0 instead of 2 and the row renders"AB "instead of" BA ". This likely lives inops.ts:97-120(thepacklayout group has no translate slot) andops.ts:245-253(OpenElement.layouthas notranslatefield), with the render-time shift applied where the layout group is decoded (src/clayterm.c:499-516).