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: modal intercept #15615

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

fix: modal intercept #15615

wants to merge 3 commits into from

Conversation

@graphite-app graphite-app bot requested a review from a team June 28, 2024 12:25
Copy link

vercel bot commented Jun 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Jun 28, 2024 2:27pm
cal ⬜️ Ignored (Inspect) Visit Preview Jun 28, 2024 2:27pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jun 28, 2024 2:27pm

@dosubot dosubot bot added event-types area: event types, event-types 🐛 bug Something isn't working labels Jun 28, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Jun 28, 2024
Copy link

graphite-app bot commented Jun 28, 2024

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.

Copy link
Member Author

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

Comment on lines +426 to 428
if (isInForm || url.includes("skipConfirmation=true")) {
return;
}
Copy link
Member Author

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

Comment on lines +419 to +423
if (isRoundRobin) {
if (hosts.length > 0 || assignedUsers.length > 0) {
return;
}
}
Copy link
Contributor

@Udit-takkar Udit-takkar Jun 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (isRoundRobin) {
if (hosts.length > 0 || assignedUsers.length > 0) {
return;
}
}
if (isRoundRobin && (hosts.length > 0 || assignedUsers.length > 0)) {
return;
}

Copy link
Contributor

@Udit-takkar Udit-takkar left a 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) => {
Copy link
Member

@hariombalhara hariombalhara Jun 29, 2024

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.

Copy link
Member

@hariombalhara hariombalhara left a 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

https://www.loom.com/share/82c3db9d3a9047009851f36005fba5a9

@sean-brydon sean-brydon marked this pull request as draft July 1, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working consumer core area: core, team members only event-types area: event types, event-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants