-
-
Notifications
You must be signed in to change notification settings - Fork 833
Insert pill onClick of timeline profile #1239
Insert pill onClick of timeline profile #1239
Conversation
When clicking someone in the timeline, insert a user pill instead of the plaintext "displayname:"
This has the advantage of us not reimplementing things and fixing the same bugs twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm
dis.dispatch({ | ||
action: 'insert_displayname', | ||
displayname: name.replace(' (IRC)', ''), | ||
user_id: mxEvent.getSender(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're changing this dispatch in a breaking way anyway, might be nice t o rename it to insert_mention
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
// paths for inserting a user pill is not fun | ||
const selection = this.state.editorState.getSelection(); | ||
const member = this.props.room.getMember(payload.user_id); | ||
const completion = member ? member.name : payload.user_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll lose the behaviour of stripping the ' (IRC)' suffix - is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I shall add it back in
When clicking someone in the timeline, insert a user pill instead of the plaintext "displayname:"