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

Fix alignment of e2e icon in userinfo and expose full displayname in title #4312

Merged
merged 4 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions res/css/views/right_panel/_UserInfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,28 @@ limitations under the License.
text-align: center;

h2 {
display: flex;
font-size: 18px;
line-height: 25px;
flex: 1;
justify-content: center;
align-items: center;

// limit to 2 lines, show an ellipsis if it overflows
// this looks webkit specific but is supported by Firefox 68+
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
span {
// limit to 2 lines, show an ellipsis if it overflows
// this looks webkit specific but is supported by Firefox 68+
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;

overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
}

.mx_E2EIcon {
margin: 5px;
margin-top: 3px; // visual vertical centering to the top line of text
margin-right: 4px; // margin from displyname
min-width: 18px; // convince flexbox to not collapse it
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/components/views/right_panel/UserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1444,9 +1444,11 @@ const UserInfoHeader = ({onClose, member, e2eStatus}) => {
<div className="mx_UserInfo_container mx_UserInfo_separator">
<div className="mx_UserInfo_profile">
<div>
<h2 aria-label={displayName}>
<h2 title={displayName} aria-label={displayName}>
{ e2eIcon }
{ displayName }
<span>
{ displayName }
</span>
</h2>
</div>
<div>{ member.userId }</div>
Expand Down