Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-16444 - Adding usernames back to compact view #2984

Merged
merged 3 commits into from
Jun 20, 2019
Merged

MM-16444 - Adding usernames back to compact view #2984

merged 3 commits into from
Jun 20, 2019

Conversation

asaadmahmood
Copy link
Contributor

Summary

MM-16444 - Adding usernames back to compact view

Ticket Link

https://mattermost.atlassian.net/browse/MM-16444

@asaadmahmood asaadmahmood added this to the v5.13.0 milestone Jun 19, 2019
@asaadmahmood asaadmahmood added the 2: Dev Review Requires review by a core commiter label Jun 19, 2019
@@ -158,17 +158,16 @@ export default class RhsComment extends React.PureComponent {
let profilePicture;
let visibleMessage;

let userProfile = null;
if (!isConsecutivePost) {
Copy link
Member

@jespino jespino Jun 19, 2019

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.

Copy link
Member

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.

Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amyblais amyblais added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Jun 19, 2019
Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks! :)

@asaadmahmood
Copy link
Contributor Author

One minor change left, the timestamps need to appear at all times.

@asaadmahmood
Copy link
Contributor Author

Done

Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@enahum
Copy link
Contributor

enahum commented Jun 20, 2019

@asaadmahmood @jespino I'm not following what is happening here

Copy link
Contributor

@enahum enahum left a 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

@enahum enahum added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Jun 20, 2019
@enahum enahum merged commit 1e6d8b6 into mattermost:master Jun 20, 2019
@enahum
Copy link
Contributor

enahum commented Jun 20, 2019

@jespino the cherry picking is conflicting with some of your previous work, can you take a look at this please

@asaadmahmood asaadmahmood deleted the MM-16444 branch June 20, 2019 13:29
@jespino
Copy link
Member

jespino commented Jun 20, 2019

@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?

@asaadmahmood
Copy link
Contributor Author

@jespino This bug exists on community daily, which is on 5.13.
Screenshot 2019-06-20 at 6 40 51 PM

@jespino
Copy link
Member

jespino commented Jun 20, 2019

@asaadmahmood community-daily is master (I think)

@enahum
Copy link
Contributor

enahum commented Jun 20, 2019

Yup community daily is master

@asaadmahmood
Copy link
Contributor Author

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?

@enahum enahum modified the milestones: v5.13.0, v5.14.0 Jun 20, 2019
@enahum enahum removed the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Jun 20, 2019
@jespino
Copy link
Member

jespino commented Jun 20, 2019

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.

@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Jun 27, 2019
@jgilliam17 jgilliam17 added the Tests/Not Needed Does not require new release tests label Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
5 participants