Merge pull request #6193 from SimonBrandner/fix/irc-layout-mxid/17648

Fix IRC layout regressions
This commit is contained in:
J. Ryan Stinnett 2021-06-28 16:10:02 +01:00 committed by GitHub
commit 52b578fb3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 32 deletions

View file

@ -29,6 +29,7 @@ $irc-line-height: $font-18px;
// timestamps are links which shouldn't be underlined // timestamps are links which shouldn't be underlined
> a { > a {
text-decoration: none; text-decoration: none;
min-width: 45px;
} }
display: flex; display: flex;
@ -49,18 +50,6 @@ $irc-line-height: $font-18px;
} }
} }
> .mx_SenderProfile {
order: 2;
flex-shrink: 0;
width: var(--name-width);
text-overflow: ellipsis;
text-align: left;
display: flex;
align-items: center;
overflow: visible;
justify-content: flex-end;
}
.mx_EventTile_line, .mx_EventTile_reply { .mx_EventTile_line, .mx_EventTile_reply {
padding: 0; padding: 0;
display: flex; display: flex;
@ -173,27 +162,37 @@ $irc-line-height: $font-18px;
border-left: 0; border-left: 0;
} }
.mx_SenderProfile_hover { .mx_SenderProfile {
background-color: $primary-bg-color; width: var(--name-width);
overflow: hidden;
display: flex; display: flex;
order: 2;
flex-shrink: 0;
justify-content: flex-start;
align-items: center;
> .mx_SenderProfile_displayName { > .mx_SenderProfile_displayName {
width: 100%;
text-align: end;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
min-width: var(--name-width); }
text-align: end;
> .mx_SenderProfile_mxid {
visibility: collapse;
} }
} }
.mx_SenderProfile:hover { .mx_SenderProfile:hover {
justify-content: flex-start;
}
.mx_SenderProfile_hover:hover {
overflow: visible; overflow: visible;
width: max(auto, 100%);
z-index: 10; z-index: 10;
> .mx_SenderProfile_displayName {
overflow: visible;
}
> .mx_SenderProfile_mxid {
visibility: visible;
}
} }
.mx_ReplyThread { .mx_ReplyThread {
@ -201,16 +200,7 @@ $irc-line-height: $font-18px;
.mx_SenderProfile { .mx_SenderProfile {
width: unset; width: unset;
max-width: var(--name-width); max-width: var(--name-width);
}
.mx_SenderProfile_hover {
background: transparent; background: transparent;
> span {
> .mx_SenderProfile_displayName {
min-width: inherit;
}
}
} }
.mx_EventTile_emote { .mx_EventTile_emote {

View file

@ -140,7 +140,7 @@ export default class SenderProfile extends React.Component<IProps, IState> {
} }
return ( return (
<div className="mx_SenderProfile mx_SenderProfile_hover" dir="auto" onClick={this.props.onClick}> <div className="mx_SenderProfile" dir="auto" onClick={this.props.onClick}>
<span className={`mx_SenderProfile_displayName ${colorClass}`}> <span className={`mx_SenderProfile_displayName ${colorClass}`}>
{ displayName } { displayName }
</span> </span>