Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b000831
Fix labelling of avatar menu
Half-Shot Feb 25, 2025
a7c94cd
Make the integration manager toggle more clear.
Half-Shot Feb 25, 2025
5a8fc24
Merge remote-tracking branch 'origin/develop' into hs/a11y-elements-w…
Half-Shot Mar 4, 2025
e8d3888
fix label
Half-Shot Mar 4, 2025
da80d91
lint
Half-Shot Mar 4, 2025
2c2f07d
Update snapshots.
Half-Shot Mar 4, 2025
0842763
Refactor many cases of checkbox to use the new compound component.
Half-Shot Mar 4, 2025
69b1db3
Remove non-checkbox related changes
Half-Shot Mar 6, 2025
8d5f6ad
Merge branch 'develop' into hs/a11y-elements-without-descriptions
Half-Shot Mar 6, 2025
e2e07fe
Reset some things
Half-Shot Mar 6, 2025
3bdc9ff
Remove usages of mx_checkbox* styling.
Half-Shot Mar 6, 2025
dd4c0f2
Use label locators for apperance tests.
Half-Shot Mar 6, 2025
20a4111
small linter tweaks
Half-Shot Mar 6, 2025
a48f455
lint
Half-Shot Mar 6, 2025
88e7606
update screenshot
Half-Shot Mar 6, 2025
1bdd6d6
Test updates
Half-Shot Mar 6, 2025
4e81de4
lint
Half-Shot Mar 6, 2025
5e0fc5d
Merge branch 'develop' into hs/a11y-elements-without-descriptions
Half-Shot Mar 6, 2025
4538f37
Realign checkboxes for device selection.
Half-Shot Mar 7, 2025
af9943c
Merge remote-tracking branch 'origin/develop' into hs/a11y-elements-w…
Half-Shot Mar 10, 2025
0604517
Fixup QuickSettings styling
Half-Shot Mar 10, 2025
55e7b2c
remove comment
Half-Shot Mar 10, 2025
6c57dda
lint
Half-Shot Mar 10, 2025
aaa6f5e
flex comment
Half-Shot Mar 10, 2025
163458d
remove unused label
Half-Shot Mar 10, 2025
18ef2f4
remove redundant classes
Half-Shot Mar 10, 2025
69696ca
add test for spaces
Half-Shot Mar 10, 2025
4957a2e
lint
Half-Shot Mar 11, 2025
f5cc519
Copyright
Half-Shot Mar 11, 2025
533b9d2
fixup spaces test
Half-Shot Mar 11, 2025
f65831e
Merge remote-tracking branch 'origin/develop' into hs/a11y-elements-w…
Half-Shot Mar 11, 2025
b341e68
spaces lint
Half-Shot Mar 11, 2025
0098cb1
Replace pin with compound pin.
Half-Shot Mar 13, 2025
532ada1
Realign icons
Half-Shot Mar 13, 2025
80c1a1c
Remove hack for colouring icons
Half-Shot Mar 13, 2025
0cd4839
Adjust existing rooms component to correctly label room.
Half-Shot Mar 13, 2025
760d715
Add test for adding an existing room to an existing space.
Half-Shot Mar 13, 2025
7bfd720
Merge remote-tracking branch 'origin/develop' into hs/a11y-elements-w…
Half-Shot Mar 13, 2025
0620008
Merge branch 'develop' into hs/a11y-elements-without-descriptions
Half-Shot Mar 20, 2025
ef459f9
Set deterministic sort order for rooms
Half-Shot Mar 20, 2025
45c2490
lint
Half-Shot Mar 20, 2025
3b330ee
Merge branch 'develop' into hs/a11y-elements-without-descriptions
Half-Shot Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2023 Suguru Hirahara

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -50,8 +50,8 @@ test.describe("Appearance user settings tab", () => {
// Click "Show advanced" link button
await tab.getByRole("button", { name: "Show advanced" }).click();

await tab.locator(".mx_Checkbox", { hasText: "Use bundled emoji font" }).click();
await tab.locator(".mx_Checkbox", { hasText: "Use a system font" }).click();
await tab.getByLabel("Use bundled emoji font").click();
await tab.getByLabel("Use a system font").click();

// Assert that the font-family value was removed
await expect(page.locator("body")).toHaveCSS("font-family", '""');
Expand Down
41 changes: 37 additions & 4 deletions playwright/e2e/spaces/spaces.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2022 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -121,9 +121,10 @@ test.describe("Spaces", () => {
await page.getByRole("button", { name: "Skip for now" }).click();

// Assert rooms exist in the room list
await expect(page.getByRole("treeitem", { name: "General", exact: true })).toBeVisible();
await expect(page.getByRole("treeitem", { name: "Random", exact: true })).toBeVisible();
await expect(page.getByRole("treeitem", { name: "Projects", exact: true })).toBeVisible();
const roomList = page.getByRole("tree", { name: "Rooms" });
await expect(roomList.getByRole("treeitem", { name: "General", exact: true })).toBeVisible();
await expect(roomList.getByRole("treeitem", { name: "Random", exact: true })).toBeVisible();
await expect(roomList.getByRole("treeitem", { name: "Projects", exact: true })).toBeVisible();

// Assert rooms exist in the space explorer
await expect(
Expand Down Expand Up @@ -291,4 +292,36 @@ test.describe("Spaces", () => {
// Assert we get shown the new room intro, and thus not the soft crash screen
await expect(page.locator(".mx_NewRoomIntro")).toBeVisible();
});

test("should render spaces view", { tag: "@screenshot" }, async ({ page, app, user, axe, checkA11y }) => {
axe.disableRules([
// Disable this check as it triggers on nested roving tab index elements which are in practice fine
"nested-interactive",
// XXX: We have some known contrast issues here
"color-contrast",
]);

const childSpaceId1 = await app.client.createSpace({
name: "Child Space 1",
initial_state: [],
});
const childSpaceId2 = await app.client.createSpace({
name: "Child Space 2",
initial_state: [],
});
const childSpaceId3 = await app.client.createSpace({
name: "Child Space 3",
initial_state: [],
});
await app.client.createSpace({
name: "Root Space",
initial_state: [
spaceChildInitialState(childSpaceId1),
spaceChildInitialState(childSpaceId2),
spaceChildInitialState(childSpaceId3),
],
});
await app.viewSpaceByName("Root Space");
await expect(page.locator(".mx_SpaceRoomView")).toMatchScreenshot("space-room-view.png");
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Comment thread
Half-Shot marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
@import "./views/dialogs/_AddExistingToSpaceDialog.pcss";
@import "./views/dialogs/_AnalyticsLearnMoreDialog.pcss";
@import "./views/dialogs/_BugReportDialog.pcss";
@import "./views/dialogs/_BulkRedactDialog.pcss";
@import "./views/dialogs/_ChangelogDialog.pcss";
@import "./views/dialogs/_CompoundDialog.pcss";
@import "./views/dialogs/_ConfirmSpaceUserActionDialog.pcss";
Expand Down Expand Up @@ -211,7 +210,6 @@
@import "./views/elements/_ServerPicker.pcss";
@import "./views/elements/_SettingsFlag.pcss";
@import "./views/elements/_Spinner.pcss";
@import "./views/elements/_StyledCheckbox.pcss";
@import "./views/elements/_StyledRadioButton.pcss";
@import "./views/elements/_SyntaxHighlight.pcss";
@import "./views/elements/_TagComposer.pcss";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2022 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand All @@ -16,9 +16,9 @@ Please see LICENSE files in the repository root for full details.
.mx_SelectableDeviceTile_checkbox {
flex: 1 0;

.mx_Checkbox_background + div {
flex: 1 0;
/* override more specific selector */
margin-left: $spacing-16 !important;
> div {
margin-top: auto;
margin-bottom: auto;
margin-right: var(--cpd-space-1x);
}
}
43 changes: 14 additions & 29 deletions res/css/structures/_QuickSettingsButton.pcss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -70,38 +70,26 @@ Please see LICENSE files in the repository root for full details.
text-transform: uppercase;
color: var(--cpd-color-text-secondary);
margin: 20px 0 12px;
}

.mx_QuickSettingsButton_pinToSidebarHeading {
padding-left: 24px;
position: relative;
}

.mx_Checkbox {
margin-bottom: 8px;
}

.mx_QuickSettingsButton_favouritesCheckbox,
.mx_QuickSettingsButton_peopleCheckbox {
.mx_Checkbox_background + div {
padding-left: 22px;
position: relative;
margin-left: 6px;
font-size: $font-15px;
line-height: $font-24px;
color: var(--cpd-color-text-primary);
}
display: flex;
}

.mx_QuickSettingsButton_moreOptionsButton {
padding-left: 22px;
margin-left: 22px;
margin-left: var(--cpd-space-7x);
font-size: $font-15px;
line-height: $font-24px;
color: var(--cpd-color-text-primary);
position: relative;
margin-bottom: 16px;
}

.mx_QuickSettingsButton_option {
margin-bottom: var(--cpd-space-3x);
label {
/* Correctly line up icons and text. */
display: flex;
}
}
}

.mx_QuickSettingsButton_ContextMenuWrapper_new_room_list {
Expand All @@ -115,11 +103,8 @@ Please see LICENSE files in the repository root for full details.
* {
fill: $secondary-content;
}
margin-right: var(--cpd-space-1x);
color: $secondary-content;
width: 16px;
height: 16px;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 18px;
height: 18px;
}
11 changes: 1 addition & 10 deletions res/css/structures/_SpaceHierarchy.pcss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -247,15 +247,6 @@ Please see LICENSE files in the repository root for full details.
.mx_AccessibleButton_kind_primary_outline {
padding: 3px 16px; /* to account for the 1px border */
}

.mx_Checkbox {
display: inline-flex;

label {
width: 16px;
height: 16px;
}
}
}

&:hover,
Expand Down
6 changes: 1 addition & 5 deletions res/css/views/dialogs/_AddExistingToSpaceDialog.pcss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -227,8 +227,4 @@ Please see LICENSE files in the repository root for full details.
text-overflow: ellipsis;
margin-right: 12px;
}

.mx_Checkbox {
align-items: center;
}
}
19 changes: 0 additions & 19 deletions res/css/views/dialogs/_BulkRedactDialog.pcss

This file was deleted.

7 changes: 1 addition & 6 deletions res/css/views/dialogs/_ExportDialog.pcss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -43,11 +43,6 @@ Please see LICENSE files in the repository root for full details.
.mx_Field_valid.mx_Field:focus-within {
border-color: $input-border-color;
}

.mx_Checkbox input[type="checkbox"]:checked + label > .mx_Checkbox_background {
background: $info-plinth-fg-color;
border-color: $info-plinth-fg-color;
}
}

.mx_ExportDialog_progress {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -74,10 +74,6 @@ Please see LICENSE files in the repository root for full details.
line-height: $font-15px;
color: $tertiary-content;
}

.mx_Checkbox {
align-items: center;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand All @@ -19,13 +19,6 @@ Please see LICENSE files in the repository root for full details.
margin-top: 20px;
font-size: $font-15px;
line-height: $font-15px;

.mx_WidgetCapabilitiesPromptDialog_byline {
color: $muted-fg-color;
margin-left: 26px;
font-size: $font-12px;
line-height: $font-12px;
}
}

.mx_Dialog_buttons {
Expand Down
25 changes: 2 additions & 23 deletions res/css/views/elements/_LabelledCheckbox.pcss
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024,2025 New Vector Ltd.
Copyright 2022 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

.mx_LabelledCheckbox {
display: flex;
gap: 8px;
flex-direction: row;

.mx_Checkbox {
margin-top: 3px; /* visually align with label text */
}

.mx_LabelledCheckbox_labels {
flex: 1;

.mx_LabelledCheckbox_label {
vertical-align: middle;
}

.mx_LabelledCheckbox_byline {
display: block;
padding-top: $spacing-4;
color: $muted-fg-color;
font-size: $font-11px;
}
}
margin-top: var(--cpd-space-2x);
}
Loading