feat: add dependency size chart to timeline#2979
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
e18e dependency analysisNo dependency warnings found. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a dependencySize timeline stackbar view backed by dependency breakdown data, with client cache updates, chart utility support, alt-text handling, and matching translation, schema, and dependency updates. ChangesDependency size timeline stackbar feature
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/components/Package/TimelineChart.vue`:
- Around line 139-145: The watcher on orderedConvertedData in TimelineChart.vue
checks chartRef.value for resetZoom before awaiting nextTick, but chartRef can
change during the await. Re-check chartRef.value and confirm resetZoom exists
after nextTick, then call it only on the current ref; use the existing watch
callback and chartRef symbol to keep the guard aligned with the latest component
instance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c6839898-b73c-47a4-955f-bcdd623bba6a
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
app/components/Package/TimelineChart.vueapp/pages/package-timeline/[[org]]/[packageName].vueapp/utils/charts.tsi18n/locales/en.jsoni18n/schema.jsonnuxt.config.tspackage.jsonserver/api/registry/timeline/sizes/[...pkg].get.tstest/unit/app/utils/charts.spec.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
gameroman
left a comment
There was a problem hiding this comment.
Love it!
The animation when toggling "stable only" is a bit weird/laggy though
I used the same ease-out function as for the transitions in the line charts. Maybe they can be slightly faster for bars, as bars are... heavy by definition. |
| const reference = data.at(-1) | ||
| if (!reference) return [] | ||
|
|
||
| const topNames = reference.dependencies.slice(0, DEP_SEGMENT_COUNT).map(dep => dep.name) | ||
| const topNameSet = new Set(topNames) |
There was a problem hiding this comment.
the last version in the data is taken as reference to pick which dependencies are part of the segmentation throughout the timeline
|
Still feels kinda off. Maybe we can try without animation at all? |
I'd prefer to keep the transition as it is now, users will often toggle legend items, and transitions are nice in this case |
🔗 Linked issue
N/A
🧭 Context
The timeline charts currently show the overall package size, but showing the segmented dependency sizes would be useful too.
📚 Description
Does what it says on the tin! Shows a nice new 3rd chart that has the segmented install size (i.e. each significant dependency is a segment in the bar).