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(clerk-react): Improve error message and checks for routing strategies #2543

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

dimkl
Copy link
Member

@dimkl dimkl commented Jan 10, 2024

Description

Apply the following changes to components with routing props:
- default is routing="path" and path prop is required to be set via env or context
- when routing="hash" or routing="virtual" is set the implicit (via env or context) path option is ignored
- when routing="hash" or routing="virtual" then path prop is not allowed to be set

Examples of components with routing props:

  • <CreateOrganization />
  • <OrganizationProfile />
  • <SignIn />
  • <SignUp />
  • <UserProfile />

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:

Packages affected

  • @clerk/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

@dimkl dimkl self-assigned this Jan 10, 2024
Copy link

changeset-bot bot commented Jan 10, 2024

🦋 Changeset detected

Latest commit: 19d3f29

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

This PR includes changesets to release 7 packages
Name Type
@clerk/clerk-react Minor
@clerk/chrome-extension Patch
@clerk/elements Patch
@clerk/clerk-expo Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch

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

@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch from a6f68f5 to 5caad02 Compare January 10, 2024 19:17
@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch 3 times, most recently from af310ca to 79712e9 Compare January 10, 2024 19:23
@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch from 79712e9 to a82be4a Compare January 11, 2024 09:35
packages/react/src/errors/messages.ts Outdated Show resolved Hide resolved
packages/react/src/errors/messages.ts Outdated Show resolved Hide resolved
@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch from 692df41 to 828dbad Compare January 11, 2024 15:06
@dimkl dimkl enabled auto-merge January 11, 2024 15:07
@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch from 828dbad to 4a64003 Compare January 11, 2024 15:26
@dimkl dimkl force-pushed the sdk-1185-routing-stategy-priority branch from 4a64003 to 19d3f29 Compare January 11, 2024 15:47
@dimkl dimkl added this pull request to the merge queue Jan 11, 2024
Merged via the queue into main with commit db2d829 Jan 11, 2024
7 checks passed
@dimkl dimkl deleted the sdk-1185-routing-stategy-priority branch January 11, 2024 16:06
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.

None yet

4 participants