Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't render a bubble around emotes in bubble layout #7573

Merged
merged 4 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ limitations under the License.
width: fit-content;
}

.mx_EventTile_content {
margin-right: 0;
}

&.mx_EventTile_continuation {
margin-top: 2px;
}
Expand Down Expand Up @@ -408,6 +412,18 @@ limitations under the License.

.mx_EventTile.mx_EventTile_noBubble[data-layout=bubble] {
--backgroundColor: transparent;

.mx_EventTile_line {
padding-right: 60px; // align with bubbles text
font-style: italic;

> a { // timestamp anchor wrapper
align-self: center;
bottom: unset;
top: unset;
font-style: normal; // undo italic above
}
}
}

.mx_EventTile.mx_EventTile_bubbleContainer[data-layout=bubble],
Expand Down
3 changes: 2 additions & 1 deletion src/utils/EventUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
// Info messages are basically information about commands processed on a room
let isBubbleMessage = (
eventType.startsWith("m.key.verification") ||
(eventType === EventType.RoomMessage && msgtype && msgtype.startsWith("m.key.verification")) ||
(eventType === EventType.RoomMessage && msgtype?.startsWith("m.key.verification")) ||
(eventType === EventType.RoomCreate) ||
(eventType === EventType.RoomEncryption) ||
(tileHandler === "messages.MJitsiWidgetEvent")
Expand All @@ -232,6 +232,7 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
);
// Some non-info messages want to be rendered in the appropriate bubble column but without the bubble background
const noBubbleEvent = (
(eventType === EventType.RoomMessage && msgtype === MsgType.Emote) ||
M_POLL_START.matches(eventType) ||
LOCATION_EVENT_TYPE.matches(eventType) ||
(
Expand Down