Skip to content
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

fix(elements): Types for step component #3359

Merged
merged 5 commits into from
May 10, 2024
Merged

Conversation

LekoArts
Copy link
Member

@LekoArts LekoArts commented May 10, 2024

Description

While writing the E2E tests I noticed a bug:
I couldn't apply className to SignIn.Step name="choose-strategy" and SignIn.Step name="forgot-password". Looking at the types, yeah, they only accepted children. They both didn't render any markup and were only Context wrappers.

This PR adds <div> as markup around these two steps and let's one apply their props to that.

While running the build process I got warnings about circular deps for Elements so I removed the barrel file for the sign-in step component and moved files around.

Checklist

  • npm test runs as expected.
  • npm run 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:

Copy link

changeset-bot bot commented May 10, 2024

🦋 Changeset detected

Latest commit: a25f2eb

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

This PR includes changesets to release 1 package
Name Type
@clerk/elements 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

@@ -18,7 +18,7 @@ import {
} from '~/react/sign-in/context';
import { createContextFromActorRef } from '~/react/utils/create-context-from-actor-ref';

export type SignInVerificationsProps = { preferred?: ClerkSignInStrategy; children: React.ReactNode } & FormProps;
export type SignInVerificationsProps = { preferred?: ClerkSignInStrategy } & FormProps;
Copy link
Member Author

Choose a reason for hiding this comment

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

FormProps already marks children as required

@LekoArts LekoArts marked this pull request as ready for review May 10, 2024 08:24
Copy link
Member

@panteliselef panteliselef left a comment

Choose a reason for hiding this comment

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

nice catch

@LekoArts LekoArts marked this pull request as draft May 10, 2024 08:56
@LekoArts LekoArts marked this pull request as ready for review May 10, 2024 13:59
@brkalow brkalow merged commit 8cb4aa0 into main May 10, 2024
10 checks passed
@brkalow brkalow deleted the elements/fix-props-types branch May 10, 2024 17:57
@clerk-cookie clerk-cookie mentioned this pull request May 10, 2024
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.

5 participants