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

Commit a177db3

Browse files
authored
Merge branch 'develop' into prbranch
2 parents 8b38839 + 64f762d commit a177db3

File tree

59 files changed

+418
-257
lines changed

Some content is hidden

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

59 files changed

+418
-257
lines changed

.github/workflows/i18n_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: "Get modified files"
1313
id: changed_files
1414
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot' && github.event.pull_request.user.login != 't3chguy'
15-
uses: tj-actions/changed-files@17f3fec1edef0c3916d59cbcee1585fcd457e456 # v38
15+
uses: tj-actions/changed-files@1c26215f3fbd51eba03bc199e5cbabdfc3584ce3 # v38
1616
with:
1717
files: |
1818
src/i18n/strings/*

cypress/e2e/read-receipts/high-level.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ describe("Read receipts", () => {
452452
// Given a thread exists
453453
goTo(room1);
454454
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
455-
assertUnread(room2, 1);
455+
assertUnread(room2, 2);
456456
goTo(room2);
457457

458458
openThread("Msg1");
@@ -462,7 +462,7 @@ describe("Read receipts", () => {
462462
// Given a thread exists
463463
goTo(room1);
464464
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1"), threadedOff("Msg1", "Resp2")]);
465-
assertUnread(room2, 2); // (Sanity)
465+
assertUnread(room2, 3); // (Sanity)
466466

467467
// When I read the main timeline
468468
goTo(room2);
@@ -481,7 +481,7 @@ describe("Read receipts", () => {
481481
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1"), "Msg2", threadedOff("Msg2", "Resp2")]);
482482
assertUnread(room2, 4);
483483
goTo(room2);
484-
assertUnread(room2, 4);
484+
assertUnread(room2, 2);
485485

486486
openThread("Msg1");
487487
assertUnread(room2, 1);
@@ -562,7 +562,7 @@ describe("Read receipts", () => {
562562
// Given a thread exists
563563
goTo(room1);
564564
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1"), threadedOff("Msg1", "Resp2")]);
565-
assertUnread(room2, 2); // (Sanity)
565+
assertUnread(room2, 3); // (Sanity)
566566

567567
// When I read the main timeline
568568
goTo(room2);
@@ -609,7 +609,7 @@ describe("Read receipts", () => {
609609
goTo(room2);
610610

611611
// Then room does appear unread
612-
assertUnread(room2, 2);
612+
assertUnread(room2, 1);
613613
assertUnreadThread("Msg1");
614614
});
615615
it.skip("Reading a thread root within the thread view marks it as read in the main timeline", () => {});
@@ -701,7 +701,7 @@ describe("Read receipts", () => {
701701
goTo(room1);
702702

703703
receiveMessages(room2, ["Msg1", replyTo("Msg1", "Reply1")]);
704-
assertUnread(room2, 1);
704+
assertUnread(room2, 2);
705705

706706
goTo(room2);
707707
assertRead(room2);
@@ -718,7 +718,7 @@ describe("Read receipts", () => {
718718
goTo(room1);
719719

720720
receiveMessages(room2, ["Msg1", replyTo("Msg1", "Reply1")]);
721-
assertUnread(room2, 1);
721+
assertUnread(room2, 2);
722722
markAsRead(room2);
723723

724724
// When an edit appears in the room
@@ -769,7 +769,7 @@ describe("Read receipts", () => {
769769
it("An edit of a threaded message makes the room unread", () => {
770770
goTo(room1);
771771
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
772-
assertUnread(room2, 1);
772+
assertUnread(room2, 2);
773773

774774
goTo(room2);
775775
openThread("Msg1");
@@ -782,7 +782,7 @@ describe("Read receipts", () => {
782782
it("Reading an edit of a threaded message makes the room read", () => {
783783
goTo(room1);
784784
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
785-
assertUnread(room2, 1);
785+
assertUnread(room2, 2);
786786

787787
goTo(room2);
788788
openThread("Msg1");
@@ -799,21 +799,21 @@ describe("Read receipts", () => {
799799
it("Marking a room as read after an edit in a thread makes it read", () => {
800800
goTo(room1);
801801
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1"), editOf("Resp1", "Edit1")]);
802-
assertUnread(room2, 2);
802+
assertUnread(room2, 3); // TODO: the edit counts as a message!
803803

804804
markAsRead(room2);
805805
assertRead(room2);
806806
});
807807
it.skip("Editing a thread message after marking as read makes the room unread", () => {
808808
goTo(room1);
809809
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
810-
assertUnread(room2, 1);
810+
assertUnread(room2, 2);
811811

812812
markAsRead(room2);
813813
assertRead(room2);
814814

815815
receiveMessages(room2, [editOf("Resp1", "Edit1")]);
816-
assertUnread(room2, 1);
816+
assertUnread(room2, 1); // TODO: should this edit make us unread?
817817
});
818818
it("A room with an edited threaded message is still unread after restart", () => {
819819
goTo(room1);
@@ -840,7 +840,7 @@ describe("Read receipts", () => {
840840
it("An edit of a thread root makes the room unread", () => {
841841
goTo(room1);
842842
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
843-
assertUnread(room2, 1);
843+
assertUnread(room2, 2);
844844

845845
goTo(room2);
846846
openThread("Msg1");
@@ -983,7 +983,7 @@ describe("Read receipts", () => {
983983
goTo(room1);
984984
assertRead(room2);
985985
receiveMessages(room2, ["Msg1", "Msg2"]);
986-
assertUnread(room2, 1);
986+
assertUnread(room2, 2);
987987

988988
// When I read the main timeline
989989
goTo(room2);

cypress/e2e/widgets/stickers.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ function expectTimelineSticker(roomId: string) {
8686
// Make sure it's in the right room
8787
cy.get(".mx_EventTile_sticker > a").should("have.attr", "href").and("include", `/${roomId}/`);
8888

89-
// Make sure the image points at the sticker image
90-
cy.get<HTMLImageElement>(`img[alt="${STICKER_NAME}"]`)
91-
.should("have.attr", "src")
92-
.and("match", /thumbnail\/somewhere\?/);
89+
// Make sure the image points at the sticker image. We will briefly show it
90+
// using the thumbnail URL, but as soon as that fails, we will switch to the
91+
// download URL.
92+
cy.get<HTMLImageElement>(`img[alt="${STICKER_NAME}"][src*="download/somewhere"]`).should("exist");
9393
}
9494

9595
describe("Stickers", () => {

cypress/support/views.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ declare global {
2323
namespace Cypress {
2424
interface Chainable {
2525
/**
26-
* Opens the given room by name. The room must be visible in the room list.
27-
* It uses a start-anchored regexp to accommodate for room tiles for unread rooms containing additional
28-
* context in their aria labels, e.g. "Room name 3 unread messages."
26+
* Opens the given room by name. The room must be visible in the
27+
* room list, but the room list may be folded horizontally, and the
28+
* room may contain unread messages.
2929
*
30-
* @param name The room name to find and click on/open.
30+
* @param name The exact room name to find and click on/open.
3131
*/
3232
viewRoomByName(name: string): Chainable<JQuery<HTMLElement>>;
3333

@@ -65,10 +65,20 @@ declare global {
6565
}
6666

6767
Cypress.Commands.add("viewRoomByName", (name: string): Chainable<JQuery<HTMLElement>> => {
68-
return cy
69-
.findByRole("treeitem", { name: new RegExp("^" + name) })
70-
.should("have.class", "mx_RoomTile")
71-
.click();
68+
// We look for the room inside the room list, which is a tree called Rooms.
69+
//
70+
// There are 3 cases:
71+
// - the room list is folded:
72+
// then the aria-label on the room tile is the name (with nothing extra)
73+
// - the room list is unfolder and the room has messages:
74+
// then the aria-label contains the unread count, but the title of the
75+
// div inside the titleContainer equals the room name
76+
// - the room list is unfolded and the room has no messages:
77+
// then the aria-label is the name and so is the title of a div
78+
//
79+
// So by matching EITHER title=name OR aria-label=name we find this exact
80+
// room in all three cases.
81+
return cy.findByRole("tree", { name: "Rooms" }).find(`[title="${name}"],[aria-label="${name}"]`).first().click();
7282
});
7383

7484
Cypress.Commands.add("viewRoomById", (id: string): void => {

res/css/views/avatars/_BaseAvatar.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ limitations under the License.
1919
/* Stick the default room avatar colour, so it doesn't cause a false diff on the screenshot */
2020
.mx_BaseAvatar {
2121
background-color: var(--percy-color-avatar) !important;
22+
color: white !important;
2223
}
2324
}

res/css/views/avatars/_DecoratedRoomAvatar.pcss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
.mx_ExtraTile {
1919
position: relative;
2020
contain: content;
21-
line-height: 1;
21+
line-height: 0;
2222

2323
&.mx_DecoratedRoomAvatar_cutout .mx_BaseAvatar {
2424
mask-image: url("$(res)/img/element-icons/roomlist/decorated-avatar-mask.svg");
@@ -30,10 +30,9 @@ limitations under the License.
3030
.mx_DecoratedRoomAvatar_icon {
3131
position: absolute;
3232
/* the following percentage based sizings are to match the scalable svg mask for the cutout */
33-
bottom: 0;
34-
right: 0;
35-
transform: translate(-25%, -70%);
36-
width: 25%;
33+
bottom: 6.25%; // 2px for a 32x32 avatar
34+
right: 6.25%;
35+
width: 25%; // 8px for a 32x32 avatar
3736
height: 25%;
3837
border-radius: 50%;
3938
}

res/css/views/elements/_MiniAvatarUploader.pcss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ limitations under the License.
4343
border-radius: 50%;
4444
z-index: 1;
4545

46+
line-height: 0;
47+
4648
.mx_MiniAvatarUploader_cameraIcon {
4749
height: 100%;
4850
width: 100%;

res/themes/legacy-light/css/_legacy-light.pcss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ $call-background: #15191e;
186186
$call-primary-content: #ffffff;
187187
$call-light-quaternary-content: #c1c6cd;
188188

189-
$username-variant1-color: var(--cpd-color-blue-900);
190-
$username-variant2-color: var(--cpd-color-fuchsia-900);
191-
$username-variant3-color: var(--cpd-color-green-900);
192-
$username-variant4-color: var(--cpd-color-pink-900);
193-
$username-variant5-color: var(--cpd-color-orange-900);
194-
$username-variant6-color: var(--cpd-color-cyan-900);
195-
$username-variant7-color: var(--cpd-color-purple-900);
196-
$username-variant8-color: var(--cpd-color-lime-900);
189+
$username-variant1-color: var(--cpd-color-blue-1200);
190+
$username-variant2-color: var(--cpd-color-fuchsia-1200);
191+
$username-variant3-color: var(--cpd-color-green-1200);
192+
$username-variant4-color: var(--cpd-color-pink-1200);
193+
$username-variant5-color: var(--cpd-color-orange-1200);
194+
$username-variant6-color: var(--cpd-color-cyan-1200);
195+
$username-variant7-color: var(--cpd-color-purple-1200);
196+
$username-variant8-color: var(--cpd-color-lime-1200);
197197

198198
/**
199199
* Creating a `semantic` color scale. This will not be needed with the new

res/themes/light-high-contrast/css/_light-high-contrast.pcss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ $tertiary-content: var(--cpd-color-gray-800);
88
$quaternary-content: var(--cpd-color-gray-600);
99
$quinary-content: var(--cpd-color-gray-400);
1010

11-
$username-variant1-color: var(--cpd-color-blue-900);
12-
$username-variant2-color: var(--cpd-color-fuchsia-900);
13-
$username-variant3-color: var(--cpd-color-green-900);
14-
$username-variant4-color: var(--cpd-color-pink-900);
15-
$username-variant5-color: var(--cpd-color-orange-900);
16-
$username-variant6-color: var(--cpd-color-cyan-900);
17-
$username-variant7-color: var(--cpd-color-purple-900);
18-
$username-variant8-color: var(--cpd-color-lime-900);
11+
$username-variant1-color: var(--cpd-color-blue-1200);
12+
$username-variant2-color: var(--cpd-color-fuchsia-1200);
13+
$username-variant3-color: var(--cpd-color-green-1200);
14+
$username-variant4-color: var(--cpd-color-pink-1200);
15+
$username-variant5-color: var(--cpd-color-orange-1200);
16+
$username-variant6-color: var(--cpd-color-cyan-1200);
17+
$username-variant7-color: var(--cpd-color-purple-1200);
18+
$username-variant8-color: var(--cpd-color-lime-1200);
1919

2020
$accent-alt: $links;
2121
$input-border-color: $secondary-content;

res/themes/light/css/_light.pcss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ $alert: var(--cpd-color-text-critical-primary);
3636
$links: var(--cpd-color-text-link-external);
3737
$link-external: var(--cpd-color-text-link-external);
3838

39-
$username-variant1-color: var(--cpd-color-blue-900);
40-
$username-variant2-color: var(--cpd-color-fuchsia-900);
41-
$username-variant3-color: var(--cpd-color-green-900);
42-
$username-variant4-color: var(--cpd-color-pink-900);
43-
$username-variant5-color: var(--cpd-color-orange-900);
44-
$username-variant6-color: var(--cpd-color-cyan-900);
45-
$username-variant7-color: var(--cpd-color-purple-900);
46-
$username-variant8-color: var(--cpd-color-lime-900);
39+
$username-variant1-color: var(--cpd-color-blue-1200);
40+
$username-variant2-color: var(--cpd-color-fuchsia-1200);
41+
$username-variant3-color: var(--cpd-color-green-1200);
42+
$username-variant4-color: var(--cpd-color-pink-1200);
43+
$username-variant5-color: var(--cpd-color-orange-1200);
44+
$username-variant6-color: var(--cpd-color-cyan-1200);
45+
$username-variant7-color: var(--cpd-color-purple-1200);
46+
$username-variant8-color: var(--cpd-color-lime-1200);
4747
/* ******************** */
4848

4949
/**

0 commit comments

Comments
 (0)