-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Improvement: Do immediate redirect for "Redirect on Booking" #7947
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Two Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
{/* Textfield has some margin by default we remove that so we can keep consitant aligment */} | ||
<div className="lg:-ml-2"> | ||
{/* Textfield has some margin by default we remove that so we can keep consistent alignment */} | ||
<div className="lg:-ml-2 lg:-mb-2"> |
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.
It fixes unnecessary bottom margin because of Input
* Redirects to external URL with query params from current URL. | ||
* Query Params and Hash Fragment if present in external URL are kept intact. | ||
*/ | ||
function RedirectionToast({ url }: { 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.
We don't do a waited redirect and thus toast isn't required.
@@ -985,13 +875,6 @@ const getEventTypesFromDB = async (id: number) => { | |||
}; | |||
}; | |||
|
|||
const schema = z.object({ |
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.
Removes schema.We use querySchema at both client side and server side now.
@@ -176,13 +68,14 @@ const stringToBoolean = z | |||
|
|||
const querySchema = z.object({ | |||
uid: z.string(), | |||
allRemainingBookings: stringToBoolean, | |||
email: z.string().optional(), | |||
eventTypeSlug: z.string().optional(), |
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.
Add missing eventTypeSlug
that wasn't needed at client but was needed at server. It comes from schema
variable that has been removed.
Current Playwright Test Results Summary✅ 66 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 04/04/2023 05:52:51am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 6aad8ec Started: 04/04/2023 05:47:41am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Routing Forms Seeded Routing Form Routing Link - Reporting and CSV Download
Retry 1 • Initial Attempt |
9.03% (13)13 / 144 runsfailed over last 7 days |
26.39% (38)38 / 144 runsflaked over last 7 days |
@@ -1121,7 +1004,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { | |||
customInputs: customInputSchema.array().parse(eventTypeRaw.customInputs), | |||
}; | |||
|
|||
if (eventType.metadata?.disableSuccessPage && eventType.successRedirectUrl && !cancel) { | |||
if (eventType.successRedirectUrl && isSuccessBookingPage && !cancel) { |
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 fixes a bug where if "Disable success Page" was enabled, the user can't see the booking details from bookings/upcoming. The page always redirects to custom success page.
isSuccessBookingPage
is true when a booking is done otherwise it's not set.
Reviewed and looks good, waiting until TODO items are addressed and @PeerRich shares his view on the "info" message, my early feedback is that it should probably read "A custom redirect will disable the built-in success page. Make sure to mention "Booking Confirmed" on your custom success page." and that it should style like an info rather than warning. |
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.
Requesting changes as it's not ready to merge as is.
What does this PR do?
Loom Demo
Motivation:
TODO:
Environment: Production
Type of change
How should this be tested?
Checklist