-
Notifications
You must be signed in to change notification settings - Fork 190
feat(modules): add nuxt.care health score badges #924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
π WalkthroughWalkthroughThis PR introduces a module scoring system to the devtools client. A new Estimated code review effortπ― 3 (Moderate) | β±οΈ ~20 minutes π₯ Pre-merge checks | β 2 | β 1β Failed checks (1 warning)
β Passed checks (2 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing touches
π§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| <template> | ||
| <ModuleItemBase :mod="mod" :info="staticInfo"> | ||
| <template #badge> | ||
| <ModuleScoreBadge class="ml-1" :npm="data.npm" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the UI styling, I wonder if this would be better as an item in the table instead of the badge? As I consider the "score" is only one of the aspects of the modules, and does not always reflects if users needs to do any action on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A short table item inside the module item? Sure. make sense - I will try something
| try { | ||
| const params = new URLSearchParams([ | ||
| ['slim', 'true'], | ||
| ...missing.map(name => ['package', name]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a bit out-of-scope of the current PR, but I wonder if nuxt.care should also count for module versions? In many cases, the users might have an out-dated, no-longer-maintained version installed, where the "score" should be relatively low and ask users to upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice idea! But this time nuxt care doesn't save a history. So I always see the current state. To say: new version available - yes, but nuxt care will have no different score between different versions with the current state.
Anthony, I love this idea... and now I'm sure I can check older versions! I need some days, but I will implement this great feature!
| const installedModules = useInstalledModules() | ||
|
|
||
| const npmNames = computed(() => | ||
| installedModules.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohter than the fixed "installedModules", we also reuse the UI for modules to install, I wonder if we also need to show the scores (or actually more interesting/useful?) when users are installing new modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally forgot about that. Yes I will work on it!
β Type of change
π Description
Adds health score badges from nuxt.care to installed modules, giving developers quick visibility into module maintenance status.
Screenshots
π Built in collaboration with nuxt.care