-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[CP Staging] Fix/regression unread messages #23729
[CP Staging] Fix/regression unread messages #23729
Conversation
if (!flatListRef.current) { | ||
return; | ||
} | ||
|
||
flatListRef.current.scrollToOffset({animated: false, offset: 0}); | ||
}; | ||
}, [flatListRef]); |
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.
flatListRef
would never change. So we can just add []
.
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.
As flatlist ref comes from the outside eslint doesn't know it's a ref. Thus it will warn us that we need to add it to the dependency array
Then I'd need to add a eslint-ignore line. When it comes to just adding it which is technically correct, or to suppress a warning I'd choose the former.
Also technically it's not correct. Although right now we don't, the flatlistRef could technically change. In this case we need this function to be recreated.
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
One second, I think its still broken on mobile |
Reviewer Checklist
Screenshots/VideosAdding video of web and mweb tested Webweb23729.mp4Mobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
waiting for Hanno, I think that part can be logged as an issue to be investigated later. |
Yes, let's do a follow up for mobile! @mountiny |
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.
Thanks, tested well with hanno in DM as well so with urgency I will go ahead and merge
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[CP Staging] Fix/regression unread messages (cherry picked from commit 0cccb4e)
Here is the follow up #23733 |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.46-1 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.46-2 🚀
|
Details
We noticed a regression where new messages wouldn't show up as unread.
The main issues I found were the followings:
withNavigationFocus
, which reported incorrect values. Instead we are using theuseIsFocused
hook directly (this is also more inline with the function component styles in general to use hooks directly)Fixed Issues
$ #23446
PROPOSAL: https://expensify.slack.com/archives/C01GTK53T8Q/p1690394092631009
Tests
Test 1
Test 2
Test 3
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-07-27.at.13.40.47.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android