microsoft / microsoft/TypeScript
React props in typescript are displayed in alphabetical order instead of showing component props at the top when running "trigger suggest"
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.74.2
- OS Version: macOS 12.6
Steps to Reproduce:
- git clone reproduction repo at https://github.com/MichaelHindley/vscode-react-props-alphabetical
- start vscode with --disable-extensions flag
- run
npm ito install dependencies - go to Line 25 in App.tsx, place curser inside the Menu component opening tag
- run the "Trigger suggest" command
- Observe the props being sorted in alphabetical order instead of showing the components own props at the top

What should happen instead is that the component scoped variables from "MenuProps" should be at the top, rather than being alphabetically sorted. The alphabetical sorting is a very poor developer experience. When triggering suggestions in a react component, the most common scenario by far is to see which props the component type has, which vscode is aware of.
Notice the equivalent of "trigger suggest" in Intellij, showing the components props above all the default html props;

Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das verlinkte Reproduktions-Repository zu klonen, seine Abhängigkeiten mit npm i zu installieren und das Problem in Zeile 25 von App.tsx bei deaktivierten Erweiterungen zu reproduzieren. Verwende den Trigger suggest-Befehl am öffnenden Menu-Tag und überprüfe, dass MenuProps-Einträge vor den standardmäßigen HTML-Props erscheinen und nicht in alphabetischer Reihenfolge.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- developer-experience
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100