Repository navigation
feat(clerk-js,types,nextjs,remix): Terse path parameters - #1957
Conversation
🦋 Changeset detectedLatest commit: 25f9cc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
85f1cac to
8daae51
Compare
f31ab32 to
e0bc858
Compare
38f0c70 to
2f488d8
Compare
4d19069 to
69b523d
Compare
a4b9d16 to
23f552d
Compare
11e7ea1 to
00477d4
Compare
desiprisg
left a comment
There was a problem hiding this comment.
Good work! We should add some type tests to make sure this doesn't break in the future since these are some complex types. Check this file for referennce: https://github.com/clerkinc/javascript/blob/3ceb2a734a43f134956164377399fec46e01e0a1/packages/react/src/contexts/__tests__/ClerkProvider.test.tsx
c90d57e to
d8854b0
Compare
a1f1a08 to
542012a
Compare
nikosdouvlis
left a comment
There was a problem hiding this comment.
@octoper You will need to apply the changes to the ui-retheme dir. I will share more details within the day
…rofile components
60e4ba5 to
cfb1a1e
Compare
nikosdouvlis
left a comment
There was a problem hiding this comment.
I noticed that you updated the next-app-router and the react-vite apps and added the /hash pages - is there any reason you did not update the rest?
In general, every app in the template dir must have the same interface so we can use the apps interchangeably throughout the tests.
If you want to run a small navigation-focused suite without affecting any templates, you can use an existing applicationConfig and the addFile method to programmatically create an app before the tests. The scope of the app will be just that specific test
| return Object.keys(query).length === 0 ? null : qs.stringify(query); | ||
| }; | ||
|
|
||
| export const normalizeRoutingOptions = ({ |
There was a problem hiding this comment.
🙃 This file is not just about authPropHelpers anymore. It is a collection of prop/options parsers and normalizers. So, at some point, we need to rename it.
* feat(clerk-js,types,nextjs,remix): Terse paths parameters * chore(repo): Warning instead of erroring for no unused variables rule * chore(repo): Remove changes from NextJS playground * feat(clerk-js,clerk-react,types): Terse params for OrganizationSwitcher and UserButton * fix(clerk-js): Use only userProfileUrl prop to check what userProfileMode should be used * test(clerk-js): Added tests for normalizeRoutingOptions utility function * chore(repo): Added Changeset * feat(clerk-js): Omit routing prop from Modal components * chore(types): Fix typo * fix(clerk-js): Check all falsy values instead of just undefined * test(clerk-js): Fix tests for normalizeRoutingOptions * feat(types): Added WithoutRouting type helper * fix(remix): Revert SignIn and SIgnUp components * chore(clerk-js): Remove uneeded import * fix(remix): Revert changes * fix(remix,nextjs,types): Components with routing * test(clerk-react): Added types tests for SignIn component * test(clerk-react): Added types tests for SignUp component * test(clerk-react): Added types tests for UserButton component * test(clerk-react): Added types tests for OrganizationSwitcher component * test(clerk-react): Added type tests for UserProfile and OrganizationProfile components * feat(clerk-js): Apply changes to ui.retheme * refactor(clerk-js): Make normalizeRoutingOptions more verbose * chore(clerk-js): Remove unedeed type * refactor(clerk-js,types): Add types for modal components * refactor(nextjs,remix): Refactor SignIn/SignUp components for Next and Remix * tests(repo): Add integration tests * chore(repo): Fix formatting * test(repo): Update navigation integration tests * test(repo): Update navigation integration tests * test(repo): Add more test cases for navigation integration tests
Description
This PR introduces some breaking changes
routingprop assigned with'path'if thepathprop is filled. Additionally, the types will be stricter, and if thepathprop is filled and theroutingprop is filled with a value other than'path', TypeScript will throw an error.<UserButton />component will have theuserProfileModeprop assigned with'navigation'by default if theuserProfileUrlprop is filled. Similarly, the types will be stricter, and if theuserProfileUrlprop is filled and theuserProfileModeprop is filled with a value other than'navigation', TypeScript will throw an error.<OrganizationSwitcher />component will have theorganizationProfileModeandcreateOrganizationModeprops assigned with'navigation'by default if theorganizationProfileUrlandcreateOrganizationUrlprops are filled accordingly. Additionally, the types will be stricter, and if theorganizationProfileUrlorcreateOrganizationUrlprop is filled and theorganizationProfileModeorcreateOrganizationModeprop is filled with a value other than'navigation', TypeScript will throw an error.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore