-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[NewFeature] Automatic scrolling to the top of report's new unread message marker #41448
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Native41448.Android.mp4Android: mWeb Chrome41448.mWeb-Chrome.mp4iOS: Native41448.iOS.moviOS: mWeb Safari41448.mWeb-Safari.movMacOS: Chrome / Safari41448.Web.mp4MacOS: Desktop41448.Desktop.mp4 |
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.
The changes seem to fix the issue, but we have a side effect where the list is always scrolled to the unread message index when it's received.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.4.73-0 🚀
|
FYI this doesn't seem to work offline. Would you mind taking a look at this issue please? |
Possibly a regression, will look into it today and get back 👍 |
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.73-7 🚀
|
Details
We added a new
useEffect
within theReportActionsList
component which willscrollToFirstUnreadMessage
when we open a report which has lots of unread messages (going out of messages initial view).To do this we modified our existing
reportScrollManager.scrollToIndex
function to optionally take in theviewPosition
argument because we're inverting the flatlist which means that we would need to passviewPosition: 1
to the FlatList'sscrollToIndex
function such that we are scrolling to the top of the new message (unread marker).Fixed Issues
$ #35011
PROPOSAL: #35011 (comment)
Tests
Offline tests
TLDR: same as Tests.
QA Steps
TLDR: same as Tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mp4
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mp4