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

[PAID] [$250] Expense - Disabled category when selected is not highlighted #52259

Closed
8 tasks done
IuliiaHerets opened this issue Nov 8, 2024 · 26 comments
Closed
8 tasks done
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

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 8, 2024

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


Version Number: 9.0.59-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): applausetester+kh271000026@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit an expense with category.
  4. Go to workspace settings > Categories.
  5. Disable all the categories.
  6. Go to workspace chat.
  7. Go to the transaction thread (from Step 3).
  8. Click Category.

Expected Result:

The disabled category when selected should be highlighted (production behavior).

Actual Result:

The disabled category when selected is not highlighted.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6658843_1731071204219.20241108_210046.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854920252783122362
  • Upwork Job ID: 1854920252783122362
  • Last Price Increase: 2024-11-08
  • Automatic offers:
    • rayane-djouah | Contributor | 104839950
Issue OwnerCurrent Issue Owner: @strepanier03
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Nov 8, 2024
Copy link

melvin-bot bot commented Nov 8, 2024

Triggered auto assignment to @flodnv (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Nov 8, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Nov 8, 2024

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Nov 8, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

👋 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.

@flodnv flodnv added the External Added to denote the issue can be worked on by a contributor label Nov 8, 2024
@melvin-bot melvin-bot bot changed the title Expense - Disabled category when selected is not highlighted [$250] Expense - Disabled category when selected is not highlighted Nov 8, 2024
Copy link

melvin-bot bot commented Nov 8, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021854920252783122362

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 8, 2024
Copy link

melvin-bot bot commented Nov 8, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

@MuaazArshad
Copy link
Contributor

Proposal

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

Expense - Disabled category when selected is not highlighted

What is the root cause of that problem?

We are getting undefined for the disabled category as we are checking for disabled first.

App/src/styles/utils/index.ts

Lines 1122 to 1136 in 346bb37

function getItemBackgroundColorStyle(isSelected: boolean, isFocused: boolean, isDisabled: boolean, selectedBG: string, focusedBG: string): ViewStyle {
let backgroundColor;
if (isDisabled) {
backgroundColor = undefined;
} else if (isSelected) {
backgroundColor = selectedBG;
} else if (isFocused) {
backgroundColor = focusedBG;
}
return {
backgroundColor,
};
}

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

We should check for selected before checking for disabled like this

if (isSelected) {
        backgroundColor = selectedBG;
    } else if (isFocused) {
        backgroundColor = focusedBG;
    } else if (isDisabled) {
        backgroundColor = undefined;
    }

or like this

if (isSelected) {
        backgroundColor = selectedBG;
    }  else if (isDisabled) {
        backgroundColor = undefined;
    } else if (isFocused) {
        backgroundColor = focusedBG;
    }

What alternative solutions did you explore? (Optional)

@shubham1206agra
Copy link
Contributor

@MuaazArshad Please mark the offending PR.

@MuaazArshad
Copy link
Contributor

This PR handled the case for disabled background color #51988

@luacmartins
Copy link
Contributor

@MuaazArshad please make sure that your proposal doesn't break this case

@MuaazArshad
Copy link
Contributor

My proposal's alternative doesn't break the given case.

@luacmartins
Copy link
Contributor

@MuaazArshad are you available to work on the PR now?

@MuaazArshad
Copy link
Contributor

Yes

@melvin-bot melvin-bot bot added the Weekly KSv2 label Nov 8, 2024
@MuaazArshad
Copy link
Contributor

PR is ready for review

@rayane-djouah
Copy link
Contributor

Commenting for assignment (coming from https://expensify.slack.com/archives/C02NK2DQWUX/p1731283515036059)

Copy link

melvin-bot bot commented Nov 11, 2024

📣 @rayane-djouah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Nov 11, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 11, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - Disabled category when selected is not highlighted [HOLD for payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.59-3 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 2024-11-18. 🎊

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

Copy link

melvin-bot bot commented Nov 11, 2024

@rayane-djouah @strepanier03 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted [HOLD for payment 2024-11-20] [HOLD for payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted Nov 13, 2024
Copy link

melvin-bot bot commented Nov 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-3 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 2024-11-20. 🎊

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

Copy link

melvin-bot bot commented Nov 13, 2024

@rayane-djouah @strepanier03 @rayane-djouah The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Nov 15, 2024

BugZero Checklist:

  • Classify the bug:

    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: https://github.com/Expensify/App/pull/51988/files#r1844657870

  • If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • @strepanier03 Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue: https://github.com/Expensify/Expensify/issues/445572

Regression Test Proposal

#### Precondition:
- A workspace has been created.

#### Test:

1. Go to workspace chat.
2. Submit an expense with a category.
3. Go to workspace settings > Categories.
4. Disable all the categories.
5. Go to workspace chat.
6. Go to the transaction thread (from Step 3).
7. Click Category.
8. Verify that the disabled category when selected is highlighted.

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 18, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-11-20] [HOLD for payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted [Payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted Nov 18, 2024
@strepanier03
Copy link
Contributor

@rayane-djouah - Thanks for the checklist! I've paid and closed the contract for you in Upwork.

@MuaazArshad - I have sent you an offer, I'll check again later today to see if I can pay it.

@MuaazArshad
Copy link
Contributor

Thank you. I have accepted the offer.

@strepanier03
Copy link
Contributor

Thanks @MuaazArshad - I've paid and closed your contract. 👋

@strepanier03 strepanier03 changed the title [Payment 2024-11-18] [$250] Expense - Disabled category when selected is not highlighted [PAID] [$250] Expense - Disabled category when selected is not highlighted Nov 19, 2024
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

8 participants