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-03-23] [$1000] Inconsistency while selecting dropdown in mWeb and Android #15506

Closed
1 of 6 tasks
kavimuru opened this issue Feb 27, 2023 · 27 comments
Closed
1 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 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Feb 27, 2023

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 app in Android
  2. Navigate to Settings > Workspaces > Select any workspace
  3. Reimburse expenses
  4. Click on Unit Input
  5. Do the exact same steps for mWeb
  6. Notice that the dropdown input's border gets green when focused in mWeb but in Android this only happens when we click on the input

Expected Result:

Behavior should be consistent.

Actual Result:

The behavior of the field isn't consistent

Workaround:

unknown

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.2.76-7
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:

dropdown-test.mp4
az_recorder_20230227_083804.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1677253047142869

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010c6b32476cf961bc
  • Upwork Job ID: 1631088899411161088
  • Last Price Increase: 2023-03-02
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 27, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 27, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Feb 27, 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

@melvin-bot melvin-bot bot added the Overdue label Mar 1, 2023
@arielgreen
Copy link
Contributor

Reproducible.

@melvin-bot melvin-bot bot removed the Overdue label Mar 2, 2023
@arielgreen arielgreen added the External Added to denote the issue can be worked on by a contributor label Mar 2, 2023
@melvin-bot melvin-bot bot unlocked this conversation Mar 2, 2023
@melvin-bot melvin-bot bot changed the title Inconsistency while selecting dropdown in mWeb and Android [$1000] Inconsistency while selecting dropdown in mWeb and Android Mar 2, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 2, 2023
@MelvinBot
Copy link

Triggered auto assignment to @marcaaron (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@bernhardoj
Copy link
Contributor

Same issue here.

@redstar504
Copy link
Contributor

redstar504 commented Mar 2, 2023

Proposal

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

The Picker component on mobile web and mobile native shows inconsistent behavior in displaying the green bottom border indicator.

What is the root cause of that problem?

The isOpen state of the Picker component changes the border color, but the events that trigger the state change are different for mobile web and mobile native. The onClose event only supports mobile native, whereas the implemented events that apply to mobile web are onFocus and onBlur. Since picking an item does not blur the Picker element, the border does not change back to its original color.

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

To fix this issue, we need to add additional events to the Picker component to achieve the intended behavior on mobile web. We can disable the green border when a picker item is selected by adding additional logic for changing the isOpen state through onValueChange and onClick events. After manipulating the state using these events, the indicator functions as expected on mobile web:

android_chrome.mp4

As demonstrated above:

onClick -> setState({isOpen: true})
onValueChange -> setState({isOpen: false})

What alternative solutions did you explore? (Optional)

Another option might be to blur the picker in onValueChange. To achieve this we would have to use a ref since onValueChange does not emit an event. The implementation of the Picker is different on each platform (ie. Android uses a TextInput and Web uses a <select> element, so we would have to be sure to blur the right target.

@thesahindia
Copy link
Member

The solution sounds good to me!

C+ reviewed 🎀👀🎀

cc: @marcaaron

@marcaaron
Copy link
Contributor

Ah, is it me or is it debatable which behavior is correct? The proposal sounds good though I am unsure which is the preferred direction to go here.

Would making a selection not return the focus to the field itself? Can native match the behavior that mobile web has?

Curious to get @shawnborton's take here. I think we can hire @redstar504 for this one. Though - I would like to get some consensus on the correct behavior first if we can.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 2, 2023
@MelvinBot
Copy link

📣 @redstar504 You have been assigned to this job by @marcaaron!
Please apply to this job in Upwork 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 📖

@redstar504
Copy link
Contributor

redstar504 commented Mar 2, 2023

@marcaaron Thank you. I debated that as well when digging into this. The existing logic seemed to lean towards changing the colour back when the picker is closed. I am not sure it provides much benefit to the user to keep the field highlighted after they have chosen an option and moved on.

@shawnborton
Copy link
Contributor

Yeah, this is an interesting one. I think I agree with @redstar504's proposal though to remove the "focus" feeling after something is picked.

@marcaaron
Copy link
Contributor

Ok cool sounds good to me. Let's go with the O.G. proposal. Thanks all.

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Mar 6, 2023
@arielgreen
Copy link
Contributor

@thesahindia @daraksha-dk @redstar504

offers sent in Upwork

@MelvinBot
Copy link

@redstar504, @marcaaron, @arielgreen, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

@marcaaron
Copy link
Contributor

Solution is on staging now - just waiting for it to hit production.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 16, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Inconsistency while selecting dropdown in mWeb and Android [HOLD for payment 2023-03-23] [$1000] Inconsistency while selecting dropdown in mWeb and Android Mar 16, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 16, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.85-1 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-03-23. 🎊

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.

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

@MelvinBot
Copy link

MelvinBot commented Mar 16, 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:

  • [@thesahindia / @marcaaron] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia / @marcaaron] 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:
  • [@thesahindia / @marcaaron] A discussion in #expensify-bugs 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:
  • @arielgreen Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 22, 2023
@arielgreen
Copy link
Contributor

Calculating bonus:
2/2/23 - contributor assigned to issue
2/15/23 - PR merged - 9 business days - no bonus/no penalty

$250 to @daraksha-dk
$1000 to @redstar504
$1000 to @thesahindia

Issuing payments now

@arielgreen
Copy link
Contributor

@marcaaron @thesahindia please see and complete checklist

@thesahindia
Copy link
Member

It wasn't a regression so we can skip the first three items.

Let's just add the regression steps

Regression test proposal

  1. Go to setting > Workspaces
  2. Select any workspace > General settings
  3. Open the currency selector > Select a different value
  4. Verify the picker is not highlighted after it gets closed

@melvin-bot melvin-bot bot added the Overdue label Mar 27, 2023
@marcaaron
Copy link
Contributor

It wasn't a regression so we can skip the first three items.

👍

@melvin-bot melvin-bot bot removed the Overdue label Mar 27, 2023
@arielgreen
Copy link
Contributor

Excellent, we are good to close then.

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants