Skip to content

Commit 54a7d29

Browse files
authored
Implement new design for Welcome page (#33211)
* Convert welcome.html to React component In advance of changes to use Compound * Fix types * Fix tests * Update styling to match Figma * Fix random capitalisation * Tweak styling * Regenerate i18n * Update tests * Make linter happy * Iterate
1 parent 9df7182 commit 54a7d29

24 files changed

Lines changed: 264 additions & 309 deletions

File tree

.github/workflows/static_analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
voip|element_call
104104
error|invalid_json
105105
error|misconfigured
106-
welcome_to_element
106+
welcome|title_element
107107
devtools|settings|elementCallUrl
108108
labs|sliding_sync_description
109109
settings|voip|noise_suppression_description
Loading

apps/web/playwright/e2e/app-loading/guest-registration.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test.use({
2020

2121
test("Shows the welcome page by default", async ({ page }) => {
2222
await page.goto("/");
23-
await expect(page.getByRole("heading", { name: "Welcome to Element!" })).toBeVisible();
23+
await expect(page.getByRole("heading", { name: "Be in your element" })).toBeVisible();
2424
await expect(page.getByRole("link", { name: "Sign in" })).toBeVisible();
2525
});
2626

apps/web/playwright/e2e/login/login-consent.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ test.describe("Login", () => {
126126
await page.goto("/");
127127

128128
// Should give us the welcome page initially
129-
await expect(page.getByRole("heading", { name: "Welcome to Element!" })).toBeVisible();
129+
await expect(page.getByRole("heading", { name: "Be in your element" })).toBeVisible();
130130

131131
// Start the login process
132132
await expect(axe).toHaveNoViolations();

apps/web/res/css/_components.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
@import "./views/auth/_AuthPage.pcss";
106106
@import "./views/auth/_CompleteSecurityBody.pcss";
107107
@import "./views/auth/_CountryDropdown.pcss";
108+
@import "./views/auth/_DefaultWelcome.pcss";
108109
@import "./views/auth/_InteractiveAuthEntryComponents.pcss";
109110
@import "./views/auth/_LanguageSelector.pcss";
110111
@import "./views/auth/_LoginWithQR.pcss";
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
Copyright 2026 Element Creations Ltd.
3+
4+
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
5+
Please see LICENSE files in the repository root for full details.
6+
*/
7+
8+
.mx_DefaultWelcome {
9+
text-align: center;
10+
11+
.mx_DefaultWelcome_logo img {
12+
height: 48px;
13+
aspect-ratio: auto;
14+
display: block;
15+
margin: 0 auto;
16+
}
17+
18+
h1 {
19+
margin: var(--cpd-space-4x) 0 var(--cpd-space-2x);
20+
}
21+
22+
p {
23+
color: var(--cpd-color-text-secondary);
24+
margin-top: var(--cpd-space-2x);
25+
}
26+
27+
.mx_DefaultWelcome_buttons {
28+
margin: var(--cpd-space-6x) 0 var(--cpd-space-1x);
29+
padding-bottom: var(--cpd-space-4x);
30+
border-bottom: 1px solid var(--cpd-color-separator-primary);
31+
32+
a {
33+
width: 380px;
34+
margin-bottom: var(--cpd-space-4x);
35+
}
36+
}
37+
}
38+
39+
.mx_WelcomePage_registrationDisabled {
40+
.mx_DefaultWelcome_buttons_register {
41+
display: none;
42+
}
43+
}

apps/web/res/css/views/auth/_Welcome.pcss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Please see LICENSE files in the repository root for full details.
99
display: flex;
1010
flex-direction: column;
1111
align-items: center;
12+
background-color: var(--cpd-color-bg-canvas-default);
13+
box-sizing: border-box;
14+
padding: var(--cpd-space-11x) var(--cpd-space-12x) var(--cpd-space-4x);
15+
1216
&.mx_WelcomePage_registrationDisabled {
1317
.mx_ButtonCreateAccount {
1418
display: none;
@@ -18,7 +22,7 @@ Please see LICENSE files in the repository root for full details.
1822

1923
.mx_Welcome .mx_AuthBody_language {
2024
width: 160px;
21-
margin-bottom: 10px;
25+
margin: var(--cpd-space-1x) 0;
2226
}
2327

2428
/* Invert image colours in dark mode. */

apps/web/res/welcome.html

Lines changed: 0 additions & 191 deletions
This file was deleted.

apps/web/res/welcome/images/icon-create-account.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/web/res/welcome/images/icon-help.svg

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)