Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit e500964

Browse files
committed
Merge branch 'develop' into florianduros/fix/new-line-rte
2 parents f6b5532 + 4d2b27a commit e500964

File tree

14 files changed

+421
-58
lines changed

14 files changed

+421
-58
lines changed

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
Changes in [3.64.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.64.0) (2023-01-18)
2+
=====================================================================================================
3+
4+
## ✨ Features
5+
* Switch threads on for everyone ([\#9879](https://github.com/matrix-org/matrix-react-sdk/pull/9879)).
6+
* Make threads use new UTD UI ([\#9876](https://github.com/matrix-org/matrix-react-sdk/pull/9876)). Fixes vector-im/element-web#24060.
7+
* Add edit and remove actions to link in RTE ([\#9864](https://github.com/matrix-org/matrix-react-sdk/pull/9864)).
8+
* Remove extensible events v1 experimental rendering ([\#9881](https://github.com/matrix-org/matrix-react-sdk/pull/9881)).
9+
* Make create poll dialog scale better (PSG-929) ([\#9873](https://github.com/matrix-org/matrix-react-sdk/pull/9873)). Fixes vector-im/element-web#21855.
10+
* Change RTE mode icons ([\#9861](https://github.com/matrix-org/matrix-react-sdk/pull/9861)).
11+
* Device manager - prune client information events after remote sign out ([\#9874](https://github.com/matrix-org/matrix-react-sdk/pull/9874)).
12+
* Check connection before starting broadcast ([\#9857](https://github.com/matrix-org/matrix-react-sdk/pull/9857)).
13+
* Enable sent receipt for poll start events (PSG-962) ([\#9870](https://github.com/matrix-org/matrix-react-sdk/pull/9870)).
14+
* Change clear notifications to have more readable copy ([\#9867](https://github.com/matrix-org/matrix-react-sdk/pull/9867)).
15+
* Combine search results when the query is present in multiple successive messages ([\#9855](https://github.com/matrix-org/matrix-react-sdk/pull/9855)). Fixes vector-im/element-web#3977. Contributed by @grimhilt.
16+
* Disable bubbles for broadcasts ([\#9860](https://github.com/matrix-org/matrix-react-sdk/pull/9860)). Fixes vector-im/element-web#24140.
17+
* Enable reactions and replies for broadcasts ([\#9856](https://github.com/matrix-org/matrix-react-sdk/pull/9856)). Fixes vector-im/element-web#24042.
18+
* Improve switching between rich and plain editing modes ([\#9776](https://github.com/matrix-org/matrix-react-sdk/pull/9776)).
19+
* Redesign the picture-in-picture window ([\#9800](https://github.com/matrix-org/matrix-react-sdk/pull/9800)). Fixes vector-im/element-web#23980.
20+
* User on-boarding tasks now appear in a static order. ([\#9799](https://github.com/matrix-org/matrix-react-sdk/pull/9799)). Contributed by @GoodGuyMarco.
21+
* Device manager - contextual menus ([\#9832](https://github.com/matrix-org/matrix-react-sdk/pull/9832)).
22+
* If listening a non-live broadcast and changing the room, the broadcast will be paused ([\#9825](https://github.com/matrix-org/matrix-react-sdk/pull/9825)). Fixes vector-im/element-web#24078.
23+
* Consider own broadcasts from other device as a playback ([\#9821](https://github.com/matrix-org/matrix-react-sdk/pull/9821)). Fixes vector-im/element-web#24068.
24+
* Add link creation to rich text editor ([\#9775](https://github.com/matrix-org/matrix-react-sdk/pull/9775)).
25+
* Add mark as read option in room setting ([\#9798](https://github.com/matrix-org/matrix-react-sdk/pull/9798)). Fixes vector-im/element-web#24053.
26+
* Device manager - current device design and copy tweaks ([\#9801](https://github.com/matrix-org/matrix-react-sdk/pull/9801)).
27+
* Unify notifications panel event design ([\#9754](https://github.com/matrix-org/matrix-react-sdk/pull/9754)).
28+
* Add actions for integration manager to send and read certain events ([\#9740](https://github.com/matrix-org/matrix-react-sdk/pull/9740)).
29+
* Device manager - design tweaks ([\#9768](https://github.com/matrix-org/matrix-react-sdk/pull/9768)).
30+
* Change room list sorting to activity and unread first by default ([\#9773](https://github.com/matrix-org/matrix-react-sdk/pull/9773)). Fixes vector-im/element-web#24014.
31+
* Add a config flag to enable the rust crypto-sdk ([\#9759](https://github.com/matrix-org/matrix-react-sdk/pull/9759)).
32+
* Improve decryption error UI by consolidating error messages and providing instructions when possible ([\#9544](https://github.com/matrix-org/matrix-react-sdk/pull/9544)).
33+
* Honor font settings in Element Call ([\#9751](https://github.com/matrix-org/matrix-react-sdk/pull/9751)). Fixes vector-im/element-web#23661.
34+
* Device manager - use deleteAccountData to prune device manager client information events ([\#9734](https://github.com/matrix-org/matrix-react-sdk/pull/9734)).
35+
36+
## 🐛 Bug Fixes
37+
* Display rooms & threads as unread (bold) if threads have unread messages. ([\#9763](https://github.com/matrix-org/matrix-react-sdk/pull/9763)). Fixes vector-im/element-web#23907.
38+
* Don't prefer STIXGeneral over the default font ([\#9711](https://github.com/matrix-org/matrix-react-sdk/pull/9711)). Fixes vector-im/element-web#23899.
39+
* Use the same avatar colour when creating 1:1 DM rooms ([\#9850](https://github.com/matrix-org/matrix-react-sdk/pull/9850)). Fixes vector-im/element-web#23476.
40+
* Fix space lock icon size ([\#9854](https://github.com/matrix-org/matrix-react-sdk/pull/9854)). Fixes vector-im/element-web#24128.
41+
* Make calls automatically disconnect if the widget disappears ([\#9862](https://github.com/matrix-org/matrix-react-sdk/pull/9862)). Fixes vector-im/element-web#23664.
42+
* Fix emoji in RTE editing ([\#9827](https://github.com/matrix-org/matrix-react-sdk/pull/9827)).
43+
* Fix export with attachments on formats txt and json ([\#9851](https://github.com/matrix-org/matrix-react-sdk/pull/9851)). Fixes vector-im/element-web#24130. Contributed by @grimhilt.
44+
* Fixed empty `Content-Type` for encrypted uploads ([\#9848](https://github.com/matrix-org/matrix-react-sdk/pull/9848)). Contributed by @K3das.
45+
* Fix sign-in instead link on password reset page ([\#9820](https://github.com/matrix-org/matrix-react-sdk/pull/9820)). Fixes vector-im/element-web#24087.
46+
* The seekbar now initially shows the current position ([\#9796](https://github.com/matrix-org/matrix-react-sdk/pull/9796)). Fixes vector-im/element-web#24051.
47+
* Fix: Editing a poll will silently change it to a closed poll ([\#9809](https://github.com/matrix-org/matrix-react-sdk/pull/9809)). Fixes vector-im/element-web#23176.
48+
* Make call tiles look less broken in the right panel ([\#9808](https://github.com/matrix-org/matrix-react-sdk/pull/9808)). Fixes vector-im/element-web#23716.
49+
* Prevent unnecessary m.direct updates ([\#9805](https://github.com/matrix-org/matrix-react-sdk/pull/9805)). Fixes vector-im/element-web#24059.
50+
* Fix checkForPreJoinUISI for thread roots ([\#9803](https://github.com/matrix-org/matrix-react-sdk/pull/9803)). Fixes vector-im/element-web#24054.
51+
* Snap in PiP widget when content changed ([\#9797](https://github.com/matrix-org/matrix-react-sdk/pull/9797)). Fixes vector-im/element-web#24050.
52+
* Load RTE components only when RTE labs is enabled ([\#9804](https://github.com/matrix-org/matrix-react-sdk/pull/9804)).
53+
* Ensure that events are correctly updated when they are edited. ([\#9789](https://github.com/matrix-org/matrix-react-sdk/pull/9789)).
54+
* When stopping a broadcast also stop the playback ([\#9795](https://github.com/matrix-org/matrix-react-sdk/pull/9795)). Fixes vector-im/element-web#24052.
55+
* Prevent to start two broadcasts at the same time ([\#9744](https://github.com/matrix-org/matrix-react-sdk/pull/9744)). Fixes vector-im/element-web#23973.
56+
* Correctly handle limited sync responses by resetting the thread timeline ([\#3056](https://github.com/matrix-org/matrix-js-sdk/pull/3056)). Fixes vector-im/element-web#23952.
57+
* Fix failure to start in firefox private browser ([\#3058](https://github.com/matrix-org/matrix-js-sdk/pull/3058)). Fixes vector-im/element-web#24216.
58+
159
Changes in [3.63.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.63.0) (2022-12-21)
260
=====================================================================================================
361

cypress/e2e/composer/composer.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,21 @@ describe("Composer", () => {
126126
cy.contains(".mx_EventTile_body", "my message 1");
127127
});
128128

129+
it("sends only one message when you press Enter multiple times", () => {
130+
// Type a message
131+
cy.get("div[contenteditable=true]").type("my message 0");
132+
// It has not been sent yet
133+
cy.contains(".mx_EventTile_body", "my message 0").should("not.exist");
134+
135+
// Click send
136+
cy.get("div[contenteditable=true]").type("{enter}");
137+
cy.get("div[contenteditable=true]").type("{enter}");
138+
cy.get("div[contenteditable=true]").type("{enter}");
139+
// It has been sent
140+
cy.contains(".mx_EventTile_body", "my message 0");
141+
cy.get(".mx_EventTile_body").should("have.length", 1);
142+
});
143+
129144
it("can write formatted text", () => {
130145
cy.get("div[contenteditable=true]").type("my {ctrl+b}bold{ctrl+b} message");
131146
cy.get('div[aria-label="Send message"]').click();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.63.0",
3+
"version": "3.64.0",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {

res/css/views/rooms/_EventTile.pcss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ $left-gutter: 64px;
884884

885885
&::before {
886886
inset: 0;
887+
pointer-events: none; /* ensures the title for the sender name can be correctly displayed */
887888
}
888889

889890
/* Display notification dot */
@@ -927,8 +928,14 @@ $left-gutter: 64px;
927928
inset: $padding auto auto $padding;
928929
}
929930

931+
.mx_EventTile_details {
932+
overflow: hidden;
933+
}
934+
930935
.mx_DisambiguatedProfile {
931936
display: inline-flex;
937+
align-items: center;
938+
flex: 1;
932939

933940
.mx_DisambiguatedProfile_displayName,
934941
.mx_DisambiguatedProfile_mxid {
@@ -979,7 +986,9 @@ $left-gutter: 64px;
979986

980987
.mx_MessageTimestamp {
981988
font-size: $font-12px;
982-
max-width: var(--MessageTimestamp-max-width);
989+
width: unset; /* Cancel the default width */
990+
overflow: hidden; /* ensure correct overflow behavior */
991+
text-overflow: ellipsis;
983992
position: initial;
984993
margin-left: auto; /* to ensure it's end-aligned even if it's the only element of its parent */
985994
}

src/components/views/messages/DisambiguatedProfile.tsx

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright 2021 Šimon Brandner <[email protected]>
3-
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
Copyright 2022-2023 The Matrix.org Foundation C.I.C.
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ import React from "react";
1919
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
2020
import classNames from "classnames";
2121

22+
import { _t } from "../../../languageHandler";
2223
import { getUserNameColorClass } from "../../../utils/FormattingUtils";
2324
import UserIdentifier from "../../../customisations/UserIdentifier";
2425

@@ -28,35 +29,44 @@ interface IProps {
2829
onClick?(): void;
2930
colored?: boolean;
3031
emphasizeDisplayName?: boolean;
32+
withTooltip?: boolean;
3133
}
3234

3335
export default class DisambiguatedProfile extends React.Component<IProps> {
3436
public render(): JSX.Element {
35-
const { fallbackName, member, colored, emphasizeDisplayName, onClick } = this.props;
37+
const { fallbackName, member, colored, emphasizeDisplayName, withTooltip, onClick } = this.props;
3638
const rawDisplayName = member?.rawDisplayName || fallbackName;
3739
const mxid = member?.userId;
3840

39-
let colorClass;
41+
let colorClass: string | undefined;
4042
if (colored) {
4143
colorClass = getUserNameColorClass(fallbackName);
4244
}
4345

4446
let mxidElement;
45-
if (member?.disambiguate && mxid) {
46-
mxidElement = (
47-
<span className="mx_DisambiguatedProfile_mxid">
48-
{UserIdentifier.getDisplayUserIdentifier(mxid, { withDisplayName: true, roomId: member.roomId })}
49-
</span>
50-
);
47+
let title: string | undefined;
48+
49+
if (mxid) {
50+
const identifier =
51+
UserIdentifier.getDisplayUserIdentifier?.(mxid, {
52+
withDisplayName: true,
53+
roomId: member.roomId,
54+
}) ?? mxid;
55+
if (member?.disambiguate) {
56+
mxidElement = <span className="mx_DisambiguatedProfile_mxid">{identifier}</span>;
57+
}
58+
title = _t("%(displayName)s (%(matrixId)s)", {
59+
displayName: rawDisplayName,
60+
matrixId: identifier,
61+
});
5162
}
5263

53-
const displayNameClasses = classNames({
64+
const displayNameClasses = classNames(colorClass, {
5465
mx_DisambiguatedProfile_displayName: emphasizeDisplayName,
55-
[colorClass]: true,
5666
});
5767

5868
return (
59-
<div className="mx_DisambiguatedProfile" onClick={onClick}>
69+
<div className="mx_DisambiguatedProfile" title={withTooltip ? title : undefined} onClick={onClick}>
6070
<span className={displayNameClasses} dir="auto">
6171
{rawDisplayName}
6272
</span>

src/components/views/messages/SenderProfile.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
Copyright 2023 The Matrix.org Foundation C.I.C.
23
Copyright 2015, 2016 OpenMarket Ltd
34
45
Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,9 +25,10 @@ import { useRoomMemberProfile } from "../../../hooks/room/useRoomMemberProfile";
2425
interface IProps {
2526
mxEvent: MatrixEvent;
2627
onClick?(): void;
28+
withTooltip?: boolean;
2729
}
2830

29-
export default function SenderProfile({ mxEvent, onClick }: IProps): JSX.Element {
31+
export default function SenderProfile({ mxEvent, onClick, withTooltip }: IProps): JSX.Element {
3032
const member = useRoomMemberProfile({
3133
userId: mxEvent.getSender(),
3234
member: mxEvent.sender,
@@ -39,6 +41,7 @@ export default function SenderProfile({ mxEvent, onClick }: IProps): JSX.Element
3941
member={member}
4042
colored={true}
4143
emphasizeDisplayName={true}
44+
withTooltip={withTooltip}
4245
/>
4346
) : null;
4447
}

src/components/views/rooms/EventTile.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2015 - 2022 The Matrix.org Foundation C.I.C.
2+
Copyright 2015 - 2023 The Matrix.org Foundation C.I.C.
33
Copyright 2019 Michael Telatynski <[email protected]>
44
55
Licensed under the Apache License, Version 2.0 (the "License");
@@ -1091,6 +1091,8 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
10911091
this.context.timelineRenderingType === TimelineRenderingType.Thread
10921092
) {
10931093
sender = <SenderProfile onClick={this.onSenderProfileClick} mxEvent={this.props.mxEvent} />;
1094+
} else if (this.context.timelineRenderingType === TimelineRenderingType.ThreadsList) {
1095+
sender = <SenderProfile mxEvent={this.props.mxEvent} withTooltip />;
10941096
} else {
10951097
sender = <SenderProfile mxEvent={this.props.mxEvent} />;
10961098
}

src/components/views/rooms/MessageComposer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,16 @@ export class MessageComposer extends React.Component<IProps, IState> {
334334

335335
if (this.state.isWysiwygLabEnabled) {
336336
const { permalinkCreator, relation, replyToEvent } = this.props;
337-
await sendMessage(this.state.composerContent, this.state.isRichTextEnabled, {
337+
const composerContent = this.state.composerContent;
338+
this.setState({ composerContent: "", initialComposerContent: "" });
339+
await sendMessage(composerContent, this.state.isRichTextEnabled, {
338340
mxClient: this.props.mxClient,
339341
roomContext: this.context,
340342
permalinkCreator,
341343
relation,
342344
replyToEvent,
343345
});
344346
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
345-
this.setState({ composerContent: "", initialComposerContent: "" });
346347
}
347348
};
348349

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,7 @@
23162316
"Last month": "Last month",
23172317
"The beginning of the room": "The beginning of the room",
23182318
"Jump to date": "Jump to date",
2319+
"%(displayName)s (%(matrixId)s)": "%(displayName)s (%(matrixId)s)",
23192320
"Downloading": "Downloading",
23202321
"Decrypting": "Decrypting",
23212322
"Download": "Download",

src/stores/widgets/WidgetLayoutStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
414414
widgets.forEach((w, i) => {
415415
localLayout[w.id] = {
416416
container: container,
417-
width: widths[i],
417+
width: widths?.[i],
418418
index: i,
419419
height: height,
420420
};
@@ -437,7 +437,7 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
437437
widgets.forEach((w, i) => {
438438
localLayout[w.id] = {
439439
container: container,
440-
width: widths[i],
440+
width: widths?.[i],
441441
index: i,
442442
height: height,
443443
};

0 commit comments

Comments
 (0)