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

Improving selectors of Textbox component #9831

Merged
merged 5 commits into from
Feb 17, 2022
Merged

Conversation

M-ZubairAhmed
Copy link
Member

@M-ZubairAhmed M-ZubairAhmed commented Feb 17, 2022

Summary

  • Moved makeGetProfilesInChannel & makeAddLastViewAtToProfiles from Textbox to AtMentionProvider - @jwilander
  • Created new getAllDmChannels selector
  • Improved memoization of makeAddLastViewAtToProfiles selector

Ticket Link

Related Pull Requests

N/A

Release Note

Improved perceived typing performance by moving heavy code around and effective memoization related to the textbox component.

@mm-cloud-bot
Copy link

@M-ZubairAhmed: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

I understand the commands that are listed here

@mm-cloud-bot
Copy link

@M-ZubairAhmed: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

I understand the commands that are listed here

@M-ZubairAhmed M-ZubairAhmed force-pushed the perf-selectr-textbox branch 2 times, most recently from 8fd16b0 to 284ac35 Compare February 17, 2022 17:58
@jwilander
Copy link
Member

Test server with commit 284ac35 https://webapp-perf.test.mattermost.cloud/

@M-ZubairAhmed M-ZubairAhmed marked this pull request as ready for review February 17, 2022 19:04
@M-ZubairAhmed M-ZubairAhmed added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Feb 17, 2022
@jgilliam17
Copy link
Contributor

jgilliam17 commented Feb 17, 2022

@jwilander Tested autocomplete on the test server https://webapp-perf.test.mattermost.cloud/
Mention autocomplete looks good overall tested main channel, rhs, description, edit modal.
When loading avatars there is a bit of slowness, but it doesn't differ that much from what I can see on daily. See video.

autocomplete.mov

@jgilliam17
Copy link
Contributor

/e2e-test

@mattermod
Copy link
Contributor

Triggering e2e testing with options:
<nil>

@mattermod
Copy link
Contributor

@jwilander
Copy link
Member

Awesome, thanks @jgilliam17. Looks good to me.

@M-ZubairAhmed M-ZubairAhmed removed the 2: Dev Review Requires review by a core commiter label Feb 17, 2022
@jgilliam17 jgilliam17 self-requested a review February 17, 2022 19:53
@jgilliam17
Copy link
Contributor

Apologies @M-ZubairAhmed I meant to comment, not hit approve
Waiting for E2E report, will approve shortly after I check the report

@jgilliam17
Copy link
Contributor

E2E report looks good, no PR related failures ( master for comparison)

@jgilliam17 jgilliam17 added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Feb 17, 2022
@jwilander jwilander merged commit be597b7 into master Feb 17, 2022
@jwilander jwilander deleted the perf-selectr-textbox branch February 17, 2022 20:49
@jwilander jwilander added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Feb 17, 2022
@jwilander jwilander added this to the v6.3.0 milestone Feb 17, 2022
@jwilander
Copy link
Member

/cherry-pick release-6.3

@mattermod
Copy link
Contributor

Cherry pick is scheduled.

@mattermod
Copy link
Contributor

Error trying doing the automated Cherry picking. Please do this manually

+++ Updating remotes...
Fetching upstream
Failed to add the RSA host key for IP address '140.82.114.3' to the list of known hosts (/app/.ssh/known_hosts).
From github.com:mattermost/mattermost-webapp
   074560361..762b8581c  MM-36190_permalink-nested-previews -> upstream/MM-36190_permalink-nested-previews
   0622ce200..17d45b574  MM-36442-more-actions-restructure -> upstream/MM-36442-more-actions-restructure
 * [new branch]          MM-40148_introduce-threadsOnly-queryparam -> upstream/MM-40148_introduce-threadsOnly-queryparam
 * [new branch]          MM-40306               -> upstream/MM-40306
   cb65616dc..aabf97fec  MM-40415               -> upstream/MM-40415
 * [new branch]          MM-41671/support-email -> upstream/MM-41671/support-email
 * [new branch]          MM-41710               -> upstream/MM-41710
 * [new branch]          MM-41800               -> upstream/MM-41800
 * [new branch]          MM-41851               -> upstream/MM-41851
 * [new branch]          MM-41955_reduce-user-state-changes -> upstream/MM-41955_reduce-user-state-changes
 * [new branch]          channel-loop-logs      -> upstream/channel-loop-logs
   7d65f671d..81e2d35b9  cloud                  -> upstream/cloud
   61170d826..b265dec54  custom_groups          -> upstream/custom_groups
 * [new branch]          dm-fixes               -> upstream/dm-fixes
 * [new branch]          dm-optimization2       -> upstream/dm-optimization2
   82b3ea959..bc466ef4a  emoji-picker-virtualized -> upstream/emoji-picker-virtualized
   256120225..b39263662  growth-spike/dashboard-view-controller -> upstream/growth-spike/dashboard-view-controller
 * [new branch]          interactive-dialog-password-autocomplete-off -> upstream/interactive-dialog-password-autocomplete-off
   a8a1394bf..33d829a46  master                 -> upstream/master
 * [new branch]          new-signup-screens     -> upstream/new-signup-screens
 * [new branch]          npm-ci-in-makefile     -> upstream/npm-ci-in-makefile
 * [new branch]          perf-quicker-rerender  -> upstream/perf-quicker-rerender
   1bed8412a..ef9d0e473  productivity/MM-29137_post-inline-editing -> upstream/productivity/MM-29137_post-inline-editing
   94a4af59e..c4bc81474  release-6.3            -> upstream/release-6.3
 * [new branch]          single-team-in-products -> upstream/single-team-in-products
 * [new branch]          use-case-onboarding-trigger-e2e -> upstream/use-case-onboarding-trigger-e2e
 * [new branch]          use-case-onboarding-wizard-centering -> upstream/use-case-onboarding-wizard-centering
 * [new tag]             cloud-2022-02-16-1     -> cloud-2022-02-16-1
 * [new tag]             v6.4.0                 -> v6.4.0
Fetching origin
Failed to add the RSA host key for IP address '140.82.114.3' to the list of known hosts (/app/.ssh/known_hosts).
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-mattermost-webapp-#9831-upstream-release-6.3-1645143035
Switched to a new branch 'automated-cherry-pick-of-mattermost-webapp-#9831-upstream-release-6.3-1645143035'
Branch 'automated-cherry-pick-of-mattermost-webapp-#9831-upstream-release-6.3-1645143035' set up to track remote branch 'release-6.3' from 'upstream'.

+++ About to attempt cherry pick of PR #9831 with merge commit be597b7f7792bd2953606f4a5c4a6caaf677154e.

error: could not apply be597b7f7... Improving selectors of Textbox component (#9831)
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

+++ Conflicts detected:

UU packages/mattermost-redux/src/selectors/entities/utils.ts
Aborting.

+++ Aborting in-progress git cherry-pick.

+++ Returning you to the master branch and cleaning up.

jwilander pushed a commit that referenced this pull request Feb 18, 2022
* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes
jwilander pushed a commit that referenced this pull request Feb 18, 2022
* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes
jwilander added a commit that referenced this pull request Feb 18, 2022
* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes

Co-authored-by: Md_ZubairAhmed <[email protected]>
jwilander pushed a commit that referenced this pull request Feb 18, 2022
* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes
jwilander added a commit that referenced this pull request Feb 18, 2022
* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes

Co-authored-by: Md_ZubairAhmed <[email protected]>
jwilander added a commit that referenced this pull request Feb 18, 2022
…" (#9841)

* Improving selectors of Textbox component (#9831)

* improved makeAddLastViewAtToProfiles memoizationg

* move makeAddLastViewAtToProfiles & makeGetProfilesInChannel to AtMentionProvider

* create getAllDmChannels selector

* tests updated

test1

* review changes

* Update snapshots

Co-authored-by: Md_ZubairAhmed <[email protected]>
@amyblais amyblais added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Feb 18, 2022
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/Done Required changelog entry has been written CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation release-note
Projects
None yet
7 participants