Skip to content

feat(composables): introduce useDeprecated for deprecated APIs #2690

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jw-foss
Copy link
Contributor

@jw-foss jw-foss commented Apr 9, 2025

Summary

While we are doing the typescript improvements, I noticed that we have quite a few places were using validator for deprecated APIs, since we are on Vue 3.5 I think it is fair to migrate from that to a composition API.

In this PR, I added a composable named useDeprecated and updated KButton as an example, I also included a test file against the newly added composable.

KM-1149

@jw-foss jw-foss requested review from adamdehaven, jillztom, Justineo and a team as code owners April 9, 2025 03:13
Copy link

netlify bot commented Apr 9, 2025

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit aa31c58
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/67f5e5d603c0350008a0e178
😎 Deploy Preview https://deploy-preview-2690--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jw-foss jw-foss self-assigned this Apr 9, 2025
@jw-foss jw-foss added the enhancement New feature or request label Apr 9, 2025
Copy link

netlify bot commented Apr 9, 2025

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit aa31c58
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/67f5e5d657dd850008df11e4
😎 Deploy Preview https://deploy-preview-2690--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kongponents-bot
Copy link
Collaborator

Preview package from this PR in consuming application

In consuming application project install preview version of kongponents generated by this PR:

@kong/kongponents@pr-2690

Copy link
Member

@adamdehaven adamdehaven left a comment

Choose a reason for hiding this comment

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

I'm not sure this change is really necessary. We may not want to always watch and continue to log the deprecations, and the logging was only put in place to aid in migration without needing to push breaking changes to the repository.

If we had gone with an approach similar to this originally I think it would have been fine, but I'm not sure it's necessary to refactor at this time

@jw-foss
Copy link
Contributor Author

jw-foss commented Apr 9, 2025

I'm not sure this change is really necessary. We may not want to always watch and continue to log the deprecations, and the logging was only put in place to aid in migration without needing to push breaking changes to the repository.

Understood, for the part "we may not want to watch and continue to log the deprecation" I can provide a once watcher for this.

If we had gone with an approach similar to this originally I think it would have been fine, but I'm not sure it's necessary to refactor at this time

For sure, I'll close this PR if this is what we wanted.

@Justineo
Copy link
Contributor

Justineo commented Apr 9, 2025

Makes sense either way. I was thinking a consistent way to handle the fraction might be helpful too, if it ends up being reused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants