Skip to content

Commit 72d6fcb

Browse files
eeshmdhairyashiil
andauthored
fix: remove sticky positioning from page headers in pages on scroll (calcom#27242)
* fix: remove sticky positioning from page headers in pages using ShellMain * correct fix (mostly) * fix: disable sticky headers on routing forms and members pages Applied disableSticky={true} to remaining affected pages: - Routing Forms page - Organization Members view - Platform Members view --------- Co-authored-by: Dhairyashil <dhairyashil10101010@gmail.com>
1 parent 3e30a5c commit 72d6fcb

5 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/web/app/(use-page-wrapper)/apps/routing-forms/forms/[[...pages]]/Forms.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export default function RoutingForms({ appUrl }: { appUrl: string }) {
149149
return (
150150
<LicenseRequired>
151151
<ShellMain
152+
disableSticky={true}
152153
heading={t("routing")}
153154
CTA={
154155
hasPaidPlan && forms?.length ? (

apps/web/app/(use-page-wrapper)/settings/organizations/(org-user-only)/[id]/members/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default async function Layout({ children }: { children: React.ReactNode }
1010
return (
1111
<Shell
1212
withoutMain={false}
13+
disableSticky={true}
1314
heading={t("organization_members")}
1415
subtitle={t("organization_description")}
1516
headerClassName="hidden md:block"

apps/web/app/(use-page-wrapper)/settings/platform/members/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default async function Layout({ children }: { children: React.ReactNode }
2323
/>
2424
</div>
2525
}
26+
disableSticky={true}
2627
title={t("platform_members")}
2728
subtitle={t("platform_members_description")}
2829
withoutMain={false}

apps/web/modules/ee/workflows/views/WorkflowsPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function WorkflowsPage({ filteredList }: PageProps) {
5656
<Shell withoutMain>
5757
<LicenseRequired>
5858
<ShellMain
59+
disableSticky={true}
5960
heading={t("workflows")}
6061
subtitle={t("workflows_to_automate_notifications")}
6162
title={t("workflows")}

apps/web/modules/shell/Shell.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export type LayoutProps = {
8787
afterHeading?: ReactNode;
8888
smallHeading?: boolean;
8989
isPlatformUser?: boolean;
90+
disableSticky?: boolean;
9091
};
9192

9293
const KBarWrapper = ({ children, withKBar = false }: { withKBar: boolean; children: React.ReactNode }) =>
@@ -132,8 +133,9 @@ export function ShellMain(props: LayoutProps) {
132133
{(props.heading || !!props.backPath) && (
133134
<div
134135
className={classNames(
135-
"bg-default sticky top-0 z-10 mb-0 flex items-center md:mb-6 md:mt-0",
136-
props.smallHeading ? "lg:mb-7" : "lg:mb-8"
136+
"bg-default mb-0 flex items-center md:mb-6 md:mt-0",
137+
props.smallHeading ? "lg:mb-7" : "lg:mb-8",
138+
!props.disableSticky && "sticky top-0 z-10"
137139
)}>
138140
{!!props.backPath && (
139141
<Button

0 commit comments

Comments
 (0)