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

Commit

Permalink
[Backport staging] Fix replies to emotes not showing as inline (#9708)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
RiotRobot and t3chguy committed Dec 5, 2022
1 parent cb2e1e9 commit f3432e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions res/css/views/rooms/_ReplyTile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ limitations under the License.
}

> a {
display: flex;
flex-direction: column;
display: grid;
grid-template:
"sender" auto
"message" auto
/ auto;
text-decoration: none;
color: $secondary-content;
transition: color ease 0.15s;
Expand Down Expand Up @@ -58,6 +61,7 @@ limitations under the License.

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

Expand Down Expand Up @@ -102,7 +106,16 @@ limitations under the License.
padding-top: 0;
}

&.mx_ReplyTile_inline > a {
/* Render replies to emotes inline with the sender avatar */
grid-template:
"sender message" auto
/ max-content auto;
gap: 4px; // increase spacing
}

.mx_ReplyTile_sender {
grid-area: sender;
display: flex;
align-items: center;
gap: 4px;
Expand Down
1 change: 1 addition & 0 deletions src/components/views/rooms/ReplyTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
}

const classes = classNames("mx_ReplyTile", {
mx_ReplyTile_inline: msgType === MsgType.Emote,
mx_ReplyTile_info: isInfoMessage && !mxEvent.isRedacted(),
mx_ReplyTile_audio: msgType === MsgType.Audio,
mx_ReplyTile_video: msgType === MsgType.Video,
Expand Down

0 comments on commit f3432e9

Please sign in to comment.