Skip to content

Commit 68d686d

Browse files
committed
Show a v3 deprecation notice in the side bar
1 parent 1ec7722 commit 68d686d

File tree

1 file changed

+81
-1
lines changed

1 file changed

+81
-1
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ import { useHasAdminAccess } from "~/hooks/useUser";
4545
import { type UserWithDashboardPreferences } from "~/models/user.server";
4646
import { useCurrentPlan } from "~/routes/_app.orgs.$organizationSlug/route";
4747
import { type FeedbackType } from "~/routes/resources.feedback";
48-
import { IncidentStatusPanel } from "~/routes/resources.incidents";
48+
import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
49+
import { IncidentStatusPanel, useIncidentStatus } from "~/routes/resources.incidents";
4950
import { cn } from "~/utils/cn";
5051
import {
5152
accountPath,
@@ -599,6 +600,7 @@ export function SideMenu({
599600
</div>
600601
<div>
601602
<IncidentStatusPanel isCollapsed={isCollapsed} />
603+
<V3DeprecationPanel isCollapsed={isCollapsed} isV3={project.engine === "V1"} />
602604
<motion.div
603605
layout
604606
transition={{ duration: 0.2, ease: "easeInOut" }}
@@ -623,6 +625,84 @@ export function SideMenu({
623625
);
624626
}
625627

628+
function V3DeprecationPanel({ isCollapsed, isV3 }: { isCollapsed: boolean; isV3: boolean }) {
629+
const { hasIncident } = useIncidentStatus();
630+
631+
if (!isV3 || hasIncident) {
632+
return null;
633+
}
634+
635+
return (
636+
<Popover>
637+
<div className="p-1">
638+
<motion.div
639+
initial={false}
640+
animate={{
641+
height: isCollapsed ? 0 : "auto",
642+
opacity: isCollapsed ? 0 : 1,
643+
}}
644+
transition={{ duration: 0.15 }}
645+
className="overflow-hidden"
646+
>
647+
<V3DeprecationContent />
648+
</motion.div>
649+
650+
<motion.div
651+
initial={false}
652+
animate={{
653+
height: isCollapsed ? "auto" : 0,
654+
opacity: isCollapsed ? 1 : 0,
655+
}}
656+
transition={{ duration: 0.15 }}
657+
className="overflow-hidden"
658+
>
659+
<SimpleTooltip
660+
button={
661+
<PopoverTrigger className="flex !h-8 w-full items-center justify-center rounded border border-amber-500/30 bg-amber-500/15 transition-colors hover:border-amber-500/50 hover:bg-amber-500/25">
662+
<ExclamationTriangleIcon className="size-5 text-amber-400" />
663+
</PopoverTrigger>
664+
}
665+
content="V3 deprecation warning"
666+
side="right"
667+
sideOffset={8}
668+
disableHoverableContent
669+
asChild
670+
/>
671+
</motion.div>
672+
</div>
673+
<PopoverContent side="right" sideOffset={8} align="start" className="w-52 !min-w-0 p-0">
674+
<V3DeprecationContent />
675+
</PopoverContent>
676+
</Popover>
677+
);
678+
}
679+
680+
function V3DeprecationContent() {
681+
return (
682+
<div className="flex flex-col gap-2 rounded border border-amber-500/30 bg-amber-500/10 p-2 pt-1.5">
683+
<div className="flex items-center gap-1 border-b border-amber-500/30 pb-1">
684+
<ExclamationTriangleIcon className="size-4 text-amber-400" />
685+
<Paragraph variant="small/bright" className="text-amber-300">
686+
V3 deprecation warning
687+
</Paragraph>
688+
</div>
689+
<Paragraph variant="extra-small/bright" className="text-amber-300">
690+
This is a v3 project. V3 deploys will stop working on 1 April 2026. Full shutdown is 1 July
691+
2026 where all v3 runs will stop executing. Migrate to v4 to avoid downtime.
692+
</Paragraph>
693+
<LinkButton
694+
variant="secondary/small"
695+
to="https://trigger.dev/docs/migrating-from-v3"
696+
target="_blank"
697+
fullWidth
698+
className="border-amber-500/30 bg-amber-500/15 hover:!border-amber-500/50 hover:!bg-amber-500/25"
699+
>
700+
<span className="text-amber-300">Migrate to v4 now</span>
701+
</LinkButton>
702+
</div>
703+
);
704+
}
705+
626706
function ProjectSelector({
627707
project,
628708
organization,

0 commit comments

Comments
 (0)