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

chore: app router - /event-types pages #18181

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

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Dec 14, 2024

What does this PR do?

  • Fixes CAL-4892

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Go to /event-types and /event-types/[type] in the latest Vercel preview

@graphite-app graphite-app bot requested a review from a team December 14, 2024 17:52
Copy link

vercel bot commented Dec 14, 2024

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 10:12pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 10:12pm

@github-actions github-actions bot added the ❗️ .env changes contains changes to env variables label Dec 14, 2024
@dosubot dosubot bot added the event-types area: event types, event-types label Dec 14, 2024
@hbjORbj hbjORbj marked this pull request as draft December 14, 2024 17:52
@keithwillcode keithwillcode added consumer core area: core, team members only labels Dec 14, 2024
Copy link

linear bot commented Dec 14, 2024

@hbjORbj hbjORbj added high-risk Requires approval by Foundation team ready-for-e2e labels Dec 14, 2024
@@ -281,7 +240,7 @@ const EventTypeWeb = ({
} as const;

useHandleRouteChange({
watchTrigger: isAppDir ? pageRouter : pathname,
Copy link
Contributor Author

@hbjORbj hbjORbj Dec 14, 2024

Choose a reason for hiding this comment

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

seems like we used an opposite conditional here

Copy link

graphite-app bot commented Dec 14, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (12/14/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (12/20/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@hbjORbj hbjORbj changed the title chore: app router - event-types chore: app router - /event-types pages Dec 14, 2024
Copy link
Contributor

github-actions bot commented Dec 14, 2024

E2E results are ready!

Comment on lines -7 to -13
export type {
FormValues,
CustomInputParsed,
EventTypeSetup,
EventTypeSetupProps,
Host,
} from "@calcom/features/eventtypes/lib/types";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed that these are not imported from this file anywhere

@hbjORbj hbjORbj marked this pull request as ready for review December 20, 2024 21:25
@graphite-app graphite-app bot requested a review from a team December 20, 2024 21:25
@hbjORbj hbjORbj marked this pull request as draft December 20, 2024 21:31
Comment on lines 104 to 107
const EventTypeAppWrapper = ({ id, ...rest }: EventTypeSetupProps & { id: number }) => {
const pathname = usePathname();
const router = useAppRouter();
return (
<EventTypeWeb
{...rest}
id={id}
isAppDir={true}
pathname={pathname ?? ""}
pageRouter={null}
appRouter={router}
/>
);
return <EventTypeWeb {...rest} id={id} pathname={pathname ?? ""} appRouter={router} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can shift this logic in EventTypeWebWrapper directly and remove this component completely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed

@@ -258,8 +258,6 @@ test.describe("Manage Booking Questions", () => {

await test.step("Go to First Team Event", async () => {
await page.getByTestId(`horizontal-tab-${team?.name}`).click();
await page.waitForLoadState("networkidle");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

await page.waitForLoadState("networkidle"); is likely to never resolve in App Router because there are constantly likely to be network activities in App Router (e.g., streaming server components)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only ❗️ .env changes contains changes to env variables event-types area: event types, event-types high-risk Requires approval by Foundation team ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants