From d4d17703457aff8a0626c322e6491f39323565cb Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 30 Apr 2022 16:03:08 +0000 Subject: [PATCH 1/7] Move DisambiguatedProfile cursor property to _DisambiguatedProfile.scss Signed-off-by: Suguru Hirahara --- res/css/views/messages/_DisambiguatedProfile.scss | 1 + res/css/views/rooms/_EventTile.scss | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/res/css/views/messages/_DisambiguatedProfile.scss b/res/css/views/messages/_DisambiguatedProfile.scss index caef2fa4ad3..7019c9b6d7d 100644 --- a/res/css/views/messages/_DisambiguatedProfile.scss +++ b/res/css/views/messages/_DisambiguatedProfile.scss @@ -18,6 +18,7 @@ limitations under the License. .mx_DisambiguatedProfile { overflow: hidden; text-overflow: ellipsis; + cursor: pointer; .mx_DisambiguatedProfile_displayName { font-weight: 600; diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index a849c5fedb1..8d41632b2fc 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -321,10 +321,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss // on ELS we need the margin to allow interaction with the expand/collapse button which is normally in the RR gutter } -.mx_DisambiguatedProfile { - cursor: pointer; -} - .mx_EventTile_bubbleContainer { display: grid; grid-template-columns: 1fr 100px; From 456c70cf95fe548db6d6b8c41f46cc9987a3d51c Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 30 Apr 2022 16:22:41 +0000 Subject: [PATCH 2/7] Remove duplicate properties - _EventTile.scss, modern layout Signed-off-by: Suguru Hirahara --- res/css/views/rooms/_EventTile.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 8d41632b2fc..25981d01214 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -116,14 +116,12 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss color: $primary-content; font-size: $font-14px; display: inline-block; - /* anti-zalgo, with overflow hidden */ - overflow: hidden; padding-bottom: 0px; padding-top: 0px; margin: 0px; - /* the next three lines, along with overflow hidden, truncate long display names */ + + // truncate long display names white-space: nowrap; - text-overflow: ellipsis; max-width: calc(100% - $left-gutter); } From 9078c48d95918d4e760a225ea1e1f7f0576566a1 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 30 Apr 2022 17:53:07 +0000 Subject: [PATCH 3/7] Remove duplicate properties - _ReplyTile.scss Signed-off-by: Suguru Hirahara --- res/css/views/rooms/_ReplyTile.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/res/css/views/rooms/_ReplyTile.scss b/res/css/views/rooms/_ReplyTile.scss index ca8f886737e..3442a5f8d12 100644 --- a/res/css/views/rooms/_ReplyTile.scss +++ b/res/css/views/rooms/_ReplyTile.scss @@ -113,8 +113,6 @@ limitations under the License. margin: 0; // truncate long display names - overflow: hidden; white-space: nowrap; - text-overflow: ellipsis; } } From 0510a587778c652823835197a3bd752e1033ad95 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 1 May 2022 06:18:24 +0000 Subject: [PATCH 4/7] For displayName inside mx_EventTile[data-layout=bubble] Signed-off-by: Suguru Hirahara --- res/css/views/messages/_DisambiguatedProfile.scss | 9 ++++++++- res/css/views/rooms/_EventBubbleTile.scss | 1 + res/css/views/rooms/_EventTile.scss | 3 --- res/css/views/rooms/_ReplyTile.scss | 3 --- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/res/css/views/messages/_DisambiguatedProfile.scss b/res/css/views/messages/_DisambiguatedProfile.scss index 7019c9b6d7d..55f0a21d258 100644 --- a/res/css/views/messages/_DisambiguatedProfile.scss +++ b/res/css/views/messages/_DisambiguatedProfile.scss @@ -18,16 +18,23 @@ limitations under the License. .mx_DisambiguatedProfile { overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; cursor: pointer; .mx_DisambiguatedProfile_displayName { font-weight: 600; + white-space: nowrap; // For displayName inside mx_EventTile[data-layout=bubble] + margin-inline-end: 5px; + + // For RTL displayName + unicode-bidi: embed; + direction: ltr; } .mx_DisambiguatedProfile_mxid { font-weight: 600; font-size: 1.1rem; - margin-left: 5px; + margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble] opacity: 0.5; // Match mx_TextualEvent color: $primary-content; } diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 4104ae42733..55db24635ff 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -101,6 +101,7 @@ limitations under the License. top: -2px; left: 2px; font-size: $font-15px; + white-space: normal; } .mx_MessageActionBar { diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 25981d01214..8237e5f6d64 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -119,9 +119,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss padding-bottom: 0px; padding-top: 0px; margin: 0px; - - // truncate long display names - white-space: nowrap; max-width: calc(100% - $left-gutter); } diff --git a/res/css/views/rooms/_ReplyTile.scss b/res/css/views/rooms/_ReplyTile.scss index 3442a5f8d12..fe8e5bce489 100644 --- a/res/css/views/rooms/_ReplyTile.scss +++ b/res/css/views/rooms/_ReplyTile.scss @@ -111,8 +111,5 @@ limitations under the License. display: inline-block; // anti-zalgo, with overflow hidden padding: 0; margin: 0; - - // truncate long display names - white-space: nowrap; } } From 105e1c30d4113f8105a659aa62ceffc735714c37 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 1 May 2022 06:24:22 +0000 Subject: [PATCH 5/7] Truncate long user names, without hiding mxid Signed-off-by: Suguru Hirahara --- .../views/messages/_DisambiguatedProfile.scss | 21 ++++++++++++++++--- res/css/views/rooms/_EventBubbleTile.scss | 1 - 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/res/css/views/messages/_DisambiguatedProfile.scss b/res/css/views/messages/_DisambiguatedProfile.scss index 55f0a21d258..901108af50f 100644 --- a/res/css/views/messages/_DisambiguatedProfile.scss +++ b/res/css/views/messages/_DisambiguatedProfile.scss @@ -23,8 +23,7 @@ limitations under the License. .mx_DisambiguatedProfile_displayName { font-weight: 600; - white-space: nowrap; // For displayName inside mx_EventTile[data-layout=bubble] - margin-inline-end: 5px; + margin-inline-end: 0; // For RTL displayName unicode-bidi: embed; @@ -34,8 +33,24 @@ limitations under the License. .mx_DisambiguatedProfile_mxid { font-weight: 600; font-size: 1.1rem; - margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble] + margin-inline-start: 5px; opacity: 0.5; // Match mx_TextualEvent color: $primary-content; } } + +.mx_EventTile[data-layout=bubble] { + // other users profile on bubble layout + > .mx_DisambiguatedProfile { + white-space: normal; // display mxid + + .mx_DisambiguatedProfile_displayName { + white-space: nowrap; // truncate long display names + margin-inline-end: 5px; + } + + .mx_DisambiguatedProfile_mxid { + margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble] + } + } +} diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 55db24635ff..4104ae42733 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -101,7 +101,6 @@ limitations under the License. top: -2px; left: 2px; font-size: $font-15px; - white-space: normal; } .mx_MessageActionBar { From 775710aa2496d6b9e96663fa321cb642c7195441 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 1 May 2022 06:49:36 +0000 Subject: [PATCH 6/7] Move bidi properties Signed-off-by: Suguru Hirahara --- res/css/views/messages/_DisambiguatedProfile.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/css/views/messages/_DisambiguatedProfile.scss b/res/css/views/messages/_DisambiguatedProfile.scss index 901108af50f..bab8282f53b 100644 --- a/res/css/views/messages/_DisambiguatedProfile.scss +++ b/res/css/views/messages/_DisambiguatedProfile.scss @@ -24,10 +24,6 @@ limitations under the License. .mx_DisambiguatedProfile_displayName { font-weight: 600; margin-inline-end: 0; - - // For RTL displayName - unicode-bidi: embed; - direction: ltr; } .mx_DisambiguatedProfile_mxid { @@ -47,6 +43,10 @@ limitations under the License. .mx_DisambiguatedProfile_displayName { white-space: nowrap; // truncate long display names margin-inline-end: 5px; + + // For RTL displayName + unicode-bidi: embed; + direction: ltr; } .mx_DisambiguatedProfile_mxid { From 6fe7fbf95f1db16f19012e2910470a63c6da1fc0 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 19 May 2022 21:19:29 +0900 Subject: [PATCH 7/7] Move declarations for mx_DisambiguatedProfile on bubble event tile from _DisambiguatedProfile.scss Signed-off-by: Suguru Hirahara --- .../views/messages/_DisambiguatedProfile.scss | 20 ------------------- res/css/views/rooms/_EventBubbleTile.scss | 18 +++++++++++++++++ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/res/css/views/messages/_DisambiguatedProfile.scss b/res/css/views/messages/_DisambiguatedProfile.scss index bab8282f53b..cb605726dd9 100644 --- a/res/css/views/messages/_DisambiguatedProfile.scss +++ b/res/css/views/messages/_DisambiguatedProfile.scss @@ -34,23 +34,3 @@ limitations under the License. color: $primary-content; } } - -.mx_EventTile[data-layout=bubble] { - // other users profile on bubble layout - > .mx_DisambiguatedProfile { - white-space: normal; // display mxid - - .mx_DisambiguatedProfile_displayName { - white-space: nowrap; // truncate long display names - margin-inline-end: 5px; - - // For RTL displayName - unicode-bidi: embed; - direction: ltr; - } - - .mx_DisambiguatedProfile_mxid { - margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble] - } - } -} diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 1625c3171ae..63d997b8d41 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -117,6 +117,24 @@ limitations under the License. line-height: $font-18px; } + // other users profile on bubble layout + > .mx_DisambiguatedProfile { + white-space: normal; // display mxid + + .mx_DisambiguatedProfile_displayName { + white-space: nowrap; // truncate long display names + margin-inline-end: 5px; + + // For RTL displayName + unicode-bidi: embed; + direction: ltr; + } + + .mx_DisambiguatedProfile_mxid { + margin-inline-start: 0; // Align mxid with truncated displayName inside mx_EventTile[data-layout=bubble] + } + } + // inside mx_RoomView_MessageList, outside of mx_ReplyTile // (on the main panel and the chat panel with a maximized widget) > .mx_DisambiguatedProfile,