Toggle selection on deleted transaction row press in Search#93702
Toggle selection on deleted transaction row press in Search#93702MelvinBot wants to merge 2 commits into
Conversation
Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
The failing check is unrelated to this PR — no fix pushed. Failing check: Why it's unrelated: This PR only touches three Search transaction-list components — Supporting evidence
The other red check, Recommendation: Re-run job 6 ( |
…oSelect Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
Merged latest What I did: The branch was 5 commits behind The failing check ( The other red check, If |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Explanation of Change
In Search, a deleted (trashed) transaction has no openable report — its only meaningful row interaction is toggling its selection checkbox. However, a press on the row body was routed to the navigation handler instead of the selection toggle:
TransactionGroupListExpanded),handleOnPressonly toggled selection whenisMobileSelectionModeEnabledwas true; otherwise it calledopenReportInRHP, which dead-ends for a trashed transaction.TransactionListItemWide/TransactionListItemNarrow), the deleted-row guard only short-circuited whencanSelectMultiplewas false. On desktop web (canSelectMultipleis true) the press fell through toonSelectRow, which can only navigate — and there is no report to open for a trashed expense, so the tap appeared to do nothing.This change routes a row press on a deleted/pending-delete transaction to the existing selection handler (
onSelectionButtonPress/onCheckboxPress, both wired totoggleTransaction) when multi-select is available, so tapping the row behaves the same as tapping its checkbox. Non-deleted rows still open via navigation, and a deleted row with multi-select off remains inert.Fixed Issues
$ #93561
PROPOSAL: #93561 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
// Please describe what tests you performed that validates your changed worked.
group-by:from status:deletedin the search input.Offline tests
Selection is in-memory state only with no API dependency, so the row-press toggle works the same offline.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
group-by:from status:deletedin the search input.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari