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

Commit e6c5c95

Browse files
t3chguygithub-actions[bot]
authored andcommitted
Fix replies to emotes not showing as inline (#9707)
(cherry picked from commit 8576601)
1 parent cb2e1e9 commit e6c5c95

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

res/css/views/rooms/_ReplyTile.pcss

+15-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ limitations under the License.
2828
}
2929

3030
> a {
31-
display: flex;
32-
flex-direction: column;
31+
display: grid;
32+
grid-template:
33+
"sender" auto
34+
"message" auto
35+
/ auto;
3336
text-decoration: none;
3437
color: $secondary-content;
3538
transition: color ease 0.15s;
@@ -58,6 +61,7 @@ limitations under the License.
5861

5962
/* We do reply size limiting with CSS to avoid duplicating the TextualBody component. */
6063
.mx_EventTile_content {
64+
grid-area: message;
6165
$reply-lines: 2;
6266
$line-height: $font-18px;
6367

@@ -102,7 +106,16 @@ limitations under the License.
102106
padding-top: 0;
103107
}
104108

109+
&.mx_ReplyTile_inline > a {
110+
/* Render replies to emotes inline with the sender avatar */
111+
grid-template:
112+
"sender message" auto
113+
/ max-content auto;
114+
gap: 4px; // increase spacing
115+
}
116+
105117
.mx_ReplyTile_sender {
118+
grid-area: sender;
106119
display: flex;
107120
align-items: center;
108121
gap: 4px;

src/components/views/rooms/ReplyTile.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
123123
}
124124

125125
const classes = classNames("mx_ReplyTile", {
126+
mx_ReplyTile_inline: msgType === MsgType.Emote,
126127
mx_ReplyTile_info: isInfoMessage && !mxEvent.isRedacted(),
127128
mx_ReplyTile_audio: msgType === MsgType.Audio,
128129
mx_ReplyTile_video: msgType === MsgType.Video,

0 commit comments

Comments
 (0)