-
Notifications
You must be signed in to change notification settings - Fork 7k
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: modal intercept #15615
base: main
Are you sure you want to change the base?
fix: modal intercept #15615
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (06/28/24)1 reviewer was added to this PR based on Keith Williams's automation. |
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.
Lets prefer early returns here - easier to understand the logic of when we're skipping
if (isInForm || url.includes("skipConfirmation=true")) { | ||
return; | ||
} |
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.
Added a new query param when we leave to the destination route so we can easily know when to avoid calling this handler
if (isRoundRobin) { | ||
if (hosts.length > 0 || assignedUsers.length > 0) { | ||
return; | ||
} | ||
} |
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.
if (isRoundRobin) { | |
if (hosts.length > 0 || assignedUsers.length > 0) { | |
return; | |
} | |
} | |
if (isRoundRobin && (hosts.length > 0 || assignedUsers.length > 0)) { | |
return; | |
} |
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.
Screen.Recording.2024-06-28.at.8.08.09.PM.mov
I tried creating a team event type and even after assigning host i still get the "Leave without assigning" modal
@@ -400,38 +400,47 @@ const EventTypePage = (props: EventTypeSetupProps) => { | |||
|
|||
useEffect(() => { | |||
const handleRouteChange = (url: string) => { |
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.
This is complex enough to be unit tested now. I think we can refactor out a function from it that accepts eventType
and url and would give us boolean to inform if navigation should happen or not.
That function can be easily tested.
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.
I am getting the modal on personal event as well
Fixes Managed event types:
https://github.com/calcom/cal.com/assets/55134778/7288a939-d5d2-470e-b9a6-e1eb4ed7d252
Fixes round robin:
https://github.com/calcom/cal.com/assets/55134778/51e4abcb-75e0-41a2-ab35-804bd40b6dc5