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

Commit 11cb481

Browse files
authored
Fix other user's displayName being wrapped on the bubble message layout (#8456)
1 parent 6825b43 commit 11cb481

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

res/css/views/messages/_DisambiguatedProfile.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ limitations under the License.
1818
.mx_DisambiguatedProfile {
1919
overflow: hidden;
2020
text-overflow: ellipsis;
21+
white-space: nowrap;
22+
cursor: pointer;
2123

2224
.mx_DisambiguatedProfile_displayName {
2325
font-weight: 600;
26+
margin-inline-end: 0;
2427
}
2528

2629
.mx_DisambiguatedProfile_mxid {
2730
font-weight: 600;
2831
font-size: 1.1rem;
29-
margin-left: 5px;
32+
margin-inline-start: 5px;
3033
opacity: 0.5; // Match mx_TextualEvent
3134
color: $primary-content;
3235
}

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@ limitations under the License.
117117
line-height: $font-18px;
118118
}
119119

120+
// other users profile on bubble layout
121+
> .mx_DisambiguatedProfile {
122+
white-space: normal; // display mxid
123+
124+
.mx_DisambiguatedProfile_displayName {
125+
white-space: nowrap; // truncate long display names
126+
margin-inline-end: 5px;
127+
128+
// For RTL displayName
129+
unicode-bidi: embed;
130+
direction: ltr;
131+
}
132+
133+
.mx_DisambiguatedProfile_mxid {
134+
margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble]
135+
}
136+
}
137+
120138
// inside mx_RoomView_MessageList, outside of mx_ReplyTile
121139
// (on the main panel and the chat panel with a maximized widget)
122140
> .mx_DisambiguatedProfile,

res/css/views/rooms/_EventTile.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
138138
color: $primary-content;
139139
font-size: $font-14px;
140140
display: inline-block;
141-
/* anti-zalgo, with overflow hidden */
142-
overflow: hidden;
143141
padding-bottom: 0px;
144142
padding-top: 0px;
145143
margin: 0px;
146-
/* the next three lines, along with overflow hidden, truncate long display names */
147-
white-space: nowrap;
148-
text-overflow: ellipsis;
149144
max-width: calc(100% - $left-gutter);
150145
}
151146

@@ -442,10 +437,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
442437
// on ELS we need the margin to allow interaction with the expand/collapse button which is normally in the RR gutter
443438
}
444439

445-
.mx_DisambiguatedProfile {
446-
cursor: pointer;
447-
}
448-
449440
.mx_EventTile_bubbleContainer {
450441
display: grid;
451442
grid-template-columns: 1fr 100px;

res/css/views/rooms/_ReplyTile.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,5 @@ limitations under the License.
111111
display: inline-block; // anti-zalgo, with overflow hidden
112112
padding: 0;
113113
margin: 0;
114-
115-
// truncate long display names
116-
overflow: hidden;
117-
white-space: nowrap;
118-
text-overflow: ellipsis;
119114
}
120115
}

0 commit comments

Comments
 (0)