-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Search v1] Add bulk actions #44385
[Search v1] Add bulk actions #44385
Conversation
@WojtekBoman FYI the PR for |
👋 @WojtekBoman how are you getting on here? Just a heads up that the basic CSV export project is a critical deliverable for GBTA (conference) on July 22nd. As the work to add the selection checkboxes to the Search page has begun with this PR, it's now effectively a blocker to getting that project complete before the conference. We're starting on imp today, and @rlinoz will work on the backend in the meantime, but it would be good to clear this dependency ASAP. |
@WojtekBoman given this is a blocker and the hold/unhold commands are not ready yet. Let's implement only Delete for now and we add hold/unhold as a follow up |
Great idea! |
@DylanDylann 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] |
@luacmartins I don't know if we should address these 2 cases. If so, could we create followups and merge this PR? I'll be OOO from 03.07 to 08.07 and wouldn't like to hold CSV export. |
Yea, I think addressing them as follow ups is fine. That being said, I'm unsure if we need to address them too. I think yes for the delete confirm modal, but no for the scroll checkbox issue. |
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.
Left a few comments. I'll get this PR merged since none of them are blockers. Let's address them in a follow up though!
value: CONST.SEARCH.BULK_ACTION_TYPES.HOLD, | ||
onSelected: () => { | ||
clearSelectedItems?.(); | ||
SearchActions.holdMoneyRequestOnSearch(hash, itemsToHold, ''); |
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.
We'll still need to redirect the user to the reason page. Maybe that's something that @Kicu can address in his PR?
src/components/Search/index.tsx
Outdated
return ( | ||
<> | ||
<SearchPageHeader | ||
selectedItems={{}} |
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.
Could we just add a default to the component prop instead of passing this empty object? This just looks odd.
src/components/Search/index.tsx
Outdated
return ( | ||
<> | ||
<SearchPageHeader | ||
selectedItems={{}} |
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.
Same here
@WojtekBoman we have conflicts |
Solved :) |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
I will go over this PR and address any followups required in a separate PR |
@luacmartins about this:
Here is a small possibile future issue that I would like to discuss. Right now when displaying the Reason modal for 1 hold, we pass the However if we also want to display the same modal for bulk actions, then there is no limit to the amount of transactions a user can check. If we continue to pass them, we would have to change url to something like: Any other way of handling this would have to involve onyx I guess, where we save the selection in onyx, navigate to RHP hold reason page and then read from onyx. I would like for this RHP screen for Hold to work the same whether it's 1 transaction or bulk transactions, so I think I would create a new PR for this tomorrow, once we agree on a solution. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.4-0 🚀
|
@Kicu that's an issue and I agree that we should use the same page for all these actions. I think we could either go the Onyx route or React context to keep this in state since it doesn't really need to be persisted. Maybe creating a hook for it would be good, e.g. |
🚀 Cherry-picked to staging by https://github.com/tgolen in version: 9.0.4-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
showItemHeaderOnNarrowLayout={false} | ||
containerStyle={styles.mt3} | ||
isChildListItem | ||
isDisabled={!!isDisabled} | ||
canSelectMultiple={!!canSelectMultiple} | ||
isButtonSelected={item.isSelected} |
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.
there was a design issue Individually selected expense rows in grouped reports don't have a background color applied to them, we fixed it #45384 by checking transaction.isSelected
instead of item.isSelected
Details
This PR adds support for bulk actions in the Search tab.
Screen.Recording.2024-07-01.at.17.33.55.mov
Fixed Issues
$ #39887
PROPOSAL:
Tests
Offline tests
QA Steps
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
This functionality is only supported on wide screen.
MacOS: Chrome / Safari
Screen.Recording.2024-07-01.at.17.33.55.mov
MacOS: Desktop
Screen.Recording.2024-07-02.at.17.04.12.mov