-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
perf: layout persistence and reduced bundle size #18889
perf: layout persistence and reduced bundle size #18889
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (01/25/25)1 reviewer was added to this PR based on Keith Williams's automation. |
{props.afterHeading && <>{props.afterHeading}</>} | ||
|
||
<div className={classNames(props.flexChildrenContainer && "flex flex-1 flex-col")}> | ||
{props.children} |
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.
children is here
: "pwa:bottom-[max(7rem,_calc(5rem_+_env(safe-area-inset-bottom)))] fixed bottom-20 z-40 ltr:right-4 rtl:left-4 md:z-auto md:ltr:right-0 md:rtl:left-0", | ||
"flex-shrink-0 [-webkit-app-region:no-drag] md:relative md:bottom-auto md:right-auto" | ||
)}> | ||
{props.CTA} |
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.
CTA
|
||
// Copied from `ShellMain` but with a different `ShellMainAppDirBackButton` import | ||
// for client/server component separation | ||
export function ShellMainAppDir(props: LayoutProps) { |
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.
Copied from ShellMain
component inside Shell.tsx
.
I was able to turn this into RSC by extracting the back button into a separate client component ShellMainAppDirBackButton.tsx
.
heading={t("availability")} | ||
subtitle={t("configure_availability")} |
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.
fyi, title
or description
are not needed. They are passed to Shell.tsx
for SEO purposes, but they aren't used anywhere in ShellMain
. Also, we turn withoutSeo={true}
anyways since App Router handles Metadata already
@@ -942,8 +941,36 @@ const InfiniteScrollMain = ({ | |||
); | |||
}; | |||
|
|||
export const EventTypesCTA = () => { |
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.
extracted from CTA={...}
in Main Page below
@@ -195,14 +194,11 @@ type PageProps = { | |||
currentOrg?: Awaited<ReturnType<typeof OrganizationRepository.findCurrentOrg>> | null; | |||
}; | |||
|
|||
export default function AvailabilityPage({ currentOrg }: PageProps) { | |||
export const AvailabilityCTA = () => { |
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.
Extracted from CTA={...}
from Main page below
@@ -19,14 +20,23 @@ export const generateMetadata = async () => | |||
|
|||
const Page = async ({ params, searchParams }: PageProps) => { | |||
const context = buildLegacyCtx(headers(), cookies(), params, searchParams); | |||
const session = await getServerSessionForAppDir(); |
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 makes initial RSC fetch so slow, check https://app.campsite.com/cal/posts/58hm2drix99s
E2E results are ready! |
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.
Unit tests failing and merge conflicts
…ce-and-reduced-bundle-size
* create /(main-nav)/layout.tsx file that uses Shell * Add ShellMainAppDir that clones ShellMain but with client/server separation * event-types, availability, bookings * update pagesAndRewritePaths logic * fix --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com>
What does this PR do?
/event-types
,/bookings/[status]
,/availability
(main-nav)
, andlayout.tsx
file inside withShell
Shell
individually in its client componente.g.,
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?