[MM-54118] Special mentions (@here, @channel) are not formatted correctly in the RHS (#24800)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
14fd5c8168
Коммит
009d6136f0
@@ -76,7 +76,9 @@ exports[`at mention suggestion Should display nick name of non signed in user 1`
|
|||||||
>
|
>
|
||||||
@user2
|
@user2
|
||||||
</span>
|
</span>
|
||||||
a b (c)
|
<span>
|
||||||
|
a b (c)
|
||||||
|
</span>
|
||||||
<Component
|
<Component
|
||||||
emojiSize={15}
|
emojiSize={15}
|
||||||
emojiStyle={
|
emojiStyle={
|
||||||
@@ -173,7 +175,9 @@ exports[`at mention suggestion Should not display nick name of the signed in use
|
|||||||
>
|
>
|
||||||
@user
|
@user
|
||||||
</span>
|
</span>
|
||||||
a b
|
<span>
|
||||||
|
a b
|
||||||
|
</span>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="(you)"
|
defaultMessage="(you)"
|
||||||
id="suggestion.user.isCurrent"
|
id="suggestion.user.isCurrent"
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ const AtMentionSuggestion = React.forwardRef<HTMLDivElement, SuggestionProps<Ite
|
|||||||
|
|
||||||
if (item.isCurrentUser) {
|
if (item.isCurrentUser) {
|
||||||
if (item.first_name || item.last_name) {
|
if (item.first_name || item.last_name) {
|
||||||
description = Utils.getFullName(item);
|
description = <span>{Utils.getFullName(item)}</span>;
|
||||||
}
|
}
|
||||||
} else if (item.first_name || item.last_name || item.nickname) {
|
} else if (item.first_name || item.last_name || item.nickname) {
|
||||||
description = `${Utils.getFullName(item)} ${item.nickname ? `(${item.nickname})` : ''}`.trim();
|
description = <span>{`${Utils.getFullName(item)} ${item.nickname ? `(${item.nickname})` : ''}`.trim()}</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
icon = (
|
icon = (
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default function RhsSuggestionList(props: Props): JSX.Element {
|
|||||||
setPosition(newPosition);
|
setPosition(newPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [props.inputRef, props.open]);
|
}, [position, props.inputRef, props.open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SuggestionList
|
<SuggestionList
|
||||||
|
|||||||
@@ -205,10 +205,7 @@
|
|||||||
|
|
||||||
.suggestion-list__main {
|
.suggestion-list__main {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
color: rgba(var(--center-channel-color-rgb), 1);
|
color: rgba(var(--center-channel-color-rgb), 1);
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
.suggestion-list__desc {
|
.suggestion-list__desc {
|
||||||
@@ -216,6 +213,12 @@
|
|||||||
color: rgba(var(--center-channel-color-rgb), 0.56);
|
color: rgba(var(--center-channel-color-rgb), 0.56);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> span:nth-child(2) {
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-list__flex {
|
.suggestion-list__flex {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user