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

Commit

Permalink
Fix MAB overlapping or overflowing in bubbles layout and threads regr…
Browse files Browse the repository at this point in the history
…essions (#7569)

* Fix MAB overlapping or overflowing in bubbles layout

* Fix bubbles in threads timestamps positioning regression
  • Loading branch information
t3chguy authored Jan 19, 2022
1 parent 1d45921 commit b50060b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
34 changes: 23 additions & 11 deletions res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ limitations under the License.
left: -34px;
}

.mx_MessageActionBar {
right: -100px; // to make sure it doesn't overflow to the left or cover sender profile
}

--backgroundColor: $eventbubble-others-bg;
}

Expand Down Expand Up @@ -194,7 +198,10 @@ limitations under the License.
border-top-left-radius: var(--cornerRadius);
border-top-right-radius: var(--cornerRadius);

> a { // timestamp wrapper anchor
// the selector here is quite weird because timestamps can appear linked & unlinked and in different places
// in the DOM depending on the specific rendering context
> a, // timestamp wrapper anchor
.mx_MessageActionBar + .mx_MessageTimestamp {
position: absolute;
padding: 4px 8px;
bottom: 0;
Expand Down Expand Up @@ -223,7 +230,8 @@ limitations under the License.
}

&.mx_EventTile_sticker {
> a {
> a, // timestamp wrapper anchor
.mx_MessageActionBar + .mx_MessageTimestamp {
// position timestamps for stickers to the right of the un-bubbled sticker
right: unset;
left: 100%;
Expand Down Expand Up @@ -338,7 +346,8 @@ limitations under the License.
.mx_EventTile_reply {
max-width: 90%;
padding: 0;
> a {
> a, // timestamp wrapper anchor
.mx_MessageActionBar + .mx_MessageTimestamp {
display: none !important;
}
}
Expand Down Expand Up @@ -439,14 +448,17 @@ limitations under the License.
margin-left: 9px;
}

.mx_EventTile_line > a { // timestamp wrapper anchor
right: auto;
left: -77px;
bottom: unset;
align-self: center;

.mx_MessageTimestamp {
vertical-align: middle;
.mx_EventTile_line {
> a, // timestamp wrapper anchor
.mx_MessageActionBar + .mx_MessageTimestamp {
right: auto;
left: -77px;
bottom: unset;
align-self: center;

.mx_MessageTimestamp, &.mx_MessageTimestamp {
vertical-align: middle;
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,12 @@ $left-gutter: 64px;
margin: 0 -13px 0 0; // align with normal messages
}
}

&[data-self=false] {
.mx_MessageActionBar {
right: -60px; // smaller overlap, otherwise it'll overflow on the right
}
}
}

.mx_EventTile[data-layout=group] {
Expand Down

0 comments on commit b50060b

Please sign in to comment.