Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Enhancement] Jump to Documentation — open p5.js reference from editor via context menu

Aperta
#4,098 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
javascript
Ambito
frontend, web-dev

Direzione di ricerca

Inizia con il componente di menu contestuale personalizzato e il livello di integrazione dell’editor CodeMirror menzionati nell’issue. Traccia come il gestore del clic destro ottiene la posizione del cursore, quindi usa getTokenAt(cursor) di CodeMirror per identificare il token. Il lavoro è completato quando un elemento “Go to Documentation” apre l’URL di riferimento p5.js corrispondente in una nuova scheda del browser.

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

Descrizione

Feature Request On Hold
Increasing Access

When a user writes or selects a p5.js function using the autocomplete hinter (e.g. loadFont()), there is currently no way to quickly look up what that function does without leaving the editor, opening a browser tab, and manually searching the p5.js reference. This is slow and disruptive, especially for developers building larger sketches who need to check parameters and return values frequently.

Feature request details

Add a "Go to Documentation" option to the editor's right-click context menu. When clicked, it opens the official p5.js reference page for the selected/hovered token directly in a new browser tab.
Implementation outline:

Detect the token — Use CodeMirror's getTokenAt(cursor) to read the word at the cursor position when the context menu is triggered.
Construct the URL — Build a reference URL dynamically:

https://p5js.org/reference/p5/{token}
For example, right-clicking loadFont opens:
https://p5js.org/reference/p5/loadFont

Open in a new tab — Call window.open(url, '_blank') from the context menu handler.

Files likely affected:

Custom context menu component (wherever right-click menu is defined)
CodeMirror editor integration layer

User Experience

This mirrors the "Go to Definition" / F12 behaviour familiar from VS Code and other modern IDEs. The interaction would be:

User types or selects a p5.js function using autocomplete
User right-clicks the function name
Context menu shows "↗ Go to Documentation" as the first/highlighted item
Clicking it opens https://p5js.org/reference/p5/{functionName} in a new tab

Why this matters

Reduces context switching for beginners and experienced users alike
Consistent with IDE conventions users already know
Especially valuable during autocomplete-driven coding, where the user may not remember exact parameter order or return types
Low implementation complexity relative to the workflow improvement

Related / Prior Art

VS Code: hover + F12 / Ctrl+Click → Go to Definition
Chrome DevTools: documented function links in Console autocomplete

Lingua principale
JavaScript
Stelle
1.7k
Fork
1.7k
Merge medio
3g 7h
PR unite (30g)
8

Preparare l'ambiente

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 processing/p5.js-web-editor

Tutte le issue di processing/p5.js-web-editor

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.