-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-16444 - Adding usernames back to compact view #2984
Conversation
@@ -158,17 +158,16 @@ export default class RhsComment extends React.PureComponent { | |||
let profilePicture; | |||
let visibleMessage; | |||
|
|||
let userProfile = null; | |||
if (!isConsecutivePost) { |
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.
Why not keep it as before and add here something like:
let userProfile = null;
if (this.props.compactDisplay) {
userProfile = (
<UserProfile
userId={post.user_id}
isBusy={this.props.isBusy}
isRHS={true}
hasMention={true}
/>
);
}
and then, the previous approach with:
if (!isConsecutivePost) {
userProfile = (
<UserProfile
userId={post.user_id}
isBusy={this.props.isBusy}
isRHS={true}
hasMention={true}
/>
);
...
This way you will have better performance when you are not using the compact view. I'm not 100% sure about when is rendered the popover stuff, but if is rendered at the same time, it will be a lot of performance invested there.
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.
I confirmed that is not a big deal because the Popover is render on visualization. Anyway, feel free to add my proposed optimization, when you multiply that component for 100 for example in a long thread, probably it has some impact.
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.
LGTM
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.
LGTM. Thanks! :)
One minor change left, the timestamps need to appear at all times. |
Done |
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.
LGTM
@asaadmahmood @jespino I'm not following what is happening here |
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.
@asaadmahmood explained to me offline
@jespino the cherry picking is conflicting with some of your previous work, can you take a look at this please |
@enahum actually, I'm not 100% sure about this bug really affects 5.13, looks like was introduced as part of an optimization that went into master, but not into 5.13. Can we confirm that the bug was in 5.13? |
@jespino This bug exists on community daily, which is on 5.13. |
@asaadmahmood community-daily is master (I think) |
Yup community daily is master |
Tested https://community-release.mattermost.com/, which seems to be 5.13. Doesn't seem to repro on that. So should this be moved to 5.14? |
Yes, I think so, it doesn't need cherry-pick, it was broken as part of the optimization to not paint things when not needed in the RHS. |
Summary
MM-16444 - Adding usernames back to compact view
Ticket Link
https://mattermost.atlassian.net/browse/MM-16444