Skip to content

chore: use smooth path utility from vue-data-ui - #2647

Merged
shuuji3 merged 2 commits into
mainfrom
og-use-createSmoothPath-from-vue-data-ui
Apr 28, 2026
Merged

chore: use smooth path utility from vue-data-ui#2647
shuuji3 merged 2 commits into
mainfrom
og-use-createSmoothPath-from-vue-data-ui

Conversation

@graphieros

Copy link
Copy Markdown
Member

Follow up to #2292

This replaces the smooth path creation function used for og images with the available utility in vue-data-ui.

@vercel

vercelBot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 28, 2026 6:41am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 28, 2026 6:41am
npmx-lunariaIgnoredIgnoredApr 28, 2026 6:41am

Request Review

@coderabbitai

coderabbitaiBot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 487e4735-f0f3-415a-879b-fb8e0fd3fbf0

📥 Commits

Reviewing files that changed from the base of the PR and between 7541441 and 0637f45.

📒 Files selected for processing (1)
  • app/components/OgImage/Package.takumi.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/components/OgImage/Package.takumi.vue

📝 Walkthrough

Summary by CodeRabbit

  • Refactor

    • Consolidated chart sparkline path generation into a shared utility and removed the duplicate spline logic from an internal composable.
    • Adjusted internal imports and slimmed redundant code to improve organisation.
  • Tests

    • Updated component test mocks to reflect the structural change.

No user-facing changes in this release.

Walkthrough

The smoothPath implementation was removed from app/composables/useCharts.ts and the component app/components/OgImage/Package.takumi.vue now imports createSmoothPath from vue-data-ui/utils. Tests were adjusted to remove smoothPath from the useCharts mock.

Changes

Cohort / File(s)Summary
Component update
app/components/OgImage/Package.takumi.vue
Replaced local smoothPath usage with createSmoothPath imported from vue-data-ui/utils; useCharts still used for data fetching.
Composable cleanup
app/composables/useCharts.ts
Removed smoothPath export and the roundToHundredths helper; retained chart data fetching/transformation functions.
Tests
test/nuxt/components/OgImagePackage.spec.ts
Updated mock for ~/composables/useCharts to remove smoothPath from the mocked return value.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title 'chore: use smooth path utility from vue-data-ui' accurately reflects the main change of replacing the smoothPath function with createSmoothPath from vue-data-ui.
Description check✅ PassedThe description is related to the changeset, explaining that it replaces the smooth path creation function with a utility from vue-data-ui, which aligns with the actual code changes.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch og-use-createSmoothPath-from-vue-data-ui

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecovBot commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@graphierosgraphieros added the needs review This PR is waiting for a review from a maintainer label Apr 28, 2026
@graphieros
graphieros requested a review from alexdlnApril 28, 2026 04:25

@shuuji3shuuji3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

I put one suggestion for small refactoring.

import { joinURL } from 'ufo'
import { smoothPath, useCharts } from '~/composables/useCharts'
import { useCharts } from '~/composables/useCharts'
import { createSmoothPath as smoothPath } from 'vue-data-ui/utils'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { createSmoothPath as smoothPath } from 'vue-data-ui/utils'
import { createSmoothPath } from 'vue-data-ui/utils'

nit: It seems that the usage of this fuction is only here in the project (https://github.com/npmx-dev/npmx.dev/pull/2647/changes#diff-989803a8350f5b506a5bdea17a1237c410d7eee66b2e7015b0bd46378a78e097R243)
Maybe we could refactor to use the original exported name?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shuuji3 thank you :) It is cleaner indeed

@shuuji3
shuuji3 added this pull request to the merge queueApr 28, 2026
Merged via the queue into main with commit 17ea220Apr 28, 2026
25 checks passed
@shuuji3
shuuji3 deleted the og-use-createSmoothPath-from-vue-data-ui branch April 28, 2026 08:49
@github-actionsgithub-actionsBot mentioned this pull request Apr 28, 2026
@ghostdevvghostdevv removed the needs review This PR is waiting for a review from a maintainer label May 31, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@graphieros@shuuji3@ghostdevv