Skip to content

Commit 419ac8a

Browse files
authored
Merge branch 'develop' into prevent_multiple_reset_identity
2 parents b77591f + 4b02520 commit 419ac8a

File tree

30 files changed

+818
-163
lines changed

30 files changed

+818
-163
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Changes in [1.11.94](https://github.com/element-hq/element-web/releases/tag/v1.11.94) (2025-02-27)
2+
==================================================================================================
3+
## 🐛 Bug Fixes
4+
5+
* [Backport staging] fix: /tmp/element-web-config may already exist preventing the container from booting up ([#29377](https://github.com/element-hq/element-web/pull/29377)). Contributed by @RiotRobot.
6+
7+
18
Changes in [1.11.93](https://github.com/element-hq/element-web/releases/tag/v1.11.93) (2025-02-25)
29
==================================================================================================
310
## ✨ Features

babel.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ module.exports = {
3131

3232
"@babel/plugin-syntax-dynamic-import",
3333
"@babel/plugin-transform-runtime",
34+
["@babel/plugin-proposal-decorators", { version: "2023-11" }], // only needed by the js-sdk
35+
"@babel/plugin-transform-class-static-block", // only needed by the js-sdk for decorators
3436
],
3537
};

docker/docker-entrypoint.d/18-load-element-modules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ entrypoint_log() {
1111
}
1212

1313
# Copy these config files as a base
14-
mkdir /tmp/element-web-config
14+
mkdir -p /tmp/element-web-config
1515
cp /app/config*.json /tmp/element-web-config/
1616

1717
# If there are modules to be loaded

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-web",
3-
"version": "1.11.93",
3+
"version": "1.11.94",
44
"description": "Element: the future of secure communication",
55
"author": "New Vector Ltd.",
66
"repository": {
@@ -162,9 +162,11 @@
162162
"@babel/core": "^7.12.10",
163163
"@babel/eslint-parser": "^7.12.10",
164164
"@babel/eslint-plugin": "^7.12.10",
165+
"@babel/plugin-proposal-decorators": "^7.25.9",
165166
"@babel/plugin-proposal-export-default-from": "^7.12.1",
166167
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
167168
"@babel/plugin-transform-class-properties": "^7.12.1",
169+
"@babel/plugin-transform-class-static-block": "^7.26.0",
168170
"@babel/plugin-transform-logical-assignment-operators": "^7.20.7",
169171
"@babel/plugin-transform-nullish-coalescing-operator": "^7.12.1",
170172
"@babel/plugin-transform-numeric-separator": "^7.12.7",

playwright/e2e/crypto/crypto.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const checkDMRoom = async (page: Page) => {
2828
};
2929

3030
const startDMWithBob = async (page: Page, bob: Bot) => {
31-
await page.locator(".mx_RoomList").getByRole("button", { name: "Start chat" }).click();
31+
await page.locator(".mx_LegacyRoomList").getByRole("button", { name: "Start chat" }).click();
3232
await page.getByTestId("invite-dialog-input").fill(bob.credentials.userId);
3333
await page.locator(".mx_InviteDialog_tile_nameStack_name").getByText("Bob").click();
3434
await expect(

playwright/e2e/invite/invite-dialog.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test.describe("Invite dialog", function () {
7777
"should support inviting a user to Direct Messages",
7878
{ tag: "@screenshot" },
7979
async ({ page, app, user, bot }) => {
80-
await page.locator(".mx_RoomList").getByRole("button", { name: "Start chat" }).click();
80+
await page.locator(".mx_LegacyRoomList").getByRole("button", { name: "Start chat" }).click();
8181

8282
const other = page.locator(".mx_InviteDialog_other");
8383
// Assert that the header is rendered

playwright/e2e/timeline/timeline.spec.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,40 @@ test.describe("Timeline", () => {
875875
);
876876
});
877877
});
878+
879+
test("should render a code block", { tag: "@screenshot" }, async ({ page, app, room }) => {
880+
await page.goto(`/#/room/${room.roomId}`);
881+
await app.settings.setValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
882+
883+
// Wait until configuration is finished
884+
await expect(
885+
page
886+
.locator(".mx_GenericEventListSummary_summary")
887+
.getByText(`${OLD_NAME} created and configured the room.`),
888+
).toBeVisible();
889+
890+
// Send a code block
891+
const composer = app.getComposerField();
892+
await composer.fill("```\nconsole.log('Hello, world!');\n```");
893+
await composer.press("Enter");
894+
895+
const tile = page.locator(".mx_EventTile");
896+
await expect(tile).toBeVisible();
897+
await expect(tile).toMatchScreenshot("code-block.png", { mask: [page.locator(".mx_MessageTimestamp")] });
898+
899+
// Edit a code block and assert the edited code block has been correctly rendered
900+
await tile.hover();
901+
await page.getByRole("toolbar", { name: "Message Actions" }).getByRole("button", { name: "Edit" }).click();
902+
await page
903+
.getByRole("textbox", { name: "Edit message" })
904+
.fill("```\nconsole.log('Edited: Hello, world!');\n```");
905+
await page.getByRole("textbox", { name: "Edit message" }).press("Enter");
906+
907+
const newTile = page.locator(".mx_EventTile");
908+
await expect(newTile).toMatchScreenshot("edited-code-block.png", {
909+
mask: [page.locator(".mx_MessageTimestamp")],
910+
});
911+
});
878912
});
879913

880914
test.describe("message sending", { tag: ["@no-firefox", "@no-webkit"] }, () => {
Loading
Loading

playwright/testcontainers/synapse.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { type HomeserverContainer, type StartedHomeserverContainer } from "./Hom
2525
import { type StartedMatrixAuthenticationServiceContainer } from "./mas.ts";
2626
import { Api, ClientServerApi, type Verb } from "../plugins/utils/api.ts";
2727

28-
const TAG = "develop@sha256:8d1c531cf6010b63142a04e1b138a60720946fa131ad404813232f02db4ce7ba";
28+
const TAG = "develop@sha256:3c22173f9e2c28af991b918a1a097d8bf05dd9bdd4afd89d142c65004a59322d";
2929

3030
const DEFAULT_CONFIG = {
3131
server_name: "localhost",
@@ -144,6 +144,7 @@ const DEFAULT_CONFIG = {
144144
enabled: true,
145145
include_offline_users_on_sync: true,
146146
},
147+
room_list_publication_rules: [{ action: "allow" }],
147148
};
148149

149150
export type SynapseConfig = Partial<typeof DEFAULT_CONFIG>;

res/css/_components.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@
289289
@import "./views/rooms/_IRCLayout.pcss";
290290
@import "./views/rooms/_InvitedIconView.pcss";
291291
@import "./views/rooms/_JumpToBottomButton.pcss";
292+
@import "./views/rooms/_LegacyRoomList.pcss";
292293
@import "./views/rooms/_LegacyRoomListHeader.pcss";
293294
@import "./views/rooms/_LinkPreviewGroup.pcss";
294295
@import "./views/rooms/_LinkPreviewWidget.pcss";
@@ -313,7 +314,6 @@
313314
@import "./views/rooms/_RoomHeader.pcss";
314315
@import "./views/rooms/_RoomInfoLine.pcss";
315316
@import "./views/rooms/_RoomKnocksBar.pcss";
316-
@import "./views/rooms/_RoomList.pcss";
317317
@import "./views/rooms/_RoomPreviewBar.pcss";
318318
@import "./views/rooms/_RoomPreviewCard.pcss";
319319
@import "./views/rooms/_RoomSearchAuxPanel.pcss";

res/css/views/rooms/RoomListPanel/_RoomListHeaderView.pcss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
height: 60px;
1010
padding: 0 var(--cpd-space-3x);
1111

12-
h1 {
13-
all: unset;
14-
font: var(--cpd-font-heading-sm-semibold);
12+
.mx_RoomListHeaderView_title {
13+
min-width: 0;
14+
15+
h1 {
16+
all: unset;
17+
font: var(--cpd-font-heading-sm-semibold);
18+
overflow: hidden;
19+
white-space: nowrap;
20+
text-overflow: ellipsis;
21+
}
1522
}
1623

1724
button {

res/css/views/rooms/_EventTile.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ $left-gutter: 64px;
683683
line-height: inherit !important;
684684
background-color: inherit;
685685
color: inherit; /* inherit the colour from the dark or light theme by default (but not for code blocks) */
686+
flex: 1;
686687

687688
pre,
688689
code {

res/css/views/rooms/_RoomList.pcss renamed to res/css/views/rooms/_LegacyRoomList.pcss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
.mx_RoomList {
9+
.mx_LegacyRoomList {
1010
padding-right: 7px; /* width of the scrollbar, to line things up */
1111
}
1212

13-
.mx_RoomList_iconPlus::before {
13+
.mx_LegacyRoomList_iconPlus::before {
1414
mask-image: url("$(res)/img/element-icons/roomlist/plus-circle.svg");
1515
}
16-
.mx_RoomList_iconNewRoom::before {
16+
.mx_LegacyRoomList_iconNewRoom::before {
1717
mask-image: url("$(res)/img/element-icons/roomlist/hash-plus.svg");
1818
}
19-
.mx_RoomList_iconNewVideoRoom::before {
19+
.mx_LegacyRoomList_iconNewVideoRoom::before {
2020
mask-image: url("$(res)/img/element-icons/roomlist/hash-video.svg");
2121
}
22-
.mx_RoomList_iconAddExistingRoom::before {
22+
.mx_LegacyRoomList_iconAddExistingRoom::before {
2323
mask-image: url("$(res)/img/element-icons/roomlist/hash.svg");
2424
}
25-
.mx_RoomList_iconExplore::before {
25+
.mx_LegacyRoomList_iconExplore::before {
2626
mask-image: url("$(res)/img/element-icons/roomlist/hash-search.svg");
2727
}
28-
.mx_RoomList_iconDialpad::before {
28+
.mx_LegacyRoomList_iconDialpad::before {
2929
mask-image: url("$(res)/img/element-icons/roomlist/dialpad.svg");
3030
}
31-
.mx_RoomList_iconStartChat::before {
31+
.mx_LegacyRoomList_iconStartChat::before {
3232
mask-image: url("@vector-im/compound-design-tokens/icons/user-add-solid.svg");
3333
}
34-
.mx_RoomList_iconInvite::before {
34+
.mx_LegacyRoomList_iconInvite::before {
3535
mask-image: url("$(res)/img/element-icons/room/share.svg");
3636
}

src/components/structures/SpaceRoomView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => {
117117
<>
118118
<IconizedContextMenuOption
119119
label={_t("action|new_room")}
120-
iconClassName="mx_RoomList_iconNewRoom"
120+
iconClassName="mx_LegacyRoomList_iconNewRoom"
121121
onClick={async (e): Promise<void> => {
122122
e.preventDefault();
123123
e.stopPropagation();
@@ -132,7 +132,7 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => {
132132
{videoRoomsEnabled && (
133133
<IconizedContextMenuOption
134134
label={_t("action|new_video_room")}
135-
iconClassName="mx_RoomList_iconNewVideoRoom"
135+
iconClassName="mx_LegacyRoomList_iconNewVideoRoom"
136136
onClick={async (e): Promise<void> => {
137137
e.preventDefault();
138138
e.stopPropagation();
@@ -157,7 +157,7 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => {
157157
)}
158158
<IconizedContextMenuOption
159159
label={_t("action|add_existing_room")}
160-
iconClassName="mx_RoomList_iconAddExistingRoom"
160+
iconClassName="mx_LegacyRoomList_iconAddExistingRoom"
161161
onClick={(e) => {
162162
e.preventDefault();
163163
e.stopPropagation();
@@ -168,7 +168,7 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => {
168168
{canCreateSpace && (
169169
<IconizedContextMenuOption
170170
label={_t("room_list|add_space_label")}
171-
iconClassName="mx_RoomList_iconPlus"
171+
iconClassName="mx_LegacyRoomList_iconPlus"
172172
onClick={(e) => {
173173
e.preventDefault();
174174
e.stopPropagation();
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Copyright 2025 New Vector 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+
import type { Room } from "matrix-js-sdk/src/matrix";
9+
import RoomListStoreV3 from "../../../stores/room-list-v3/RoomListStoreV3";
10+
11+
export interface RoomListViewState {
12+
/**
13+
* A list of rooms to be displayed in the left panel.
14+
*/
15+
rooms: Room[];
16+
}
17+
18+
/**
19+
* View model for the new room list
20+
* @see {@link RoomListViewState} for more information about what this view model returns.
21+
*/
22+
export function useRoomListViewModel(): RoomListViewState {
23+
const rooms = RoomListStoreV3.instance.getSortedRooms();
24+
return { rooms };
25+
}

src/components/views/rooms/LegacyRoomList.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const DmAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex, dispatcher = default
142142
{showCreateRooms && (
143143
<IconizedContextMenuOption
144144
label={_t("action|start_new_chat")}
145-
iconClassName="mx_RoomList_iconStartChat"
145+
iconClassName="mx_LegacyRoomList_iconStartChat"
146146
onClick={(e) => {
147147
e.preventDefault();
148148
e.stopPropagation();
@@ -158,7 +158,7 @@ const DmAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex, dispatcher = default
158158
{showInviteUsers && (
159159
<IconizedContextMenuOption
160160
label={_t("action|invite_to_space")}
161-
iconClassName="mx_RoomList_iconInvite"
161+
iconClassName="mx_LegacyRoomList_iconInvite"
162162
onClick={(e) => {
163163
e.preventDefault();
164164
e.stopPropagation();
@@ -230,7 +230,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
230230
<IconizedContextMenuOptionList first>
231231
<IconizedContextMenuOption
232232
label={_t("action|explore_rooms")}
233-
iconClassName="mx_RoomList_iconExplore"
233+
iconClassName="mx_LegacyRoomList_iconExplore"
234234
onClick={(e) => {
235235
e.preventDefault();
236236
e.stopPropagation();
@@ -247,7 +247,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
247247
<>
248248
<IconizedContextMenuOption
249249
label={_t("action|new_room")}
250-
iconClassName="mx_RoomList_iconNewRoom"
250+
iconClassName="mx_LegacyRoomList_iconNewRoom"
251251
onClick={(e) => {
252252
e.preventDefault();
253253
e.stopPropagation();
@@ -261,7 +261,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
261261
{videoRoomsEnabled && (
262262
<IconizedContextMenuOption
263263
label={_t("action|new_video_room")}
264-
iconClassName="mx_RoomList_iconNewVideoRoom"
264+
iconClassName="mx_LegacyRoomList_iconNewVideoRoom"
265265
onClick={(e) => {
266266
e.preventDefault();
267267
e.stopPropagation();
@@ -279,7 +279,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
279279
)}
280280
<IconizedContextMenuOption
281281
label={_t("action|add_existing_room")}
282-
iconClassName="mx_RoomList_iconAddExistingRoom"
282+
iconClassName="mx_LegacyRoomList_iconAddExistingRoom"
283283
onClick={(e) => {
284284
e.preventDefault();
285285
e.stopPropagation();
@@ -300,7 +300,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
300300
<>
301301
<IconizedContextMenuOption
302302
label={_t("action|new_room")}
303-
iconClassName="mx_RoomList_iconNewRoom"
303+
iconClassName="mx_LegacyRoomList_iconNewRoom"
304304
onClick={(e) => {
305305
e.preventDefault();
306306
e.stopPropagation();
@@ -312,7 +312,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
312312
{videoRoomsEnabled && (
313313
<IconizedContextMenuOption
314314
label={_t("action|new_video_room")}
315-
iconClassName="mx_RoomList_iconNewVideoRoom"
315+
iconClassName="mx_LegacyRoomList_iconNewVideoRoom"
316316
onClick={(e) => {
317317
e.preventDefault();
318318
e.stopPropagation();
@@ -333,7 +333,7 @@ const UntaggedAuxButton: React.FC<IAuxButtonProps> = ({ tabIndex }) => {
333333
{showExploreRooms ? (
334334
<IconizedContextMenuOption
335335
label={_t("action|explore_public_rooms")}
336-
iconClassName="mx_RoomList_iconExplore"
336+
iconClassName="mx_LegacyRoomList_iconExplore"
337337
onClick={(e) => {
338338
e.preventDefault();
339339
e.stopPropagation();
@@ -678,7 +678,7 @@ export default class LegacyRoomList extends React.PureComponent<IProps, IState>
678678
}
679679
onKeyDownHandler(ev);
680680
}}
681-
className="mx_RoomList"
681+
className="mx_LegacyRoomList"
682682
role="tree"
683683
aria-label={_t("common|rooms")}
684684
ref={this.treeRef}

src/components/views/rooms/RoomListPanel/RoomListHeaderView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export function RoomListHeaderView(): JSX.Element {
3838
align="center"
3939
data-testid="room-list-header"
4040
>
41-
<Flex align="center" gap="var(--cpd-space-1x)">
42-
<h1>{vm.title}</h1>
41+
<Flex className="mx_RoomListHeaderView_title" align="center" gap="var(--cpd-space-1x)">
42+
<h1 title={vm.title}>{vm.title}</h1>
4343
{vm.displaySpaceMenu && <SpaceMenu vm={vm} />}
4444
</Flex>
4545
{vm.displayComposeMenu && <ComposeMenu vm={vm} />}

0 commit comments

Comments
 (0)