Skip to content

Commit bb65be7

Browse files
refactor(Login): update layout and messaging for Gitpod Classic users (#20388)
1 parent e389b85 commit bb65be7

File tree

2 files changed

+35
-98
lines changed

2 files changed

+35
-98
lines changed

components/dashboard/src/Login.tsx

Lines changed: 35 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ import { cn } from "@podkit/lib/cn";
2323
import { userClient } from "./service/public-api";
2424
import { ProductLogo } from "./components/ProductLogo";
2525
import { useIsDataOps } from "./data/featureflag-query";
26-
import { LinkButton } from "@podkit/buttons/LinkButton";
27-
import { IconGitpodEngraved } from "./icons/GitpodEngraved";
28-
import { IconEarlyAccess } from "./icons/IconEarlyAccess";
29-
import { useTheme } from "./theme-context";
26+
import GitpodClassicCard from "./images/gitpod-classic-card.png";
3027
import { LoadingState } from "@podkit/loading/LoadingState";
28+
import { isGitpodIo } from "./utils";
3129

3230
export function markLoggedIn() {
3331
document.cookie = GitpodCookie.generateCookie(window.location.hostname);
@@ -145,12 +143,11 @@ type LoginWrapperProps = LoginProps & {
145143

146144
const PAYGLoginWrapper: FC<LoginWrapperProps> = ({ providerFromContext, repoPathname, onLoggedIn }) => {
147145
return (
148-
<>
149-
<LeftPanel />
146+
<div className="flex flex-col md:flex-row w-full">
150147
<div
151148
id="login-section"
152149
// for some reason, min-h-dvh does not work, so we need tailwind's arbitrary values
153-
className="w-full min-h-[100dvh] lg:w-4/5 flex flex-col justify-center items-center bg-[#FDF1E7] dark:bg-[#23211e] p-2"
150+
className="w-full min-h-[100dvh] lg:w-2/3 flex flex-col justify-center items-center bg-[#FDF1E7] dark:bg-[#23211e] p-2"
154151
>
155152
<div
156153
id="login-section-column"
@@ -163,15 +160,13 @@ const PAYGLoginWrapper: FC<LoginWrapperProps> = ({ providerFromContext, repoPath
163160
onLoggedIn={onLoggedIn}
164161
repoPathname={repoPathname}
165162
/>
166-
<p className="text-sm text-[#64645F] mt-6 mb-6 lg:mb-0 lg:mt-8 max-w-sm text-center font-semibold">
167-
Gitpod Classic will be sunset by April 1, 2025 and superseded by Gitpod Flex
168-
</p>
169163
</div>
170164
}
171165
<TermsOfServiceAndPrivacyPolicy />
172166
</div>
173167
</div>
174-
</>
168+
<RightProductDescriptionPanel />
169+
</div>
175170
);
176171
};
177172

@@ -212,6 +207,7 @@ const LoginContent = ({
212207
}) => {
213208
const { setUser } = useContext(UserContext);
214209
const isDataOps = useIsDataOps();
210+
const isGitpodIoUser = isGitpodIo();
215211

216212
const authProviders = useAuthProviderDescriptions();
217213
const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);
@@ -271,7 +267,7 @@ const LoginContent = ({
271267
);
272268

273269
return (
274-
<div className="rounded-xl px-10 py-10 mx-auto w-full max-w-md">
270+
<div className="rounded-xl px-10 py-10 mx-auto w-full max-w-lg">
275271
<div className="mx-auto pb-8">
276272
<ProductLogo className="h-14 mx-auto block" />
277273
</div>
@@ -284,8 +280,13 @@ const LoginContent = ({
284280
<Heading2>Open a cloud development environment</Heading2>
285281
<Subheading>for the repository {repoPathname?.slice(1)}</Subheading>
286282
</>
287-
) : (
283+
) : !isGitpodIoUser ? (
288284
<Heading1>Log in to Gitpod</Heading1>
285+
) : (
286+
<>
287+
<Heading1>Log in to Gitpod Classic</Heading1>
288+
<Subheading>Hosted by us</Subheading>
289+
</>
289290
)}
290291
</div>
291292

@@ -320,103 +321,39 @@ const LoginContent = ({
320321
);
321322
};
322323

323-
const LeftPanel = () => {
324-
const { isDark } = useTheme();
325-
324+
const RightProductDescriptionPanel = () => {
326325
return (
327-
<div className="w-full lg:w-1/3 lg:max-w-lg flex flex-col justify-between p-4 lg:p-10 lg:pb-2 min-h-screen">
326+
<div className="w-full lg:w-1/3 flex flex-col md:justify-center p-4 lg:p-10 lg:pb-2 md:min-h-screen">
328327
<div>
329-
<div className="p-[1px] bg-gradient-to-b from-white to-[#ECE7E5] dark:from-gray-700 dark:to-gray-600 rounded-2xl justify-center items-center mb-8">
330-
<div className="bg-[#F9F9F9B2] dark:bg-gray-800 w-full p-4 rounded-2xl border border-gray-100 dark:border-gray-700">
331-
<h2 className="bg-white dark:bg-gray-700 inline-flex text-xs font-semibold mb-4 border-[0.5px] shadow border-divider dark:border-gray-600 px-2 py-1 rounded-lg">
332-
<span className="bg-gradient-to-l from-[#FFAE33] to-[#FF8A00] text-transparent bg-clip-text">
333-
Did you know?
334-
</span>
335-
</h2>
336-
<p className="text-pk-content-secondary dark:text-gray-300 mt-1">
337-
We launched a new version of Gitpod in early access.
338-
</p>
339-
</div>
340-
</div>
341328
<div className="justify-center md:justify-start mb-6 md:mb-8">
342-
<ProductLogo className="h-8 mb-4" />
343329
<h2 className="text-2xl font-medium mb-2 dark:text-white inline-flex items-center gap-x-2">
344-
Gitpod Flex
330+
Gitpod Classic
345331
</h2>
346-
<p className="text-lg text-gray-600 dark:text-gray-300 mb-2">
347-
Automated, standardized
348-
<br /> development environments.
332+
<p className="text-pk-content-secondary mb-2">
333+
Automated, standardized development environments hosted by us in Gitpod’s infrastructure. Users
334+
who joined before October 1, 2024 on non-Enterprise plans are considered Gitpod Classic users.
349335
</p>
336+
<div className="border border-pk-border-base rounded-xl p-4 bg-pk-surface-secondary mt-5">
337+
<p className="text-gray-800 dark:text-gray-100">
338+
<b>Please note:</b> Gitpod Classic will discontinued in April 2025 and replaced by{" "}
339+
<a
340+
className="gp-link font-semibold"
341+
href="https://app.gitpod.io/login"
342+
target="_blank"
343+
rel="noopener noreferrer"
344+
>
345+
Gitpod Flex
346+
</a>
347+
.
348+
</p>
349+
</div>
350350
</div>
351-
352-
<ul className="space-y-4">
353-
{[
354-
{
355-
title: "Self-host in under 3 minutes",
356-
description:
357-
"All your source code, data, and intellectual property stays in your private network.",
358-
},
359-
{
360-
title: "Local environments to replace Docker Desktop",
361-
description:
362-
"Built-in Linux virtualization to run Dev Container without Docker Desktop on macOS",
363-
},
364-
{
365-
title: "Automate common development workflows",
366-
description:
367-
"Seed databases, provision infra, runbooks as one-click actions, configure code assistants, etc. ",
368-
},
369-
{
370-
title: "Dev Container support",
371-
description:
372-
"Eliminate the need to manually install tools, dependencies and editor extensions.",
373-
},
374-
].map((feature, index) => (
375-
<li key={index} className="flex items-start">
376-
<GreenCheckIcon />
377-
<div>
378-
<span className="text-sm font-medium text-pk-content-primary">{feature.title}</span>
379-
<p className="text-sm text-pk-content-secondary mt-0.5">{feature.description}</p>
380-
</div>
381-
</li>
382-
))}
383-
</ul>
384-
<div className="flex w-full justify-center items-center mt-8 mb-2">
385-
<LinkButton
386-
variant="secondary"
387-
className="text-pk-content-primary bg-pk-surface-primary dark:bg-gray-700 dark:text-white w-full shadow font-medium"
388-
href="https://app.gitpod.io/login"
389-
isExternalUrl={true}
390-
>
391-
Explore
392-
</LinkButton>
393-
</div>
394-
</div>
395-
<div className="justify-center items-center max-w-fit mx-auto flex flex-col pt-4">
396-
<IconGitpodEngraved variant={isDark ? "dark" : "light"} className="shadow-engraving block h-6 w-6" />
397-
<span className="py-1" />
398-
<IconEarlyAccess className="dark:fill-pk-surface-01/30" variant={isDark ? "dark" : "light"} />
351+
<img src={GitpodClassicCard} alt="Gitpod Classic" className="w-full" />
399352
</div>
400353
</div>
401354
);
402355
};
403356

404-
const GreenCheckIcon = () => {
405-
return (
406-
<div className="w-5 h-5 rounded-full bg-green-500 flex items-center justify-center flex-shrink-0 mr-3 mt-1">
407-
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
408-
<path
409-
d="M11 20.5C16.2467 20.5 20.5 16.2467 20.5 11C20.5 5.75329 16.2467 1.5 11 1.5C5.75329 1.5 1.5 5.75329 1.5 11C1.5 16.2467 5.75329 20.5 11 20.5Z"
410-
fill="#17C165"
411-
stroke="#D5F6DB"
412-
strokeWidth="3"
413-
/>
414-
<path d="M7 11.5L10 14L15 8" stroke="white" strokeWidth="2" strokeLinejoin="round" />
415-
</svg>
416-
</div>
417-
);
418-
};
419-
420357
const TermsOfServiceAndPrivacyPolicy = () => {
421358
return (
422359
<div className="flex-none mx-auto text-center px-4 pb-4">
Loading

0 commit comments

Comments
 (0)