-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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: flash of grey in event types single page #8056
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} catch (err) { | ||
throw err; | ||
} | ||
await ssr.viewer.eventTypes.get.prefetch({ id: typeParam }); |
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.
prefetch query in serverSide props
@@ -366,9 +364,9 @@ const EventTypePage = (props: EventTypeSetupProps) => { | |||
}; | |||
|
|||
const EventTypePageWrapper = (props: inferSSRProps<typeof getServerSideProps>) => { | |||
const { data, isLoading } = trpc.viewer.eventTypes.get.useQuery({ id: props.type }); | |||
if (isLoading || !data) return null; |
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.
data is present because we prefetch the query in the server side props.
description?: string | null; | ||
} | ||
|
||
const DescriptionEditor = (props: DescriptionEditorProps) => { |
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.
to fix hydration errors
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 One Page Changed SizeThe following page 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. |
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/03/2023 09:01:42am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 14ae213 Started: 04/03/2023 08:56:49am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Routing Forms Seeded Routing Form Router URL should work
Retry 1 • Initial Attempt |
0% (0)0 / 145 runsfailed over last 7 days |
8.28% (12)12 / 145 runsflaked over last 7 days |
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.
Nice! That flash of grey really annoyed me.
Tested locally works well :)
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.
Checked it out on local and looks to work, nice work 🙏
What does this PR do?
before:
Screencast.2023-04-03.14.08.22.webm
after:
Screencast.2023-04-03.14.06.39.webm
Type of change