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

Commit c86040b

Browse files
authored
Fix timestamp's position on the chat panel with a maximized widget in IRC layout (#8464)
Fix avatar's position on the chat panel with a maximized widget in IRC layout Fix timestamp's position on Message Edits history modal window Also: - Align DisambiguatedProfile with reactions row and thread summary with a variable - Add width property as default - Use the global variable on _IRCLayout.scss Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 34471ba commit c86040b

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

res/css/views/dialogs/_MessageEditHistoryDialog.scss

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ limitations under the License.
5555
text-decoration: underline;
5656
}
5757

58+
.mx_EventTile {
59+
.mx_MessageTimestamp {
60+
position: absolute;
61+
}
62+
}
63+
5864
.mx_EventTile_line, .mx_EventTile_content {
5965
margin-right: 0px;
6066
}

res/css/views/messages/_MessageTimestamp.scss

+1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ limitations under the License.
1818
color: $event-timestamp-color;
1919
font-size: $font-10px;
2020
font-variant-numeric: tabular-nums;
21+
width: $MessageTimestamp_width;
2122
}

res/css/views/right_panel/_TimelineCard.scss

+13-5
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,39 @@ limitations under the License.
5252
}
5353

5454
.mx_EventTile:not([data-layout="bubble"]) {
55+
$left-gutter: 36px;
56+
5557
.mx_EventTile_line {
56-
padding-left: 36px;
57-
padding-right: 36px;
58+
padding-inline-start: $left-gutter;
59+
padding-inline-end: 36px;
60+
}
61+
62+
.mx_DisambiguatedProfile,
63+
.mx_ReactionsRow,
64+
.mx_ThreadSummary {
65+
margin-inline-start: $left-gutter;
5866
}
5967

6068
.mx_ReactionsRow {
6169
padding: 0;
6270

6371
// See margin setting of ReactionsRow on _EventTile.scss
64-
margin-left: 36px;
6572
margin-right: 8px;
6673
}
6774

6875
.mx_ThreadSummary {
69-
margin-left: 36px;
7076
margin-right: 0;
7177
max-width: min(calc(100% - 36px), 600px);
7278
}
7379

7480
.mx_EventTile_avatar {
81+
position: absolute; // for IRC layout
7582
top: 12px;
7683
left: -3px;
7784
}
7885

7986
.mx_MessageTimestamp {
87+
position: absolute; // for modern layout and IRC layout
8088
right: -4px;
8189
left: auto;
8290
}
@@ -87,7 +95,7 @@ limitations under the License.
8795

8896
&.mx_EventTile_info {
8997
.mx_EventTile_line {
90-
padding-left: 36px;
98+
padding-left: $left-gutter;
9199
}
92100

93101
.mx_EventTile_avatar {

res/css/views/rooms/_GroupLayout.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ $left-gutter: 64px;
3030
}
3131

3232
.mx_MessageTimestamp {
33-
position: absolute;
34-
width: $MessageTimestamp_width;
33+
position: absolute; // for modern layout
3534
}
3635

3736
.mx_EventTile_line, .mx_EventTile_reply {

res/css/views/rooms/_IRCLayout.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ limitations under the License.
1515
*/
1616

1717
$icon-width: 14px;
18-
$timestamp-width: 45px;
1918
$right-padding: 5px;
2019
$irc-line-height: $font-18px;
2120

@@ -28,7 +27,7 @@ $irc-line-height: $font-18px;
2827
// timestamps are links which shouldn't be underlined
2928
> a {
3029
text-decoration: none;
31-
min-width: 45px;
30+
min-width: $MessageTimestamp_width;
3231
}
3332

3433
display: flex;
@@ -85,7 +84,6 @@ $irc-line-height: $font-18px;
8584

8685
.mx_MessageTimestamp {
8786
font-size: $font-10px;
88-
width: $timestamp-width;
8987
text-align: right;
9088
}
9189

@@ -141,7 +139,7 @@ $irc-line-height: $font-18px;
141139

142140
.mx_GenericEventListSummary {
143141
> .mx_EventTile_line {
144-
padding-left: calc(var(--name-width) + $icon-width + $timestamp-width + 3 * $right-padding); // 15 px of padding
142+
padding-left: calc(var(--name-width) + $icon-width + $MessageTimestamp_width + 3 * $right-padding); // 15 px of padding
145143
}
146144

147145
.mx_GenericEventListSummary_avatars {

0 commit comments

Comments
 (0)