Visual editor outline shows Code Cell entries; quarto.symbols.showCodeCellsInOutline has no effect

Aperta
#1,114 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Locate the visual editor outline renderer and compare its handling of rmd_chunk items with the source-mode implementation of quarto.symbols.showCodeCellsInOutline. Reproduce the issue with a .qmd containing headings and R or Python cells, then verify that the setting hides Code Cell entries in the visual-editor outline without removing headings or metadata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

visual-editor
Description

In the Quarto visual editor, the outline panel (Ctrl+Alt+O) lists every code block as a Code Cell entry, cluttering heading navigation in long documents. The existing setting quarto.symbols.showCodeCellsInOutline has no effect on this outline.

Environment
  • Positron 1.130.0 (VS Code / Code OSS derivative) on Windows 11
  • Quarto extension: 1.136.0 and 1.137.0 (both reproduce)
Steps to reproduce
  1. Open a .qmd with several R/Python code cells and headings in the visual editor.
  2. Press Ctrl+Alt+O to open the outline.
  3. The outline shows each code cell as a Code Cell item interleaved with headings (only Metadata and heading entries are desired).
  4. Set quarto.symbols.showCodeCellsInOutline: false in settings and reload. Source-mode outline obeys it; the visual-editor outline does not change.
Background

quarto.symbols.showCodeCellsInOutline (added in 1.133.0, #974) only controls the source-mode outline / workspace symbols. The visual editor's outline is implemented inside the editor webview and does not read this setting at all, so there is no user-facing way to hide code cells there.

Expected behavior

Either:

  • quarto.symbols.showCodeCellsInOutline should also apply to the visual editor outline, or
  • the visual editor outline should expose its own toggle and default to headings/metadata only (code cells are rarely useful as outline entries).
Local workaround (what we ship)

Filter out rmd_chunk items in the outline renderer:

o = u => {
  if (u.type === "rmd_chunk") return null;
  // ... original item rendering
}

Works, but requires patching the bundled extension file (lost on every extension upgrade).

Lingua principale
TypeScript
Stelle
665
Fork
69
Merge medio
2g 4h
PR unite (30g)
14

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quarto-dev/quarto

Tutte le issue di quarto-dev/quarto

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.