-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[HOLD on #76101 and #76104] Open reports at first unread action #51366
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
base: main
Are you sure you want to change the base?
[HOLD on #76101 and #76104] Open reports at first unread action #51366
Conversation
20bb3d2 to
c811ef7
Compare
fb6a2fb to
3b03cef
Compare
b88cba8 to
13de5ad
Compare
|
Oh I guess I am not sure how to assign someone from the @Expensify/design team to the PR, but I think they can help with your question #51366 (comment) |
I personally like this, but I think I would prefer to let an older message slightly peak out from above so there is a little more context that you are starting from a certain point. So basically what you have but maybe push down the starting point by like 56px or 64px or something like that. |
|
Yeah I like that too Shawn! |
|
+1 to that. Always like it when we peek content to show that there's more there |
|
@janicduplessis First of all, props for picking up this veteran difficulty level issue, doing such great work on it so far and getting it so close to completion 🚀 👋 Please tag me before merging this in case I don't get notified because I'd like to run some tests myself to make sure this works as expected, I have 2 scenarios in mind:
Note: I'm one of the contributors which attempted to fix this from FE only but ultimately figured out it won't work and suggested a BE + FE implementation discussion months ago before Rory went on parental leave. How did I get here ? Another C+ reviewer asked just yesterday about an issue on Slack, which will basically be fixed by this PR - that's how I remembered this 1 year old issue and decided to join the testing effort as well since I have some context on this. Note: No compensation needed, just want to help 👍 |
007ef6c to
cb8fd25
Compare
cb8fd25 to
4a9ef9f
Compare
|
@ishpaul777 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] |
|
This is ready for review and further testing. Sadly adjusting the scroll position so the newest message is near the top ended up very difficult with the way we handle opening the list in the middle of a chat. I think we should punt that for later since this is already taking longer than I would have liked. |
| // This scrolls the unread action at the top of the screen. | ||
| viewPosition: 1, | ||
| // This makes sure that the unread indicator doesn't get cut off. | ||
| viewOffset: -64, |
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.
Sadly adjusting the scroll position so the newest message is near the top ended up very difficult with the way we handle opening the list in the middle of a chat.
how is this relevant if the last unread message is show at the bottom not the top?
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.
From Flatlist's scrollToIndex() docs:
Scrolls to the item at the specified index such that it is positioned in the viewable area such that
viewPosition0 places it at the top, 1 at the bottom, and 0.5 centered in the middle.
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.
This is actually not needed anymore.
|
I will run tests on this today. |
will retest this later today in couple hours |
|
This is still on radar, but I am still low on bandwidth sorry for delay everyone. |
|
@chrispader can you please merge main, also would be great if you can summarize and help me understand the new changes. Thanks! Also i feel like if possible this PR should be broken into smaller PRs to reduce scope per PR and possibilty of full revert incase of regressions ? |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
@ishpaul777 just merged main! I will try to split this up into smaller PRs and then summarize the overall plan and each part indivudally |
|
Okay @ishpaul777 & @rlinoz, so i've split this PR up into 4 separate PRs: In the first stage, we would need to merge two PRs that change the behavior of the
The above two PRs are also the most likely to cause regressions, so it's good to have them separate. In the second stage, we can merge the actual changes to
I was not really able to split this up further, since the changes depend on each other and splitting these up would only increase complexity of the implementation... After the main PR, i extracted some of the changes that i made during the work on this feature into a separate refactoring PR. These changes don't change any behavior, but are merely simplifications, changes for better readability and cleanups. These changes were cluttering this PR's diff quite a bit:
Therefore, @rlinoz could you change the title of this PR to HOLD on #76101 and #76104 please 🙌🏼 |
|
Thanks for splitting this up @chrispader! i'll priortize review for each as soon as i can |


Details
Implements opening reports at the last unread message. This builds on top of #52149 to be able to start our list at any item. This removes a few assumptions that open report will always open at the newest action.
Fixed Issues
$ #35011
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
Screen.Recording.2025-01-27.at.23.42.32.mov
Android: mWeb Chrome
Screen.Recording.2025-01-27.at.23.37.31.mov
iOS: Native
Screen.Recording.2025-01-27.at.22.56.37.mov
iOS: mWeb Safari
Screen.Recording.2025-01-27.at.23.02.45.mov
MacOS: Chrome / Safari
Screen.Recording.2025-01-27.at.22.33.19.mov
MacOS: Desktop
Screen.Recording.2025-01-27.at.23.32.32.mov