Replacement badge visually distinguishes between less/more opinioated recommendations
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- nuxt, typescript
调研方向
从 npmx.dev 仓库开始,在组件中 grep 'replacement' 或 'badge',找出 module-replacements 徽章的渲染位置,以及替换数据是如何从 module-replacements 包中获取的。阅读该包导出的清单文件(dist/main.d.ts 列出了 native/micro-utility/preferred 类别),查看每个替换属于哪个类别,然后将 'preferred' 类别映射到蓝色的信息型徽章变体,同时为 native 和 micro-utility 保留琥珀色。完成标准是包站点对首选替换显示蓝色、其余显示琥珀色,并通过本地构建或现有测试套件验证。
由索引模型根据 Issue 内容生成。
描述
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 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
- Read the contribution guide.
- Check existing issues.
- 主要语言
- TypeScript
- 星标
- 3.6k
- 派生
- 533
- 平均合并
- 4 天 13 小时
- 30 天内合并 PR
- 37
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
npmx-dev/npmx.dev 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
a11y front
难度 2/5 1-3 小时 新手友好度 67/100
npmx-dev/npmx.dev#2914 · 3 条评论 ·
维护者通常 1 天内回复
-
front i18n
难度 2/5 1-3 小时 新手友好度 64/100
npmx-dev/npmx.dev#2831 · 1 个 reaction ·
维护者通常 1 天内回复
-
back stale stale-to-close
难度 2/5 1-3 小时 新手友好度 62/100
npmx-dev/npmx.dev#2511 · 4 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
front needs discussion ux
难度 2/5 1-3 小时 新手友好度 65/100
npmx-dev/npmx.dev#2275 · 5 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
查看 npmx-dev/npmx.dev 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 82/100
source-cooperative/docs.source.coop#41 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
Nimblesite/SharpLsp#468 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
solidjs-community/solid-primitives#1082 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复