-
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
Have "select all" only select visible members #15609
Conversation
@Santhosh-Sellavel @Luke9389 One of you needs to 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] |
OFF HOLD! Ready for review |
Fixed Issues (trying again as the PR wasn't linked to the issue the first time) |
Reviewer Checklist
Screenshots/VideosWeb & DesktopScreen.Recording.2023-03-17.at.12.25.17.AM.movMobile Web - Chrome & Mobile Web - SafariScreen.Recording.2023-03-17.at.12.32.59.AM.moviOS & AndroidScreen.Recording.2023-03-17.at.12.27.42.AM.mov |
policyMemberList = _.filter(_.keys(policyMemberList), policyMember => policyMemberList[policyMember].pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE); | ||
const removableMembers = _.without(policyMemberList, this.props.session.email, this.props.policy.owner); |
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.
Shouldn't we remove this because we already get only removableMembers
in memberList
list
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.
I left it as a sanity check to make sure no owners were incorrectly selected/unselected, but we can remove it and leave it only if the memberList is empty, if you feel strongly about it
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.
// If a memberList is provided, only select those members. Otherwise, select all the policy ones | ||
let policyMemberList = _.isEmpty(memberList) ? lodashGet(this.props, 'policyMemberList', {}) : memberList; | ||
|
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.
I'm not sure would why would we need this. There is a valid case where memberList
can be empty that's when the workspace has an owner alone. Getting value from the prop is unnecessary,
policyMemberList = _.filter(_.keys(policyMemberList), policyMember => policyMemberList[policyMember].pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE); | ||
const removableMembers = _.without(policyMemberList, this.props.session.email, this.props.policy.owner); |
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.
Bug:
Assuming No search text at start -> Select all -> Enter search text filter few users -> Press select toggle selection off -> Clear search Screen.Recording.2023-03-15.at.6.38.32.PM.mov@Gonals Thoughts on this, please? |
This is the expected behavior (step 7). We discussed it in the slack chat and decided we wanted this. Otherwise, it is really hard to "unselect" stuff from previous searchs |
Cool, it feels weird though but thanks for reconfirming it's not a bug! |
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.
LGTM tests well!
@Luke9389 Over to you!
@Santhosh-Sellavel @techievivek One of you needs to 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] |
@techievivek, over to you, as Luke left not long ago! |
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 code is much more simplified now, thanks. I just have a few NAB suggestions.
Comments addressed! |
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.
Thanks, merged 🎉
✋ 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/techievivek in version: 1.2.89-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.89-0 🚀
|
Details
Fixed Issues
$ #15487
Tests
some
(not all) the membersSelect all
. All visible members should get selected.Select All
should get unselected, but the previously selected members (and only them) should remain selected)Select All
should replace the existing list with the visible one, not add to it.Select All
should clear the list completely.Offline tests
None
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android