PLT-6486 Add an @username button to the profile popover, that puts the username in the post when clicked (#6349)
* PLT-6486 Add an `@username` button to the profile popover, that puts the username in the post when clicked * PLT-6486 Display `@username` mention on the right text area on center or RHS. * Disable @mentions from profile popover on searches, mentions and pinned posts. Fix js errors. * Control undefined post in SearchStore that causes an exception.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
22fa48f455
Коммит
f740698dbe
@@ -210,6 +210,7 @@ export default class Post extends React.PureComponent {
|
||||
status={status}
|
||||
user={this.props.user}
|
||||
isBusy={this.props.isBusy}
|
||||
hasMention={true}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ export default class PostBody extends React.PureComponent {
|
||||
lastPostCount={this.props.lastPostCount}
|
||||
post={this.props.post}
|
||||
compactDisplay={this.props.compactDisplay}
|
||||
hasMention={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -91,6 +91,7 @@ export default class PostHeader extends React.PureComponent {
|
||||
displayNameType={this.props.displayNameType}
|
||||
status={this.props.status}
|
||||
isBusy={this.props.isBusy}
|
||||
hasMention={true}
|
||||
/>
|
||||
);
|
||||
let botIndicator;
|
||||
|
||||
@@ -66,12 +66,24 @@ export default class PostMessageView extends React.PureComponent {
|
||||
/**
|
||||
* Set to render post body compactly
|
||||
*/
|
||||
compactDisplay: PropTypes.bool
|
||||
compactDisplay: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Flags if the post_message_view is for the RHS (Reply).
|
||||
*/
|
||||
isRHS: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Flags if the post_message_view is for the RHS (Reply).
|
||||
*/
|
||||
hasMention: PropTypes.bool
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
options: {},
|
||||
mentionKeys: []
|
||||
mentionKeys: [],
|
||||
isRHS: false,
|
||||
hasMention: false
|
||||
};
|
||||
|
||||
renderDeletedPost() {
|
||||
@@ -116,7 +128,13 @@ export default class PostMessageView extends React.PureComponent {
|
||||
processNode: (node) => {
|
||||
const mentionName = node.attribs[attrib];
|
||||
|
||||
return <AtMention mentionName={mentionName}/>;
|
||||
return (
|
||||
<AtMention
|
||||
mentionName={mentionName}
|
||||
isRHS={this.props.isRHS}
|
||||
hasMention={this.props.hasMention}
|
||||
/>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Ссылка в новой задаче
Block a user