Skip to content

[HOLD for payment 2023-06-19] [$1000] Checkbox border turns green once another window is opened and revert back #18801

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the Settings menu.
  2. Click on " Workspaces."
  3. Open any Workspace.
  4. Select "Manage Members."
  5. Click "Select all."
  6. In the presence of admin only as a member observe the checkbox, green border appears for a fraction of second, when clicked.
  7. Open another window and observe the checkbox border turns green permanently till clicked again.

Expected Result:

The checkbox should always have a white border when the admin is the only member present, as the admin cannot be selected when using the "Select all" option.

Actual Result:

The border of checkbox "Select all" turns green once another window is opened and reverted back.

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.13.0
Reproducible in staging?: y
Reproducible in production?: y
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

Bug.1.mp4
Recording.560.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f763eb9e34751150
  • Upwork Job ID: 1659525973736022016
  • Last Price Increase: 2023-06-02

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 11, 2023
  2. melvin-bot commented on May 11, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 11, 2023

    @melvin-bot

    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
  4. allroundexperts commented on May 11, 2023

    @allroundexperts
    Contributor

    Proposal

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

    Checkbox border turns green once focus is shifted back to window

    What is the root cause of that problem?

    When we un-select the checkbox, we're simply calling onBlur function here. This function just sets the state to be false, which in turn removes the green border. The element itself is actually still focused and when the window becomes active again (after a blur), the onFocus handler of the Pressable component kicks in since the checkbox never went out of focus.

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

    We need to take the ref of the Checkbox and call the blur method here. This will not only change the blur state of the Checkbox to be false, but will also remove the focus from the Checkbox.

    What alternative solutions did you explore? (Optional)

    None

  5. hungvu193 commented on May 12, 2023

    @hungvu193
    Contributor

    This is decided is not a bug here: #11283 (comment)
    cc @parasharrajat

  6. parasharrajat commented on May 12, 2023

    @parasharrajat
    Member

    Yes, not a big deal. We can close this.

  7. allroundexperts commented on May 12, 2023

    @allroundexperts
    Contributor

    Yes, not a big deal. We can close this.

    @parasharrajat It might not be something of a higher priority, but this IS a bug IMO.

  8. parasharrajat commented on May 12, 2023

    @parasharrajat
    Member

    Why do you think this is a bug? When you move to focus back to the old tab, the browser focuses on the previously active element for A11Y. It is the same as pressing the Tab key to highlight an element.

    This is not a bug but a feature.

  9. allroundexperts commented on May 12, 2023

    @allroundexperts
    Contributor

    Why do you think this is a bug? When you move to focus back to the old tab, the browser focuses on the previously active element for A11Y. It is the same as pressing the Tab key to highlight an element.

    This is not a bug but a feature.

    @parasharrajat If the element was active previously, then IT should have the green border prior to the tab switching as well.

  10. allroundexperts commented on May 12, 2023

    @allroundexperts
    Contributor

    This is happening with CheckBox only. See what happens for Radio Inputs.

    Screen.Recording.2023-05-12.at.3.22.18.PM.mov
  11. parasharrajat commented on May 12, 2023

    @parasharrajat
    Member

    This does not answer my question but repel it. Even does not align with your proposal where you are trying to remove the focus #18801 (comment).

  12. allroundexperts commented on May 12, 2023

    @allroundexperts
    Contributor

    This does not answer my question but repel it. Even does not align with your proposal where you are trying to remove the focus #18801 (comment).

    I mean, if you look at the code, you can clearly see that we're removing the focus styles without removing the actual focus. This is something that doesn't feel correct and is actually causing this inconsistency when compared with other components that we have in our App. Regardless of what I'm proposing, what makes it a bug IMO is that if an active element does not have a border before the tab switching, then it should not have a border after tab switching as well.

  13. parasharrajat commented on May 14, 2023

    @parasharrajat
    Member

    what makes it a bug IMO is that if an active element does not have a border before the tab switching, then it should not have a border after tab switching as well.

    Why? What is the reasoning behind this?

    I don't think we should be worrying about this issue at all. This is not worth solving. IMO, it gives an advantage to the user. When the user returns back to the App, they can easily see which element was last active. Also, this is browser-native behavior.

  14. 101 remaining items

  15. MariaHCD commented on Jun 21, 2023

    @MariaHCD
    Contributor

    Thanks, @grgia!

    So I think we'll need to fix the hardcoded color now. Thoughts, @bernhardoj @s77rt?

  16. s77rt commented on Jun 21, 2023

    @s77rt
    Member

    @MariaHCD At this point looks like we have nothing to do. We have this PR #20997 that applied this discussed solution i.e add padding. Except that they didn't change the border color. @shawnborton seems okay with that so looks we all set for now. (The green hardcoded is also removed since it's no longer used and the generic blue one is used instead - the blue color is still hard coded though)

  17. mallenexpensify commented on Jun 23, 2023

    @mallenexpensify
    Contributor

    I see a lot of conversation after the PR hit production, any reason I shouldn't pay everyone now? It's been over 7 days

  18. s77rt commented on Jun 23, 2023

    @s77rt
    Member

    I think it's ready for payment. No further action is required from our end. cc @MariaHCD can you please confirm the same

  19. mallenexpensify commented on Jun 23, 2023

    @mallenexpensify
    Contributor

    eeeeps, the old job closed. I was going to try to get this paid before the weekend.
    @usmantariq96, @bernhardoj , @s77rt , can you please accept the job and reply here once you have?
    https://www.upwork.com/jobs/~0161807157644d1613

  20. s77rt commented on Jun 24, 2023

    @s77rt
    Member
  21. usmantariq96 commented on Jun 24, 2023

    @usmantariq96

    @mallenexpensify offer accepted

  22. bernhardoj commented on Jun 24, 2023

    @bernhardoj
    Contributor
  23. MariaHCD commented on Jun 26, 2023

    @MariaHCD
    Contributor

    We have this PR #20997 that applied this discussed solution i.e add padding.

    Perfect, thanks! Yes, looks like we're good to close this out.

  24. mallenexpensify commented on Jun 26, 2023

    @mallenexpensify
    Contributor

    Thanks all, everyone is paid (inc. bonus for timeliness, I added this to our design guideline sheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions