From 1d53c83b7d012f7dd705cda22f1981bc2f601026 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 27 May 2022 01:06:05 +0900 Subject: [PATCH 1/2] Create 'Unable To Decrypt' grid layout for hidden events on a bubble layout Signed-off-by: Suguru Hirahara --- res/css/views/rooms/_EventBubbleTile.scss | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 6e648d4e579..9bb09ffda66 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -486,8 +486,9 @@ limitations under the License. margin-left: -9px; } + &.mx_EventTile_bad { /* Special layout scenario for "Unable To Decrypt (UTD)" events */ - &.mx_EventTile_bad > .mx_EventTile_line { + .mx_EventTile_line { display: grid; grid-template: "reply reply" auto @@ -513,6 +514,23 @@ limitations under the License. } } + &.mx_EventTile_info { + // "Unable To Decrypt" layout for hidden events + .mx_EventTile_line { + gap: 0 9px; // 9px: margin value of E2E icon + align-items: center; + grid-template: + "shield source" auto + "shield link" auto + / auto 1fr; + + .mx_ViewSourceEvent { + grid-area: source; + } + } + } + } + .mx_ReadReceiptGroup { position: absolute; // as close to right gutter without clipping as possible From e8901e541d4d4688cd31418185316edddfea1cbd Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 27 May 2022 01:24:32 +0900 Subject: [PATCH 2/2] yarn run lint:style --fix Signed-off-by: Suguru Hirahara --- res/css/views/rooms/_EventBubbleTile.scss | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 9bb09ffda66..c3752c87529 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -487,32 +487,32 @@ limitations under the License. } &.mx_EventTile_bad { - /* Special layout scenario for "Unable To Decrypt (UTD)" events */ - .mx_EventTile_line { - display: grid; - grid-template: - "reply reply" auto - "shield body" auto - "shield link" auto - / auto 1fr; - - .mx_EventTile_e2eIcon { - grid-area: shield; - } + /* Special layout scenario for "Unable To Decrypt (UTD)" events */ + .mx_EventTile_line { + display: grid; + grid-template: + "reply reply" auto + "shield body" auto + "shield link" auto + / auto 1fr; + + .mx_EventTile_e2eIcon { + grid-area: shield; + } - .mx_UnknownBody { - grid-area: body; - } + .mx_UnknownBody { + grid-area: body; + } - .mx_EventTile_keyRequestInfo { - grid-area: link; - } + .mx_EventTile_keyRequestInfo { + grid-area: link; + } - .mx_ReplyChain_wrapper { - grid-area: reply; - min-width: 0; // Prevent a grid blowout due to nowrap displayName + .mx_ReplyChain_wrapper { + grid-area: reply; + min-width: 0; // Prevent a grid blowout due to nowrap displayName + } } - } &.mx_EventTile_info { // "Unable To Decrypt" layout for hidden events