Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(participantsStore): optimize store updates #11254

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Dec 17, 2023

☑️ Resolves

  • Fix Participants list in RightSidebar flickers #10735
  • Before: 🐌
    • every request to fetchParticipants clears store for current token, populates with participants from response and emit status update for each
  • After: 🚀
    • persist store value after fetch
    • update participant obejct only if there was a real change in object
      • every joined user will be updated because of lastPing value
    • emit 'user_status:status.updated' only if there was a real change in status detected
      • patch ParticipantsTab to not update store twice with status
    • remove unused props from Participant to not trigger re-render because of them

🖌️ UI Checklist

🏁 Checklist

  • 🌏 Tested with Chrome, Firefox and Safari or should not be risky to browser differences
  • ⛑️ Tests are included or not possible

@Antreesy Antreesy added this to the 💞 Following Major (29) milestone Dec 17, 2023
@Antreesy Antreesy self-assigned this Dec 17, 2023
@Antreesy Antreesy marked this pull request as ready for review December 17, 2023 17:43
src/store/participantsStore.js Outdated Show resolved Hide resolved
src/store/participantsStore.js Outdated Show resolved Hide resolved
src/store/participantsStore.js Outdated Show resolved Hide resolved
src/store/participantsStore.js Show resolved Hide resolved
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

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

Tested 🐦

…ed participants

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the feat/noid/optimize-participants branch from 5e32e96 to 4784f6f Compare December 21, 2023 09:17
@Antreesy Antreesy merged commit 89a8f2e into main Dec 21, 2023
36 checks passed
@Antreesy Antreesy deleted the feat/noid/optimize-participants branch December 21, 2023 09:20
@Antreesy
Copy link
Contributor Author

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Participants list in RightSidebar flickers
3 participants