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

[CHECKLIST] [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted #48543

Closed
2 of 6 tasks
IuliiaHerets opened this issue Sep 4, 2024 · 19 comments
Closed
2 of 6 tasks
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 Sep 4, 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.29-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch New Expensify app.
  2. Go to Search.
  3. Tap Expenses dropdown button.

Expected Result:

The selected option will be highlighted.

Actual Result:

The selected option is not highlighted.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6592419_1725416489226.ScreenRecording_09-04-2024_10-19-14_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0107ad6c6463841aef
  • Upwork Job ID: 1831310673079177453
  • Last Price Increase: 2024-09-04
  • Automatic offers:
    • ikevin127 | Reviewer | 103915892
Issue OwnerCurrent Issue Owner: @ikevin127
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

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

Copy link

melvin-bot bot commented Sep 4, 2024

Triggered auto assignment to @garrettmknight (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.

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

github-actions bot commented Sep 4, 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.

@lakchote
Copy link
Contributor

lakchote commented Sep 4, 2024

Not a blocker as it's a styling issue, rather than a functionality issue.

Putting the external label, as contributors can solve this.

@lakchote lakchote added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 4, 2024
@melvin-bot melvin-bot bot changed the title Android & iOS - Search - Selected option is not highlighted [$250] Android & iOS - Search - Selected option is not highlighted Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

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

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

melvin-bot bot commented Sep 4, 2024

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

@bernhardoj
Copy link
Contributor

bernhardoj commented Sep 4, 2024

Edited by proposal-police: This proposal was edited at 2024-09-04 12:56:31 UTC.

Proposal

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

Selected search type option isn't highlighted.

What is the root cause of that problem?

We recently added the highlighted background in this commit which requires the item to be selected.

style={{backgroundColor: item.isSelected ? theme.activeComponentBG : undefined}}

However, we never pass the isSelected property.

const popoverMenuItems = typeMenuItems.map((item, index) => {
const isSelected = title ? false : index === activeItemIndex;
return {
text: item.title,
onSelected: singleExecution(() => Navigation.navigate(item.route)),
icon: item.icon,
iconFill: isSelected ? theme.iconSuccessFill : theme.icon,
iconRight: Expensicons.Checkmark,
shouldShowRightIcon: isSelected,
success: isSelected,
containerStyle: isSelected ? [{backgroundColor: theme.border}] : undefined,
};
});

The style passed will be combined with the combinedStyle array.

const combinedStyle = [styles.popoverMenuItem, style];

It will then be used as the pressable style.

style={({pressed}) =>
[
containerStyle,
combinedStyle,

Notice that combinedStyle is put after containerStyle, so it'll override the containerStyle. In our case, we already set the highlighted background when the item is selected through containerStyle.

containerStyle: isSelected ? [{backgroundColor: theme.border}] : undefined,

But because we started to pass the highlighted background from style, the background color is overridden.

[{backgroundColor: theme.border}], // containerStyle
[{backgroundColor: undefined}], // combinedStyle

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

Pass isSelected to the object. (pass it here too)

return {
    ...,
    isSelected,

OR

Only apply the background-color style if isSelected is true.

style={{backgroundColor: item.isSelected ? theme.activeComponentBG : undefined}}

style={item.isSelected ? {backgroundColor: theme.activeComponentBG} : {}}

@ikevin127
Copy link
Contributor

Thanks for the detailed RCA! @bernhardoj's updated proposal looks good to me. The RCA is correct and I think the first solution of passing isSelected to the objects makes more sense.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 5, 2024

Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Sep 9, 2024

@garrettmknight, @lakchote, @ikevin127 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@ikevin127
Copy link
Contributor

@lakchote For reviewed proposal assignment.

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@lakchote
Copy link
Contributor

Thanks for your review @ikevin127.

@bernhardoj's proposal LGTM

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 12, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @ikevin127

@ikevin127
Copy link
Contributor

⚠️ Automation failed here -> this should be on [HOLD for Payment 2024-09-23] according to 2 days ago's production deploy from #49058 (comment).

cc @garrettmknight

@luacmartins luacmartins changed the title [$250] Android & iOS - Search - Selected option is not highlighted [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted Sep 19, 2024
@garrettmknight garrettmknight changed the title [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted [HOLD for Payment 2024-09-23] [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted Sep 19, 2024
@garrettmknight garrettmknight added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 19, 2024
@garrettmknight
Copy link
Contributor

garrettmknight commented Sep 23, 2024

Payment Summary:

@ikevin127 can you complete the checklist?

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Sep 23, 2024
@garrettmknight garrettmknight changed the title [HOLD for Payment 2024-09-23] [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted [CHECKLIST] [$250] Android & iOS - [Search v2.1] - Selected option is not highlighted Sep 23, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@ikevin127
Copy link
Contributor

Regression Test Proposal

  1. Open the Search page.
  2. Press the search type button.
  3. Verify that the selected type is highlighted.

Native / mWeb Only (narrow layout)

  1. Open the filter page and apply any filter.
  2. Press the search type button again.
  3. Verify that the filter text menu item is highlighted.

Do we agree 👍 or 👎.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Sep 26, 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
Archived in project
Development

No branches or pull requests

6 participants