[CP Staging] Fix/regression unread messages#23729
Conversation
|
|
||
| flatListRef.current.scrollToOffset({animated: false, offset: 0}); | ||
| }; | ||
| }, [flatListRef]); |
There was a problem hiding this comment.
flatListRef would never change. So we can just add [].
There was a problem hiding this comment.
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 |
mountiny
left a comment
There was a problem hiding this comment.
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 theuseIsFocusedhook 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-07-27.at.13.40.47.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android