Skip to content

Commit 8cb2754

Browse files
committed
Merge tag 'v3.51.0' into sc
* Live location share - focus on user location on list item click ([\matrix-org#9051](matrix-org#9051)). Contributed by @kerryarchibald. * Live location sharing - don't trigger unread counts for beacon location events ([\matrix-org#9071](matrix-org#9071)). Contributed by @kerryarchibald. * Support for sending voice messages as replies and in threads ([\matrix-org#9097](matrix-org#9097)). Fixes element-hq/element-web#22031. * Add `Reply in thread` button to the right-click message context-menu ([\matrix-org#9004](matrix-org#9004)). Fixes element-hq/element-web#22745. * Starred_Messages_Feature_Contd_II/Outreachy ([\matrix-org#9086](matrix-org#9086)). * Use "frequently used emojis" for autocompletion in composer ([\matrix-org#8998](matrix-org#8998)). Fixes element-hq/element-web#18978. Contributed by @grimhilt. * Improve clickability of view source event toggle button ([\matrix-org#9068](matrix-org#9068)). Fixes element-hq/element-web#21856. Contributed by @luixxiul. * Improve clickability of "collapse" link button on bubble layout ([\matrix-org#9037](matrix-org#9037)). Fixes element-hq/element-web#22864. Contributed by @luixxiul. * Starred_Messages_Feature/Outreachy ([\matrix-org#8842](matrix-org#8842)). * Implement Use Case Selection screen ([\matrix-org#8984](matrix-org#8984)). Contributed by @justjanne. * Live location share - handle insufficient permissions in location sharing ([\matrix-org#9047](matrix-org#9047)). Contributed by @kerryarchibald. * Improve _FilePanel.scss ([\matrix-org#9031](matrix-org#9031)). Contributed by @luixxiul. * Improve spotlight accessibility by adding context menus ([\matrix-org#8907](matrix-org#8907)). Fixes element-hq/element-web#20875 and element-hq/element-web#22675. Contributed by @justjanne. * Replace mask-images with svg components in MessageActionBar ([\matrix-org#9088](matrix-org#9088)). Fixes element-hq/element-web#22912. Contributed by @kerryarchibald. * Unbreak in-app permalink tooltips ([\matrix-org#9087](matrix-org#9087)). Fixes element-hq/element-web#22874. * Show a back button when viewing a space member ([\matrix-org#9095](matrix-org#9095)). Fixes element-hq/element-web#22898. * Align the right edge of info tile lines with normal ones on IRC layout ([\matrix-org#9058](matrix-org#9058)). Fixes element-hq/element-web#22871. Contributed by @luixxiul. * Prevent email verification from overriding existing sessions ([\matrix-org#9075](matrix-org#9075)). Fixes element-hq/element-web#22881. Contributed by @justjanne. * Fix wrong buttons being used when exploring public rooms ([\matrix-org#9062](matrix-org#9062)). Fixes element-hq/element-web#22862. * Re-add padding to generic event list summary on IRC layout ([\matrix-org#9063](matrix-org#9063)). Fixes element-hq/element-web#22869. Contributed by @luixxiul. * Joining federated rooms via the spotlight search should no longer cause a "No known servers" error. ([\matrix-org#9055](matrix-org#9055)). Fixes element-hq/element-web#22845. Contributed by @Half-Shot.
2 parents 3608ff2 + a97ac30 commit 8cb2754

File tree

543 files changed

+8465
-4676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

543 files changed

+8465
-4676
lines changed

.stylelintrc.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
"extends": "stylelint-config-standard",
3+
customSyntax: require('postcss-scss'),
34
"plugins": [
45
"stylelint-scss",
56
],
@@ -27,6 +28,25 @@ module.exports = {
2728
// rather than a CI thing. Shorthand selectors are harder to detect when searching for a
2829
// class name. This regex is trying to *allow* anything except `&words`, such as `&::before`,
2930
// `&.mx_Class`, etc.
30-
"selector-nested-pattern": "^((&[ :.\\\[,])|([^&]))"
31-
}
31+
"selector-nested-pattern": "^((&[ :.\\\[,])|([^&]))",
32+
"declaration-colon-space-after": "always-single-line",
33+
// Disable some defaults
34+
"selector-class-pattern": null,
35+
"custom-property-pattern": null,
36+
"selector-id-pattern": null,
37+
"keyframes-name-pattern": null,
38+
"string-quotes": null,
39+
"alpha-value-notation": null,
40+
"color-function-notation": null,
41+
"selector-not-notation": null,
42+
"import-notation": null,
43+
"value-keyword-case": null,
44+
"declaration-block-no-redundant-longhand-properties": null,
45+
"shorthand-property-no-redundant-values": null,
46+
"property-no-vendor-prefix": null,
47+
"value-no-vendor-prefix": null,
48+
"selector-no-vendor-prefix": null,
49+
"media-feature-name-no-vendor-prefix": null,
50+
"number-max-precision": null,
51+
},
3252
}

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
Changes in [3.51.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.51.0) (2022-08-02)
2+
=====================================================================================================
3+
4+
## ✨ Features
5+
* Live location share - focus on user location on list item click ([\#9051](https://github.com/matrix-org/matrix-react-sdk/pull/9051)). Contributed by @kerryarchibald.
6+
* Live location sharing - don't trigger unread counts for beacon location events ([\#9071](https://github.com/matrix-org/matrix-react-sdk/pull/9071)). Contributed by @kerryarchibald.
7+
* Support for sending voice messages as replies and in threads ([\#9097](https://github.com/matrix-org/matrix-react-sdk/pull/9097)). Fixes vector-im/element-web#22031.
8+
* Add `Reply in thread` button to the right-click message context-menu ([\#9004](https://github.com/matrix-org/matrix-react-sdk/pull/9004)). Fixes vector-im/element-web#22745.
9+
* Starred_Messages_Feature_Contd_II/Outreachy ([\#9086](https://github.com/matrix-org/matrix-react-sdk/pull/9086)).
10+
* Use "frequently used emojis" for autocompletion in composer ([\#8998](https://github.com/matrix-org/matrix-react-sdk/pull/8998)). Fixes vector-im/element-web#18978. Contributed by @grimhilt.
11+
* Improve clickability of view source event toggle button ([\#9068](https://github.com/matrix-org/matrix-react-sdk/pull/9068)). Fixes vector-im/element-web#21856. Contributed by @luixxiul.
12+
* Improve clickability of "collapse" link button on bubble layout ([\#9037](https://github.com/matrix-org/matrix-react-sdk/pull/9037)). Fixes vector-im/element-web#22864. Contributed by @luixxiul.
13+
* Starred_Messages_Feature/Outreachy ([\#8842](https://github.com/matrix-org/matrix-react-sdk/pull/8842)).
14+
* Implement Use Case Selection screen ([\#8984](https://github.com/matrix-org/matrix-react-sdk/pull/8984)). Contributed by @justjanne.
15+
* Live location share - handle insufficient permissions in location sharing ([\#9047](https://github.com/matrix-org/matrix-react-sdk/pull/9047)). Contributed by @kerryarchibald.
16+
* Improve _FilePanel.scss ([\#9031](https://github.com/matrix-org/matrix-react-sdk/pull/9031)). Contributed by @luixxiul.
17+
* Improve spotlight accessibility by adding context menus ([\#8907](https://github.com/matrix-org/matrix-react-sdk/pull/8907)). Fixes vector-im/element-web#20875 and vector-im/element-web#22675. Contributed by @justjanne.
18+
19+
## 🐛 Bug Fixes
20+
* Replace mask-images with svg components in MessageActionBar ([\#9088](https://github.com/matrix-org/matrix-react-sdk/pull/9088)). Fixes vector-im/element-web#22912. Contributed by @kerryarchibald.
21+
* Unbreak in-app permalink tooltips ([\#9087](https://github.com/matrix-org/matrix-react-sdk/pull/9087)). Fixes vector-im/element-web#22874.
22+
* Show a back button when viewing a space member ([\#9095](https://github.com/matrix-org/matrix-react-sdk/pull/9095)). Fixes vector-im/element-web#22898.
23+
* Align the right edge of info tile lines with normal ones on IRC layout ([\#9058](https://github.com/matrix-org/matrix-react-sdk/pull/9058)). Fixes vector-im/element-web#22871. Contributed by @luixxiul.
24+
* Prevent email verification from overriding existing sessions ([\#9075](https://github.com/matrix-org/matrix-react-sdk/pull/9075)). Fixes vector-im/element-web#22881. Contributed by @justjanne.
25+
* Fix wrong buttons being used when exploring public rooms ([\#9062](https://github.com/matrix-org/matrix-react-sdk/pull/9062)). Fixes vector-im/element-web#22862.
26+
* Re-add padding to generic event list summary on IRC layout ([\#9063](https://github.com/matrix-org/matrix-react-sdk/pull/9063)). Fixes vector-im/element-web#22869. Contributed by @luixxiul.
27+
* Joining federated rooms via the spotlight search should no longer cause a "No known servers" error. ([\#9055](https://github.com/matrix-org/matrix-react-sdk/pull/9055)). Fixes vector-im/element-web#22845. Contributed by @Half-Shot.
28+
129
Changes in [3.49.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.49.0) (2022-07-26)
230
=====================================================================================================
331

cypress/e2e/1-register/register.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ describe("Registration", () => {
6565
cy.startMeasuring("from-submit-to-home");
6666
cy.get(".mx_InteractiveAuthEntryComponents_termsSubmit").click();
6767

68+
cy.get(".mx_UseCaseSelection_skip .mx_AccessibleButton").click();
69+
6870
cy.url().should('contain', '/#/home');
6971
cy.stopMeasuring("from-submit-to-home");
7072

cypress/e2e/12-spotlight/spotlight.spec.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ describe("Spotlight", () => {
139139
const room2Name = "Lounge";
140140
let room2Id: string;
141141

142+
const room3Name = "Public";
143+
let room3Id: string;
144+
142145
beforeEach(() => {
143146
cy.startSynapse("default").then(data => {
144147
synapse = data;
@@ -163,6 +166,19 @@ describe("Spotlight", () => {
163166
room2Id = _room2Id;
164167
bot2.invite(room2Id, bot1.getUserId());
165168
});
169+
bot2.createRoom({
170+
name: room3Name,
171+
visibility: Visibility.Public, initial_state: [{
172+
type: "m.room.history_visibility",
173+
state_key: "",
174+
content: {
175+
history_visibility: "world_readable",
176+
},
177+
}],
178+
}).then(({ room_id: _room3Id }) => {
179+
room3Id = _room3Id;
180+
bot2.invite(room3Id, bot1.getUserId());
181+
});
166182
}),
167183
).then(() =>
168184
cy.get('.mx_RoomSublist_skeletonUI').should('not.exist'),
@@ -212,6 +228,7 @@ describe("Spotlight", () => {
212228
cy.spotlightSearch().clear().type(room1Name);
213229
cy.spotlightResults().should("have.length", 1);
214230
cy.spotlightResults().eq(0).should("contain", room1Name);
231+
cy.spotlightResults().eq(0).should("contain", "View");
215232
cy.spotlightResults().eq(0).click();
216233
cy.url().should("contain", room1Id);
217234
}).then(() => {
@@ -225,6 +242,7 @@ describe("Spotlight", () => {
225242
cy.spotlightSearch().clear().type(room2Name);
226243
cy.spotlightResults().should("have.length", 1);
227244
cy.spotlightResults().eq(0).should("contain", room2Name);
245+
cy.spotlightResults().eq(0).should("contain", "Join");
228246
cy.spotlightResults().eq(0).click();
229247
cy.url().should("contain", room2Id);
230248
}).then(() => {
@@ -233,6 +251,21 @@ describe("Spotlight", () => {
233251
});
234252
});
235253

254+
it("should find unknown public world readable rooms", () => {
255+
cy.openSpotlightDialog().within(() => {
256+
cy.spotlightFilter(Filter.PublicRooms);
257+
cy.spotlightSearch().clear().type(room3Name);
258+
cy.spotlightResults().should("have.length", 1);
259+
cy.spotlightResults().eq(0).should("contain", room3Name);
260+
cy.spotlightResults().eq(0).should("contain", "View");
261+
cy.spotlightResults().eq(0).click();
262+
cy.url().should("contain", room3Id);
263+
}).then(() => {
264+
cy.get(".mx_RoomPreviewBar_actions .mx_AccessibleButton").click();
265+
cy.roomHeaderName().should("contain", room3Name);
266+
});
267+
});
268+
236269
// TODO: We currently can’t test finding rooms on other homeservers/other protocols
237270
// We obviously don’t have federation or bridges in cypress tests
238271
/*
@@ -357,7 +390,7 @@ describe("Spotlight", () => {
357390
cy.spotlightSearch().clear().type("b");
358391
// our debouncing logic only starts the search after a short timeout,
359392
// so we wait a few milliseconds.
360-
cy.wait(300);
393+
cy.wait(1000);
361394
cy.get(".mx_Spinner").should("not.exist").then(() => {
362395
cy.spotlightResults().should("have.length", 2).then(() => {
363396
cy.spotlightResults().eq(0)

cypress/e2e/14-timeline/timeline.spec.ts

Lines changed: 136 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type { EventType } from "matrix-js-sdk/src/@types/event";
2323
import type { MatrixClient } from "matrix-js-sdk/src/client";
2424
import { SynapseInstance } from "../../plugins/synapsedocker";
2525
import { SettingLevel } from "../../../src/settings/SettingLevel";
26+
import { Layout } from "../../../src/settings/enums/Layout";
2627
import Chainable = Cypress.Chainable;
2728

2829
// The avatar size used in the timeline
@@ -70,26 +71,27 @@ describe("Timeline", () => {
7071
let oldAvatarUrl: string;
7172
let newAvatarUrl: string;
7273

74+
beforeEach(() => {
75+
cy.startSynapse("default").then(data => {
76+
synapse = data;
77+
cy.initTestUser(synapse, OLD_NAME).then(() =>
78+
cy.window({ log: false }).then(() => {
79+
cy.createRoom({ name: ROOM_NAME }).then(_room1Id => {
80+
roomId = _room1Id;
81+
});
82+
}),
83+
);
84+
});
85+
});
86+
7387
describe("useOnlyCurrentProfiles", () => {
7488
beforeEach(() => {
75-
cy.startSynapse("default").then(data => {
76-
synapse = data;
77-
cy.initTestUser(synapse, OLD_NAME).then(() =>
78-
cy.window({ log: false }).then(() => {
79-
cy.createRoom({ name: ROOM_NAME }).then(_room1Id => {
80-
roomId = _room1Id;
81-
});
82-
}),
83-
).then(() => {
84-
cy.uploadContent(OLD_AVATAR).then((url) => {
85-
oldAvatarUrl = url;
86-
cy.setAvatarUrl(url);
87-
});
88-
}).then(() => {
89-
cy.uploadContent(NEW_AVATAR).then((url) => {
90-
newAvatarUrl = url;
91-
});
92-
});
89+
cy.uploadContent(OLD_AVATAR).then((url) => {
90+
oldAvatarUrl = url;
91+
cy.setAvatarUrl(url);
92+
});
93+
cy.uploadContent(NEW_AVATAR).then((url) => {
94+
newAvatarUrl = url;
9395
});
9496
});
9597

@@ -142,4 +144,120 @@ describe("Timeline", () => {
142144
});
143145
});
144146
});
147+
148+
describe("message displaying", () => {
149+
it("should create and configure a room on IRC layout", () => {
150+
cy.visit("/#/room/" + roomId);
151+
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
152+
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary[data-layout=irc] " +
153+
".mx_GenericEventListSummary_summary", "created and configured the room.");
154+
cy.percySnapshot("Configured room on IRC layout");
155+
});
156+
157+
it("should add inline start margin to an event line on IRC layout", () => {
158+
cy.visit("/#/room/" + roomId);
159+
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
160+
161+
// Wait until configuration is finished
162+
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary " +
163+
".mx_GenericEventListSummary_summary", "created and configured the room.");
164+
165+
// Click "expand" link button
166+
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").click();
167+
168+
// Check the event line has margin instead of inset property
169+
// cf. _EventTile.pcss
170+
// --EventTile_irc_line_info-margin-inline-start
171+
// = calc(var(--name-width) + 10px + var(--icon-width))
172+
// = 80 + 10 + 14 = 104px
173+
cy.get(".mx_EventTile[data-layout=irc].mx_EventTile_info:first-of-type .mx_EventTile_line")
174+
.should('have.css', "margin-inline-start", "104px")
175+
.should('have.css', "inset-inline-start", "0px");
176+
177+
// Exclude timestamp from snapshot
178+
const percyCSS = ".mx_RoomView_body .mx_EventTile_info .mx_MessageTimestamp "
179+
+ "{ visibility: hidden !important; }";
180+
cy.percySnapshot("Event line with inline start margin on IRC layout", { percyCSS });
181+
});
182+
183+
it("should click top left of view source event toggle", () => {
184+
sendEvent(roomId);
185+
cy.visit("/#/room/" + roomId);
186+
cy.setSettingValue("showHiddenEventsInTimeline", null, SettingLevel.DEVICE, true);
187+
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary " +
188+
".mx_GenericEventListSummary_summary", "created and configured the room.");
189+
190+
// Edit message
191+
cy.contains(".mx_RoomView_body .mx_EventTile .mx_EventTile_line", "Message").within(() => {
192+
cy.get('[aria-label="Edit"]').click({ force: true }); // Cypress has no ability to hover
193+
cy.get(".mx_BasicMessageComposer_input").type("Edit{enter}");
194+
});
195+
cy.contains(".mx_RoomView_body .mx_EventTile[data-scroll-tokens]", "MessageEdit");
196+
197+
// Click top left of the event toggle, which should not be covered by MessageActionBar's safe area
198+
cy.get(".mx_EventTile .mx_ViewSourceEvent").realHover()
199+
.get(".mx_EventTile .mx_ViewSourceEvent .mx_ViewSourceEvent_toggle").click('topLeft', { force: false });
200+
201+
// Make sure the expand toggle worked
202+
cy.get(".mx_EventTile .mx_ViewSourceEvent_expanded .mx_ViewSourceEvent_toggle").should("be.visible");
203+
});
204+
205+
it("should click 'collapse' link button on the first hovered info event line on bubble layout", () => {
206+
cy.visit("/#/room/" + roomId);
207+
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.Bubble);
208+
cy.contains(".mx_RoomView_body .mx_GenericEventListSummary[data-layout=bubble] " +
209+
".mx_GenericEventListSummary_summary", "created and configured the room.");
210+
211+
// Click "expand" link button
212+
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").click();
213+
214+
// Click "collapse" link button on the first hovered info event line
215+
cy.get(".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type").realHover()
216+
.get(".mx_GenericEventListSummary_toggle[aria-expanded=true]").click({ force: false });
217+
218+
// Make sure "collapse" link button worked
219+
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]");
220+
});
221+
});
222+
223+
describe("message sending", () => {
224+
const MESSAGE = "Hello world";
225+
const viewRoomSendMessageAndSetupReply = () => {
226+
// View room
227+
cy.visit("/#/room/" + roomId);
228+
229+
// Send a message
230+
cy.getComposer().type(`${MESSAGE}{enter}`);
231+
232+
// Reply to the message
233+
cy.get(".mx_RoomView_body .mx_EventTile").contains(".mx_EventTile_line", "Hello world").within(() => {
234+
cy.get('[aria-label="Reply"]').click({ force: true }); // Cypress has no ability to hover
235+
});
236+
};
237+
238+
it("can reply with a text message", () => {
239+
const reply = "Reply";
240+
viewRoomSendMessageAndSetupReply();
241+
242+
cy.getComposer().type(`${reply}{enter}`);
243+
244+
cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line").find(".mx_ReplyTile .mx_MTextBody")
245+
.should("contain", MESSAGE);
246+
cy.get(".mx_RoomView_body .mx_EventTile > .mx_EventTile_line > .mx_MTextBody").contains(reply)
247+
.should("have.length", 1);
248+
});
249+
250+
it("can reply with a voice message", () => {
251+
viewRoomSendMessageAndSetupReply();
252+
253+
cy.openMessageComposerOptions().find(`[aria-label="Voice Message"]`).click();
254+
cy.wait(3000);
255+
cy.getComposer().find(".mx_MessageComposer_sendMessage").click();
256+
257+
cy.get(".mx_RoomView_body .mx_EventTile .mx_EventTile_line").find(".mx_ReplyTile .mx_MTextBody")
258+
.should("contain", MESSAGE);
259+
cy.get(".mx_RoomView_body .mx_EventTile > .mx_EventTile_line > .mx_MVoiceMessageBody")
260+
.should("have.length", 1);
261+
});
262+
});
145263
});

0 commit comments

Comments
 (0)