Point the auto-scroll action pill down when its target is below the scroll position - #98576
Point the auto-scroll action pill down when its target is below the scroll position#98576MelvinBot wants to merge 2 commits into
Conversation
…sition Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
|
All three failing checks are infrastructure flakes, not code problems — no fix to push. Each of
The runner died mid-job, so these jobs never produced a real result. This is unrelated to the diff (which only touches the action-badge pill direction logic and its tests). I confirmed locally that ESLint passes on all six changed files ( The remaining failing checks — Recommended action: re-run the failed jobs (Actions → the failed run → "Re-run failed jobs"). I don't have permission to trigger the re-run from here. They should pass once they land on a healthy runner. |
|
@MelvinBot pull main |
…lPointDown Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
|
🤖 Pulled The branch was 1 commit behind; it's now up to date with |
|
Update: the code checks now pass — nothing to fix. The three checks that were failing earlier ( The only remaining red checks are |
|
Update: the checks have been re-run and the infra flakes cleared — no code fix was needed. On the latest run, the three previously-failing checks now pass:
The three earlier failures were all the same self-hosted-runner infrastructure error ("The self-hosted runner lost communication with the server"), not anything in the diff. They passed once they landed on healthy runners. The only checks still red are |
Explanation of Change
Extends the chat's floating action-badge pill (added in #86064, which only handled the case where the target is above the scroll position with a
^arrow) to also handle the complementary case: when the report action causing the LHN action badge (Approve/Pay/Fix/etc.) is below the current scroll position, the pill now shows with a down (⌄) arrow and, when clicked, scrolls the user down to that row.What changed:
useReportUnreadMessageScrollTrackingnow also tracksisActionBadgeBelowViewportalongside the existingisActionBadgeAboveViewport. In the inverted list, the target is "below" (newer) when its index is less than the min visible index, and "above" (older) when greater than the max visible index.useReportActionsScrollthreads the newisActionBadgeBelowViewportvalue through.ReportActionsListnow shows the action pill whenever the target is out of view (above or below), and passes the direction down to the pill.FloatingMessageCounterrenders theDownArrowicon instead ofUpArrowwhen the target is below the viewport.The existing click behavior already uses
scrollToIndex(...), which scrolls in either direction, so no scroll-logic change was needed. The behavior remains gated to non-production, matching the existing action-pill rollout.Fixed Issues
$ #94796
PROPOSAL:
Tests
// TODO: The human co-author must fill out / confirm the manual test steps before marking this PR as "ready for review".
Suggested steps:
⌄) arrow.^) arrow and scrolls up when clicked.Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari