fix: bump vue-data-ui and impacts#1568
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughConsolidated dataset construction in TrendsChart.vue by introducing a shared Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 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 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/Package/TrendsChart.vue (1)
204-220: Simplify redundant conditions intemperatureColorsand usebaseColorfor thecolorfield.Three minor redundancies in this block:
baseColor(Line 205) is always truthy —accent.valuealways yields a non-empty string via theOKLCH_NEUTRAL_FALLBACKfallback, so the&& baseColorguard is a no-op.isDarkMode.value && typeof baseColor === 'string'(Lines 208–210) —typeof baseColor === 'string'is alwaystrue(the value is statically typed asstring), andisDarkMode.valueis redundant becauselightColoris alreadyundefinedwhen not in dark mode, makingtypeof lightColor === 'string'sufficient alone.color: accent.value(Line 217) duplicatesbaseColorwhich already holds the same value.♻️ Proposed simplification
- const lightColor = isDarkMode.value && baseColor ? lightenOklch(baseColor, 0.618) : undefined + const lightColor = isDarkMode.value ? lightenOklch(baseColor, 0.618) : undefined - // Subtle path gradient applied in dark mode only - const temperatureColors = - isDarkMode.value && typeof baseColor === 'string' && typeof lightColor === 'string' - ? [lightColor, baseColor] - : undefined + // Subtle path gradient applied in dark mode only + const temperatureColors = lightColor ? [lightColor, baseColor] : undefined const datasetItem: VueUiXyDatasetItem = { name: seriesName, type: 'line', series: dataset.map(d => d.value), - color: accent.value, + color: baseColor, temperatureColors, useArea: true, }
3.15.0to3.15.5Impacts
Downloads chart in modal
Note: gradient paths are not used in the charts on the compare page
Versions chart (bars)
#area-gradientby#bar-gradient, with a subtle gradient based on the series colorWeekly downloads sparkline