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

Commit 6f85110

Browse files
authored
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 <[email protected]> * Use variables for MessageActionBar Signed-off-by: Suguru Hirahara <[email protected]> * Set the right property to [data-self=true] Signed-off-by: Suguru Hirahara <[email protected]> * 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 <[email protected]>
1 parent fcc4d62 commit 6f85110

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

res/css/views/messages/_MessageActionBar.scss

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ limitations under the License.
1616
*/
1717

1818
.mx_MessageActionBar {
19+
--MessageActionBar-size-button: 28px;
20+
--MessageActionBar-size-box: 32px; // 28px + 2px (margin) * 2
21+
1922
position: absolute;
2023
visibility: hidden;
2124
cursor: pointer;
2225
display: flex;
23-
height: 32px;
26+
height: var(--MessageActionBar-size-box);
2427
line-height: $font-24px;
2528
border-radius: 8px;
2629
background: $background;
@@ -64,8 +67,8 @@ limitations under the License.
6467
}
6568

6669
.mx_MessageActionBar_maskButton {
67-
width: 28px;
68-
height: 28px;
70+
width: var(--MessageActionBar-size-button);
71+
height: var(--MessageActionBar-size-button);
6972

7073
&:disabled,
7174
&[disabled] {

res/css/views/rooms/_EventBubbleTile.scss

+8-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ limitations under the License.
130130

131131
.mx_MessageActionBar {
132132
top: -28px;
133-
right: 0;
134133
z-index: 9; // above the avatar
135134
}
136135

@@ -171,7 +170,8 @@ limitations under the License.
171170
}
172171

173172
.mx_MessageActionBar {
174-
right: -100px; // to make sure it doesn't overflow to the left or cover sender profile
173+
inset-inline-start: calc(100% - var(--MessageActionBar-size-box));
174+
right: initial; // Reset the default value
175175
}
176176

177177
.mx_ThreadSummary {
@@ -225,6 +225,7 @@ limitations under the License.
225225
order: -1;
226226
}
227227
}
228+
228229
.mx_EventTile_avatar {
229230
top: -19px; // height of the sender block
230231
right: -35px;
@@ -234,6 +235,10 @@ limitations under the License.
234235
background: $eventbubble-self-bg;
235236
}
236237

238+
.mx_MessageActionBar {
239+
inset-inline-end: 0;
240+
}
241+
237242
--backgroundColor: $eventbubble-self-bg;
238243
}
239244

@@ -620,6 +625,7 @@ limitations under the License.
620625
margin-right: 0;
621626

622627
.mx_MessageActionBar {
628+
inset-inline-start: initial; // Reset .mx_EventTile[data-layout="bubble"][data-self="false"] .mx_MessageActionBar
623629
right: 48px; // align with that of right-column bubbles
624630
}
625631

res/css/views/rooms/_EventTile.scss

-6
Original file line numberDiff line numberDiff line change
@@ -900,12 +900,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
900900
margin: 0 -13px 0 0; // align with normal messages
901901
}
902902
}
903-
904-
&[data-self=false] {
905-
.mx_MessageActionBar {
906-
right: -60px; // smaller overlap, otherwise it'll overflow on the right
907-
}
908-
}
909903
}
910904

911905
.mx_EventTile[data-layout=group] {

0 commit comments

Comments
 (0)