Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Replacement badge visually distinguishes between less/more opinioated recommendations

Đang mở
#3,062 2 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
nuxt, typescript
Lĩnh vực
design, frontend

Hướng nghiên cứu

Bắt đầu trong repo npmx.dev bằng cách grep 'replacement' hoặc 'badge' trong các component để tìm nơi badge module-replacements được render và cách dữ liệu replacement được lấy từ gói module-replacements. Đọc các manifest được export của gói (dist/main.d.ts liệt kê các danh mục native/micro-utility/preferred) để xem mỗi replacement thuộc danh mục nào, rồi ánh xạ danh mục 'preferred' sang biến thể badge màu xanh thông tin trong khi giữ màu hổ phách cho native và micro-utility. Hoàn thành nghĩa là trang của gói hiển thị màu xanh cho các replacement ưu tiên, màu hổ phách trong các trường hợp còn lại, được xác minh bằng một build cục bộ hoặc bộ test hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

e18e front needs discussion
Describe the feature

The module replacements package has three different categorizations for replacements, ranking from less to more opinionated: native, micro utility and preferred. Currently npmx exclusively uses the yellow/amber variant for the badge. From my perspective we could improve the semantics here, and make them map more closely to the semantics of module replacements, by using an informational (blue) variant of the badge for the preferred replacements.

That makes the semantics nicer imo:
amber: “You should really do something different here”
And blue: “Fyi you could also go with something else here”

And it would look something like this (in this particular example there's an added benefit that you can more easily distinguish between a vulnerability warning and a replacement suggestion):

the npmx package site showing a 'preferred' module replacement suggestion, in informational blue, and thereafter a yellow warning about a security vulnerability

The manifests are exposed from the module replacements package https://npmx.dev/package-code/module-replacements/v/3.0.0/dist%2Fmain.d.ts#L7 so it’s possible to get the data. Maybe it could also be contributed upstream to module-replacements (although there’s the other distinction at play around how involved the replacement is too, but worth exploring).

Additional information
  • Would you be willing to help implement this feature?
Final checks
Ngôn ngữ chính
TypeScript
Star
3.6k
Fork
533
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của npmx-dev/npmx.dev

Tất cả issue của npmx-dev/npmx.dev

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.