Skip to content
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

[HOLD for payment 2023-09-06] [HOLD for payment 2023-09-04] [$1000] cursor should display as disabled on select all checkbox even if only non removable members are present #25859

Closed
1 of 6 tasks
kavimuru opened this issue Aug 24, 2023 · 49 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Aug 24, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. go to Settings > Workspaces
  2. click on new workspace button
  3. go to members
  4. hover on select all checkbox

Expected Result:

cursor should be display as disabled because there the member is admin

Actual Result:

cursor does not display as disabled

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.57-1
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-08-23.at.1.48.28.PM.mov
Recording.1502.mp4

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692778734596109

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e6456f8777d856ec
  • Upwork Job ID: 1694799760529616896
  • Last Price Increase: 2023-08-24
@kavimuru kavimuru added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 24, 2023
@c3024
Copy link
Contributor

c3024 commented Aug 24, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Checkbox does not show disabled cursor when there are no eligible members to be selected

What is the root cause of that problem?

PR #22622 moved the checkbox and select all into the SelectionList but the logic of disabling these was missed which was present in earlier page like this

disabled={_.isEmpty(removableMembers)}

What changes do you think we should make in order to solve the problem?

We pass

disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}

for this Pressable and the following Checkbox

What alternative solutions did you explore? (Optional)

We may use the old logic like this
We should pass a prop called disabled to the SelectionList and use it in the Pressable and Checkbox like this.
Add this in WorkspaceMembersPage simlar to the logic in the earlier page.

let removableMembers = {};
    _.each(data, (memberOption) => {
        const member = props.personalDetails[memberOption.keyForList];
        if (member.accountID === props.session.accountID || member.login === props.policy.owner || member.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {
            return;
        }
        removableMembers[member.accountID] = member;
    });

and pass

disabled={_.isEmpty(removableMembers)}

here


and add default prop

disabled = false

here

function BaseSelectionList({

and add

disabled = {disabled}

here


and here

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

Triggered auto assignment to @joekaufmanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

Triggered auto assignment to @aldo-expensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@c3024
Copy link
Contributor

c3024 commented Aug 24, 2023

PR #22622 moved the checkbox and select all into the SelectionList but the logic of disabling these was missed.
We need to add

disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}

to the Pressable and CheckBox.
Detailed proposal here

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

📣 @UsamaPLUTON! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@UsamaPLUTON
Copy link

image

@UsamaPLUTON
Copy link

85.vendors.chunk.js:1 with non-plain text contents is unsupported by type to select for accessibility. Please add a textValue prop.
i.getCollectionNode @ 85.vendors.chunk.js:1
Show 1 more frame
Show less
23670.vendors.chunk.js:1 An aria-label or aria-labelledby prop is required for accessibility.
(anonymous) @ 3670.vendors.chunk.js:1
Show 1 more frame
Show less
285.vendors.chunk.js:1 with non-plain text contents is unsupported by type to select for accessibility. Please add a textValue prop.
i.getCollectionNode @ 85.vendors.chunk.js:1
Show 1 more frame
Show less
3670.vendors.chunk.js:1 An aria-label or aria-labelledby prop is required for accessibility.
(anonymous) @ 3670.vendors.chunk.js:1
Show 1 more frame
Show less
85.vendors.chunk.js:1 with non-plain text contents is unsupported by type to select for accessibility. Please add a textValue prop.
i.getCollectionNode @ 85.vendors.chunk.js:1
Show 1 more frame
Show less
33670.vendors.chunk.js:1 An aria-label or aria-labelledby prop is required for accessibility.

@kavimuru kavimuru changed the title cursor should display as disabled on select all checkbox even if only non remoavable members are prosent cursor should display as disabled on select all checkbox even if only non removable members are present Aug 24, 2023
@joekaufmanexpensify
Copy link
Contributor

@aldo-expensify could you please confirm whether this should actually be a deploy blocker?

@roryabraham
Copy link
Contributor

I do kind of think that this should be a deploy blocker, seems like a legit regression that it would be better not to ship. It has a negative impact on UX if you can't click on something and it's unclear why.

IMO the UX should be:

  • Allow the user to select all, no matter what
  • If they select a workspace admin, disable the Remove button and add a tooltip over it that says "You can't remove admins from this workspace"

@UsamaPLUTON
Copy link

UsamaPLUTON commented Aug 24, 2023 via email

@aldo-expensify
Copy link
Contributor

IMO the UX should be:

  • Allow the user to select all, no matter what
  • If they select a workspace admin, disable the Remove button and add a tooltip over it that says "You can't remove admins from this workspace"

Do tooltip work for mobile? Do they appear on tap?

@roryabraham
Copy link
Contributor

Do tooltip work for mobile?

No, they don't. So I guess we could use message somewhere else in the UI as well

@aldo-expensify
Copy link
Contributor

As far as I know, the usual approach for form is that we don't disable the button and we allow the user to click it, then we display an error on click.

Why are we aiming for a different approach? maybe we should do that?

@c3024
Copy link
Contributor

c3024 commented Aug 24, 2023

Isn't just disabling them enough? If Select all is disabled all the options below are also disabled. That would make it clear enough I guess. Is another specific message/error/tooltip necessary?

@aldo-expensify
Copy link
Contributor

Isn't just disabling them enough? If Select all is disabled all the options below are also disabled. That would make it clear enough I guess. Is another specific message/error/tooltip necessary?

hmm that makes sense to me, without talking about admins or not admins, if all options are disabled, it makes sense to disable "Select all"

@aldo-expensify
Copy link
Contributor

@c3024 can you implement your proposal?

@c3024
Copy link
Contributor

c3024 commented Aug 24, 2023

Yes, making the PR right away.

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 28, 2023
@melvin-bot

This comment was marked as duplicate.

@melvin-bot

This comment was marked as duplicate.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Aug 30, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-09-04] [$1000] cursor should display as disabled on select all checkbox even if only non removable members are present [HOLD for payment 2023-09-06] [HOLD for payment 2023-09-04] [$1000] cursor should display as disabled on select all checkbox even if only non removable members are present Aug 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.58-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-09-06. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Sep 4, 2023
@joekaufmanexpensify joekaufmanexpensify added Daily KSv2 and removed Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 4, 2023
@joekaufmanexpensify
Copy link
Contributor

@aldo-expensify / @c3024 mind completing the BZ checklist here so we can prep to issue payment?

@c3024
Copy link
Contributor

c3024 commented Sep 4, 2023

[@c3024] Determine if we should create a regression test for this bug.
[@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

This fix is for showing the disabled cursor for the 'Select All' and 'Checkbox'. When there are no select-able options, clicking on the checkbox/'Select All' did not toggle the checkbox nor selected any of the following options even before this fix as well.
Since, this is about fixing only the appearance of disabled cursor on hovering the checkbox and 'Select All', I think this does not require a regression test.

@joekaufmanexpensify
Copy link
Contributor

@c3024 thanks!

@joekaufmanexpensify
Copy link
Contributor

@aldo-expensify could you please complete your portion too when you have a sec?

@joekaufmanexpensify
Copy link
Contributor

Once the checklist is complete, we need to issue the following payments here:

@joekaufmanexpensify
Copy link
Contributor

@c3024 offer sent for $1,000! ($500 will be issued as bonus).

@aldo-expensify
Copy link
Contributor

Completed bugzero checklist

@c3024
Copy link
Contributor

c3024 commented Sep 6, 2023

Thanks. Accepted the offer @joekaufmanexpensify

@joekaufmanexpensify
Copy link
Contributor

BZ checklist complete, all set to issue payment!

@joekaufmanexpensify
Copy link
Contributor

@c3024 $1,500 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@gadhiyamanan $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants