-
Notifications
You must be signed in to change notification settings - Fork 405
chore(clerk-js): Trigger navigation to tasks on setActive for internal routing only
#5535
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
Conversation
🦋 Changeset detectedLatest commit: 58c3bb1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4c5822b to
21e089b
Compare
setActive for internal routing only setActive for internal routing only
21e089b to
58c3bb1
Compare
|
|
||
| if (newSession?.currentTask) { | ||
| // Only triggers navigation for internal routing, in order to not affect custom flows | ||
| if (newSession?.currentTask && this.#componentNavigationContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this explicitly means avoiding having to call nextTask on every single factor component.
For an actual application, with a single sign-in/sign-up form, it's just one method call. For our internal purposes, it would need to be replicated across multiple layers of the components after every setActive.
The whole reasoning of not triggering navigation to task once setActive detects a pending status, is the following:
- Navigating without a explicit signature / param can be confusing
- If a developer just wants to mount the task component on the same screen, after calling
setActive, they should be able to do so
58c3bb1 to
765c6fa
Compare

Description
Summary
setActiveif it's called from outside UI componentsSignInrendered insideSignedOut, which got fixed now thatSignedOuttreats pending sessions as signed out by default chore(clerk-react,astro,vue): IntroducetreatPendingAsSignedOutprop to client control components #5512For custom flows
Or use
clerk.__experimental_nextTaskfor orchestrating navigation:Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change