Skip to content

chore(astro): Remove deprecated as prop from button components#5140

Closed
wobsoriano wants to merge 3 commits into
mainfrom
rob/remove-deprecated-as-prop
Closed

chore(astro): Remove deprecated as prop from button components#5140
wobsoriano wants to merge 3 commits into
mainfrom
rob/remove-deprecated-as-prop

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Feb 12, 2025

Copy link
Copy Markdown
Member

Description

It's been 5 months since we began deprecating the as prop in favor of asChild for customizing our unstyled components (<SignInButton />, <SignUpButton />, <SignOutButton />). As documented in our component guides, the asChild prop is the recommended approach for passing custom buttons. This PR completes the deprecation by removing the as prop entirely.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Feb 12, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0e41a34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/astro Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Feb 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 4:35pm

@wobsoriano wobsoriano changed the title chore(astro): Remove deprecated as prop in unstyled components chore(astro): Remove deprecated as prop in unstyled button components Feb 12, 2025
@wobsoriano wobsoriano changed the title chore(astro): Remove deprecated as prop in unstyled button components chore(astro): Remove deprecated as prop from button components Feb 12, 2025
@wobsoriano wobsoriano marked this pull request as ready for review February 12, 2025 16:36
@@ -0,0 +1,17 @@
---
"@clerk/astro": minor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤔 Isn't this a breaking change?

@wobsoriano wobsoriano Feb 12, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question! Hmmm originally when the as prop was added, we immediately did a follow up and introduced the asChild prop and documented that instead.

If we're going major on this one, I think we can skip this PR for now as it will be a waste of a major version bump. We can include this change in our next major release when we introduce more features / breaking change 👍🏼

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think this is a breaking change, we should schedule for the next major instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I will close this PR for now and revisit on our next major!

@wobsoriano wobsoriano marked this pull request as draft February 12, 2025 17:03
@@ -0,0 +1,17 @@
---
"@clerk/astro": minor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think this is a breaking change, we should schedule for the next major instead.

<Fragment set:html={htmlElement} />
) : (
<Tag {...props} data-clerk-unstyled-id={safeId}>
<button {...props} data-clerk-unstyled-id={safeId}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with asChild aren't we loosing data-clerk-unstyled-id ? is that ok ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants