Fix position of the message action bar on left side bubbles (#8398)

* Fix position of the message action bar on data-self=false bubble

- Fix position of the bar on GenericEventListSummary as well
- Override default value `right: 8px` of MessageActionBar

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use variables for MessageActionBar

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Set the right property to [data-self=true]

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove space for "React" and "Reply" buttons inside MessageActionBar on the left side bubble inside ThreadView

This commit removes space reserved for those buttons on deleted or "Unable to decrypt" message bubble inside ThreadView.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
t3chguy/dedup-icons-17oct
Suguru Hirahara 2022-05-16 15:44:05 +00:00 committed by GitHub
parent fcc4d62ede
commit 6f851108be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 11 deletions

View File

@ -16,11 +16,14 @@ limitations under the License.
*/ */
.mx_MessageActionBar { .mx_MessageActionBar {
--MessageActionBar-size-button: 28px;
--MessageActionBar-size-box: 32px; // 28px + 2px (margin) * 2
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
height: 32px; height: var(--MessageActionBar-size-box);
line-height: $font-24px; line-height: $font-24px;
border-radius: 8px; border-radius: 8px;
background: $background; background: $background;
@ -64,8 +67,8 @@ limitations under the License.
} }
.mx_MessageActionBar_maskButton { .mx_MessageActionBar_maskButton {
width: 28px; width: var(--MessageActionBar-size-button);
height: 28px; height: var(--MessageActionBar-size-button);
&:disabled, &:disabled,
&[disabled] { &[disabled] {

View File

@ -130,7 +130,6 @@ limitations under the License.
.mx_MessageActionBar { .mx_MessageActionBar {
top: -28px; top: -28px;
right: 0;
z-index: 9; // above the avatar z-index: 9; // above the avatar
} }
@ -171,7 +170,8 @@ limitations under the License.
} }
.mx_MessageActionBar { .mx_MessageActionBar {
right: -100px; // to make sure it doesn't overflow to the left or cover sender profile inset-inline-start: calc(100% - var(--MessageActionBar-size-box));
right: initial; // Reset the default value
} }
.mx_ThreadSummary { .mx_ThreadSummary {
@ -225,6 +225,7 @@ limitations under the License.
order: -1; order: -1;
} }
} }
.mx_EventTile_avatar { .mx_EventTile_avatar {
top: -19px; // height of the sender block top: -19px; // height of the sender block
right: -35px; right: -35px;
@ -234,6 +235,10 @@ limitations under the License.
background: $eventbubble-self-bg; background: $eventbubble-self-bg;
} }
.mx_MessageActionBar {
inset-inline-end: 0;
}
--backgroundColor: $eventbubble-self-bg; --backgroundColor: $eventbubble-self-bg;
} }
@ -620,6 +625,7 @@ limitations under the License.
margin-right: 0; margin-right: 0;
.mx_MessageActionBar { .mx_MessageActionBar {
inset-inline-start: initial; // Reset .mx_EventTile[data-layout="bubble"][data-self="false"] .mx_MessageActionBar
right: 48px; // align with that of right-column bubbles right: 48px; // align with that of right-column bubbles
} }

View File

@ -900,12 +900,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
margin: 0 -13px 0 0; // align with normal messages 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] { .mx_EventTile[data-layout=group] {