💡 translate: shift an element's paint without affecting flow
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- c, typescript
- Ambito
- cli
Direzione di ricerca
Inizia con il test fallito in test/translate.test.ts, poi leggi le definizioni di layout in ops.ts:97-120 e ops.ts:245-253, seguite dalla decodifica dei gruppi di layout in src/clayterm.c:499-516. Verifica che translate venga applicato dopo il layout di flusso, sposti i discendenti disegnati e i bounds riportati, mantenga il posizionamento dei fratelli e cambi l’output atteso da "AB " a " BA ".
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- TypeScript
- Stelle
- 42
- Fork
- 2
- Merge medio
- 2g 5h
- PR unite (30g)
- 12
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bombshell-dev/tty
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bombshell-dev/tty#61 · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
bombshell-dev/tty#129 ·
-
question
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
bombshell-dev/tty#83 · 2 commenti ·
-
bug
bombshell-dev/tty#81 · 1 assegnatario ·
Tutte le issue di bombshell-dev/tty
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·