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

Commit 66073bd

Browse files
authored
Merge branch 'develop' into fix-spacing-SetIntegrationManager
2 parents 4c4d2de + ef68650 commit 66073bd

File tree

35 files changed

+912
-173
lines changed

35 files changed

+912
-173
lines changed

cypress/e2e/regression-tests/pills-click-in-app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe("Pills", () => {
6767

6868
// go back to the message room and try to click on the pill text, as a user would
6969
cy.viewRoomByName(messageRoom);
70-
cy.get(".mx_EventTile_body .mx_Pill .mx_Pill_linkText")
70+
cy.get(".mx_EventTile_body .mx_Pill .mx_Pill_text")
7171
.should("have.css", "pointer-events", "none")
7272
.click({ force: true }); // force is to ensure we bypass pointer-events
7373
cy.url().should("contain", localUrl);

cypress/e2e/timeline/timeline.spec.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,23 @@ describe("Timeline", () => {
161161
"created and configured the room.",
162162
).should("exist");
163163

164-
// Check room name line-height is reset
165-
cy.get(".mx_IRCLayout .mx_NewRoomIntro h2").should("have.css", "line-height", "normal");
164+
cy.get(".mx_IRCLayout").within(() => {
165+
// Check room name line-height is reset
166+
cy.get(".mx_NewRoomIntro h2").should("have.css", "line-height", "normal");
167+
168+
// Check the profile resizer's place
169+
// See: _IRCLayout
170+
// --RoomView_MessageList-padding = 18px (See: _RoomView.pcss)
171+
// --MessageTimestamp-width = $MessageTimestamp_width = 46px (See: _common.pcss)
172+
// --icon-width = 14px
173+
// --right-padding = 5px
174+
// --name-width = 80px
175+
// --resizer-width = 15px
176+
// --resizer-a11y = 3px
177+
// 18px + 46px + 14px + 5px + 80px + 5px - 15px - 3px
178+
// = 150px
179+
cy.get(".mx_ProfileResizer").should("have.css", "inset-inline-start", "150px");
180+
});
166181

167182
cy.get(".mx_MainSplit").percySnapshotElement("Configured room on IRC layout");
168183
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"matrix-encrypt-attachment": "^1.0.3",
9898
"matrix-events-sdk": "0.0.1",
9999
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
100-
"matrix-widget-api": "^1.2.0",
100+
"matrix-widget-api": "^1.3.1",
101101
"minimist": "^1.2.5",
102102
"opus-recorder": "^8.0.3",
103103
"pako": "^2.0.3",

res/css/_common.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ $timeline-image-border-radius: 8px;
4242

4343
--transition-short: 0.1s;
4444
--transition-standard: 0.3s;
45+
--MessageTimestamp-width: $MessageTimestamp_width;
4546
}
4647

4748
@media (prefers-reduced-motion) {

res/css/structures/_LeftPanel.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ $roomListCollapsedWidth: 68px;
185185
}
186186
}
187187

188+
.mx_RoomListHeader:first-child {
189+
margin-top: 12px;
190+
}
191+
188192
.mx_LeftPanel_roomListWrapper {
189193
/* Make the y-scrollbar more responsive */
190194
padding-right: 2px;

res/css/structures/_RoomView.pcss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
:root {
18+
--RoomView_MessageList-padding: 18px; /* TODO: use a variable */
19+
}
20+
1721
.mx_RoomView_wrapper {
1822
display: flex;
1923
flex-direction: column;
@@ -176,7 +180,7 @@ limitations under the License.
176180

177181
.mx_RoomView_MessageList {
178182
list-style-type: none;
179-
padding: 18px;
183+
padding: var(--RoomView_MessageList-padding); /* mx_ProfileResizer depends on this value */
180184
margin: 0;
181185
/* needed as min-height is set to clientHeight in ScrollPanel
182186
to prevent shrinking when WhoIsTypingTile is hidden */

res/css/views/elements/_Pill.pcss

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ limitations under the License.
2929
color: $accent-fg-color !important; /* To override .markdown-body */
3030
background-color: $pill-bg-color !important; /* To override .markdown-body */
3131

32+
> * {
33+
pointer-events: none;
34+
}
35+
3236
&.mx_UserPill_me,
3337
&.mx_AtRoomPill {
3438
background-color: $alert !important; /* To override .markdown-body */
@@ -55,12 +59,17 @@ limitations under the License.
5559
min-width: $font-16px; /* ensure the avatar is not compressed */
5660
}
5761

58-
.mx_Pill_linkText {
59-
white-space: nowrap; /* enforce the pill text to be a single line */
62+
&.mx_EventPill .mx_BaseAvatar {
63+
/* Event pill avatars are inside the text. */
64+
margin-inline-start: 0.2em;
65+
margin-inline-end: 0.2em;
66+
}
67+
68+
.mx_Pill_text {
69+
min-width: 0;
6070
overflow: hidden;
6171
text-overflow: ellipsis;
62-
63-
pointer-events: none; /* ensure clicks on the pills go through the anchor */
72+
white-space: nowrap;
6473
}
6574

6675
a& {
@@ -69,4 +78,20 @@ limitations under the License.
6978
overflow: hidden;
7079
text-decoration: none !important; /* To override .markdown-body */
7180
}
81+
82+
.mx_Pill_LinkIcon {
83+
background-color: $link-external;
84+
box-sizing: border-box;
85+
color: $background;
86+
height: 16px;
87+
padding: 1px;
88+
width: 16px;
89+
}
90+
91+
.mx_Pill_UserIcon {
92+
box-sizing: border-box;
93+
color: $secondary-content;
94+
height: 16px;
95+
width: 16px;
96+
}
7297
}

res/css/views/rooms/_IRCLayout.pcss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,23 @@ $irc-line-height: $font-18px;
217217
}
218218

219219
.mx_ProfileResizer {
220+
--resizer-width: 15px;
221+
--resizer-a11y: 3px; /* Magic number, to be replaced with something more proper from the perspective of a11y */
222+
220223
position: absolute;
221224
height: 100%;
222-
width: 15px;
223-
left: calc(80px + var(--name-width));
225+
width: var(--resizer-width);
224226
cursor: col-resize;
225227
z-index: 100;
228+
229+
/* Add width of every element rendered before the resizer (including padding for the avatar and the display
230+
name), subtracting the resizer width itself to prevent the resizer from overlapping the text and moving
231+
the resizer a bit to the left to make it easier to avoid selecting the resizer when highlighting text.
232+
Please note that MessageTimestamp does not have inline padding. */
233+
inset-inline-start: calc(
234+
var(--RoomView_MessageList-padding) + var(--MessageTimestamp-width) + var(--icon-width) +
235+
var(--right-padding) + var(--name-width) + var(--right-padding) - var(--resizer-width) -
236+
var(--resizer-a11y)
237+
);
226238
}
227239
}

res/img/compound/user.svg

Lines changed: 7 additions & 0 deletions
Loading

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ $room-icon-unread-color: #fff;
9090
$accent: #0dbd8b;
9191
$alert: #ff5b55;
9292
$links: #0086e6;
93+
$link-external: #0467dd;
9394
$primary-content: $primary-fg-color;
9495
$secondary-content: $secondary-fg-color;
9596
$tertiary-content: $tertiary-fg-color;

0 commit comments

Comments
 (0)