microsoft / microsoft/TypeScript

Investigate eagerly returning more information about suggestions

Offen
#36,265 24 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Awaiting More Feedback Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

Problem

Suggestions VS Code have three broad UX parts:

  • Name/label. Primary identifier for a suggestion, such as foo.
  • Details. Type information or auto import info, such as string.
  • Documentation. Js doc info and additional details about the suggestion item

Currently VS Code only shows the details of the currently active suggestion. This can be problematic in cases like auto imports, where multiple symbols may all have the same name:

Screen Shot 2020-01-17 at 11 26 30 AM

This design also reflects the design of the suggestion api:

  • completionInfo returns the entire list of suggestions, but only includes the name
  • completionEntryDetails returns the details and documentation for an individual suggestion

Investigation

With https://github.com/microsoft/vscode/issues/39441, VS Code is exploring letting languages/extensions return the details part of the suggestion eagerly. This would let VS Code show details for the entire list of suggestions instead of just for the active one. In the auto import case specifically, this would likely mean showing the file paths we would import from.

We would like the typescript team's feedback on these idea and our current proposals:

  • What information would be most helpful to render in the main suggestion list?
  • How much overhead would returning this information add? Both in terms of message size and TS server computation time?

/cc @jrieken For VS Code apis
/cc @amcasey @minestarks for VS

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, dieses Issue und das verknüpfte VS Code issue #39441 zu lesen, und vergleiche anschließend die hier beschriebenen completionInfo- und completionEntryDetails-APIs. Untersuche, welche Vorschlagsdetails in der Hauptliste nützlich wären, sowie die Kosten für die Nachrichtengröße und die Berechnung durch den TypeScript-Server. Als erledigt gilt die Dokumentation des Feedbacks des TypeScript-Teams oder das Erreichen eines klaren Vorschlags.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.