microsoft / microsoft/TypeScript
React props in typescript are displayed in alphabetical order instead of showing component props at the top when running "trigger suggest"
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.4k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Mô tả
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;

Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách clone repository tái hiện được liên kết, cài đặt các dependency của repository bằng npm i và tái hiện vấn đề ở dòng 25 của App.tsx khi đã tắt các extension. Sử dụng lệnh Trigger suggest trên thẻ mở của Menu và xác minh rằng các mục MenuProps xuất hiện trước các HTML props mặc định thay vì theo thứ tự alphabet.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react, typescript
- Lĩnh vực
- developer-experience
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100