Feature: show a window of a file or diff (lines a-b) that can grow in place
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- developer-experience, frontend
Direzione di ricerca
Start by reading the renderer code that builds and consumes FileDiffMetadata, then trace how it handles hunk context and syntax highlighting in unified and split views. The issue does not name specific files or tests, so locate those entry points and related tests first. Done means hosts can render and grow a partial file or diff window with correct line numbers and highlighting, without losing component state or hiding changes outside the window.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
Use case
We embed many small excerpts of code review diffs in written documents: "here are lines 120-140 of this file, and what changed in them". Each excerpt is a window: a contiguous range of lines from one file, or from one side of a diff. A reader can grow the window in place, a few lines at a time, at its top or bottom edge.
Needed from the renderer for each window:
- Real line numbers, not numbering that restarts at 1.
- Syntax highlighting as if the whole file were shown. A window that starts inside a block comment or template string should still look right.
- Changes outside the window are simply not part of the view: no error, and no "N unmodified lines" separator that hides changed lines.
- Growing the window doesn't remount the component or lose its state, in unified and split views.
- Any change in or near the window can be shown, including added and deleted files.
Current behavior (1.7 beta)
When building FileDiffMetadata for a window, and there is a change below the window, rendering fails with trailing context mismatch, because whatever follows the last hunk is treated as the unchanged rest of both files.
When the first hunk doesn't reach back to line 1, rows can show the wrong lines' text or lose highlighting.
So today there's no supported way to say "this metadata describes only part of the diff".
Request
A supported way for a host to render part of a file or diff. It could be a small, general primitive that empowers users to build snippet experiences.
Motivation and context
Expandable snippets embedded in prose are generally useful for AI to explain code it has written, highlighting the most interesting parts.
We also have a page with all comments from code reviewers, each accompanied by the associated code snippet.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 226
- Merge medio
- 1g 14h
- PR unite (30g)
- 53
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 pierrecomputer/pierre
-
Bug: Missing aria fields in the search inputForse già presa @saurav-shakya l’ha presa 6 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pierrecomputer/pierre#1242 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Row decorations and git status aren't part of a row's accessible nameForse già presa @saurav-shakya l’ha presa 6 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierrecomputer/pierre#1187 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
pierrecomputer/pierre#1279 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Text selection and copy break across the virtualization boundaryForse già presa @Son-Of-Zeus l’ha presa 6 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
pierrecomputer/pierre#1255 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
pierrecomputer/pierre#1253 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pierrecomputer/pierre
Issue simili
-
account bug communication lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:tui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
anthropics/claude-code#109005 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
openedx/end-to-end-tests#196 ·
I maintainer di solito rispondono entro 1 giorno
-
area:tooling good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
interledger/publisher-tools#1007 ·
I maintainer di solito rispondono entro 1 giorno
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
databrickslabs/ontos#1420 ·
I maintainer di solito rispondono entro 3 giorni