Skip to content

Commit c46e3c9

Browse files
committed
Fix for schedule page not scrolling
1 parent 16cb1c4 commit c46e3c9

File tree

1 file changed

+62
-60
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules

1 file changed

+62
-60
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx

Lines changed: 62 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import { useProject } from "~/hooks/useProject";
5151
import { redirectWithErrorMessage } from "~/models/message.server";
5252
import { findProjectBySlug } from "~/models/project.server";
5353
import {
54-
ScheduleListItem,
54+
type ScheduleListItem,
5555
ScheduleListPresenter,
5656
} from "~/presenters/v3/ScheduleListPresenter.server";
5757
import { requireUserId } from "~/services/session.server";
@@ -179,72 +179,74 @@ export default function Page() {
179179
<PageBody scrollable={false}>
180180
<ResizablePanelGroup direction="horizontal" className="h-full max-h-full">
181181
<ResizablePanel order={1} minSize={20} defaultSize={60}>
182-
{possibleTasks.length === 0 ? (
183-
<CreateScheduledTaskInstructions />
184-
) : schedules.length === 0 && !hasFilters ? (
185-
<AttachYourFirstScheduleInstructions />
186-
) : (
187-
<div className="p-3">
188-
<div className="mb-2 flex items-center justify-between gap-x-2">
189-
<ScheduleFilters
190-
possibleEnvironments={possibleEnvironments}
191-
possibleTasks={possibleTasks}
192-
/>
193-
<div className="flex items-center justify-end gap-x-2">
194-
<PaginationControls
195-
currentPage={currentPage}
196-
totalPages={totalPages}
197-
showPageNumbers={false}
182+
<div className="max-h-full overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
183+
{possibleTasks.length === 0 ? (
184+
<CreateScheduledTaskInstructions />
185+
) : schedules.length === 0 && !hasFilters ? (
186+
<AttachYourFirstScheduleInstructions />
187+
) : (
188+
<div className="p-3">
189+
<div className="mb-2 flex items-center justify-between gap-x-2">
190+
<ScheduleFilters
191+
possibleEnvironments={possibleEnvironments}
192+
possibleTasks={possibleTasks}
198193
/>
194+
<div className="flex items-center justify-end gap-x-2">
195+
<PaginationControls
196+
currentPage={currentPage}
197+
totalPages={totalPages}
198+
showPageNumbers={false}
199+
/>
200+
</div>
199201
</div>
200-
</div>
201202

202-
<SchedulesTable schedules={schedules} hasFilters={hasFilters} />
203-
<div className="mt-3 flex w-full items-start justify-between">
204-
{requiresUpgrade ? (
205-
<InfoPanel
206-
variant="upgrade"
207-
icon={LockOpenIcon}
208-
iconClassName="text-indigo-500"
209-
title="Unlock more schedules"
210-
to={v3BillingPath(organization)}
211-
buttonLabel="Upgrade"
212-
>
213-
<Paragraph variant="small">
214-
You've used all {limits.limit} of your available schedules. Upgrade your
215-
plan to enable more.
216-
</Paragraph>
217-
</InfoPanel>
218-
) : (
219-
<div className="flex h-fit flex-col items-start gap-4 rounded-md border border-grid-bright bg-background-bright p-4">
220-
<div className="flex items-center justify-between gap-6">
221-
<Header3>
222-
You've used {limits.used}/{limits.limit} of your schedules.
223-
</Header3>
203+
<SchedulesTable schedules={schedules} hasFilters={hasFilters} />
204+
<div className="mt-3 flex w-full items-start justify-between">
205+
{requiresUpgrade ? (
206+
<InfoPanel
207+
variant="upgrade"
208+
icon={LockOpenIcon}
209+
iconClassName="text-indigo-500"
210+
title="Unlock more schedules"
211+
to={v3BillingPath(organization)}
212+
buttonLabel="Upgrade"
213+
>
214+
<Paragraph variant="small">
215+
You've used all {limits.limit} of your available schedules. Upgrade your
216+
plan to enable more.
217+
</Paragraph>
218+
</InfoPanel>
219+
) : (
220+
<div className="flex h-fit flex-col items-start gap-4 rounded-md border border-grid-bright bg-background-bright p-4">
221+
<div className="flex items-center justify-between gap-6">
222+
<Header3>
223+
You've used {limits.used}/{limits.limit} of your schedules.
224+
</Header3>
224225

225-
{canUpgrade ? (
226-
<LinkButton to={v3BillingPath(organization)} variant="secondary/small">
227-
Upgrade
228-
</LinkButton>
229-
) : (
230-
<Feedback
231-
button={<Button variant="secondary/small">Request more</Button>}
232-
defaultValue="help"
226+
{canUpgrade ? (
227+
<LinkButton to={v3BillingPath(organization)} variant="secondary/small">
228+
Upgrade
229+
</LinkButton>
230+
) : (
231+
<Feedback
232+
button={<Button variant="secondary/small">Request more</Button>}
233+
defaultValue="help"
234+
/>
235+
)}
236+
</div>
237+
<div className="h-2 w-full overflow-hidden rounded-full border border-grid-bright">
238+
<div
239+
className="h-full bg-grid-bright"
240+
style={{ width: `${(limits.used / limits.limit) * 100}%` }}
233241
/>
234-
)}
235-
</div>
236-
<div className="h-2 w-full overflow-hidden rounded-full border border-grid-bright">
237-
<div
238-
className="h-full bg-grid-bright"
239-
style={{ width: `${(limits.used / limits.limit) * 100}%` }}
240-
/>
242+
</div>
241243
</div>
242-
</div>
243-
)}
244-
<PaginationControls currentPage={currentPage} totalPages={totalPages} />
244+
)}
245+
<PaginationControls currentPage={currentPage} totalPages={totalPages} />
246+
</div>
245247
</div>
246-
</div>
247-
)}
248+
)}
249+
</div>
248250
</ResizablePanel>
249251
{(isShowingNewPane || isShowingSchedule) && (
250252
<>

0 commit comments

Comments
 (0)