Skip to content

Commit d3621b5

Browse files
Add Gitpod Classic sunset notification
1 parent 40c5b7c commit d3621b5

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

components/dashboard/src/AppNotifications.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,21 @@ const INVALID_BILLING_ADDRESS = (stripePortalUrl: string | undefined) => {
131131
} as Notification;
132132
};
133133

134+
const GITPOD_CLASSIC_SUNSET = {
135+
id: "gitpod-classic-sunset",
136+
type: "info" as AlertType,
137+
preventDismiss: true, // This makes it so users can't dismiss the notification
138+
message: (
139+
<span className="text-md">
140+
<b>Gitpod Classic is sunsetting fall 2025.</b>{" "}
141+
<a className="text-kumquat-ripe font-bold" href="https://app.gitpod.io" target="_blank" rel="noreferrer">
142+
Try the new Gitpod
143+
</a>{" "}
144+
now (hosted compute coming soon)
145+
</span>
146+
),
147+
} as Notification;
148+
134149
export function AppNotifications() {
135150
const [topNotification, setTopNotification] = useState<Notification | undefined>(undefined);
136151
const { user, loading } = useUserLoader();
@@ -145,6 +160,10 @@ export function AppNotifications() {
145160
const updateNotifications = async () => {
146161
const notifications = [];
147162
if (!loading) {
163+
if (isGitpodIo()) {
164+
notifications.push(GITPOD_CLASSIC_SUNSET);
165+
}
166+
148167
if (
149168
isGitpodIo() &&
150169
(!user?.profile?.acceptedPrivacyPolicyDate ||
@@ -167,6 +186,7 @@ export function AppNotifications() {
167186

168187
if (!ignore) {
169188
const dismissedNotifications = getDismissedNotifications();
189+
// Since the sunset notification has preventDismiss: true, it won't be affected by dismissedNotifications
170190
const topNotification = notifications.find((n) => !dismissedNotifications.includes(n.id));
171191
setTopNotification(topNotification);
172192
}
@@ -197,7 +217,7 @@ export function AppNotifications() {
197217
<div className="app-container pt-2">
198218
<Alert
199219
type={topNotification.type}
200-
closable={true}
220+
closable={topNotification.id !== "gitpod-classic-sunset"} // Only show close button if it's not the sunset notification
201221
onClose={() => {
202222
if (!topNotification.preventDismiss) {
203223
dismissNotification();

0 commit comments

Comments
 (0)