-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[HOLD for payment 2025-02-04] Improve FloatingMessageCounter performance #55001
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
Comments
Triggered auto assignment to @mallenexpensify ( |
Hi! I'm Olimpia from Callstack and I'd like to work on this issue. |
Hi @OlimpiaZurek , is there a discuss about this anywhere in Slack? If so, can you link to it plz? Thx |
Hey @mallenexpensify, here is the link to the slack thread: https://callstack-hq.slack.com/archives/C05LX9D6E07/p1736329695333529 |
Thanks @OlimpiaZurek ! Assigned. |
Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.89-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-02-04. 🎊 For reference, here are some details about the assignees on this issue:
|
@jasperhuangg @mallenexpensify @OlimpiaZurek The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@mallenexpensify could you help to assign this issue to me? I helped to review the PR #54944 |
Payment Summary
BugZero Checklist (@mallenexpensify)
|
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
|
Requested payment in ND |
Contributor+: @hoangzinh due $250 via NewDot Doesn't look like we need a test case or update of one for this, plz comment if you disagree |
$250 approved for @hoangzinh |
Uh oh!
There was an error while loading. Please reload this page.
Background
The
FloatingMessageCounter
component is used to display the number of unread messages in a chat thread.Problem
It causes unnecessary re-renders when the user switches workspaces or when modals are opened or closed.
Solution
Wrap the
scrollToBottomAndMarkReportAsRead
function inuseCallback
to ensure it is not recreated on every render. This will prevent unnecessary re-renders during workspace switches, modal interactions, and message updates. Wrapping the function inuseCallback
will ensure it is only recreated when necessary, leading to smoother transitions and more efficient interactions.Before:

After:

Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: