Uh oh!
There was an error while loading. Please reload this page.
chore(clerk-js): Trigger navigation to tasks on setActive for internal routing only - #5535
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
21e089bComparesetActive for internal routing only setActive for internal routing only 21e089b to
58c3bb1Compare| 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.
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
LauraBeatris
commented
Apr 4, 2025
58c3bb1 to
765c6faCompare
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