Closed kavimuru closed 1 year ago
Triggered auto assignment to @arielgreen (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are โ
)Reproducible.
Job added to Upwork: https://www.upwork.com/jobs/~010c6b32476cf961bc
Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
Triggered auto assignment to @marcaaron (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Same issue here.
The Picker component on mobile web and mobile native shows inconsistent behavior in displaying the green bottom border indicator.
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.
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:
https://user-images.githubusercontent.com/1311325/222307120-e92559c0-ae60-4e0e-80ba-f8cb7be1d9e3.mp4
onClick
-> setState({isOpen: true})
onValueChange
-> setState({isOpen: false})
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.
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.
๐ฃ @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 ๐
@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.
Yeah, this is an interesting one. I think I agree with @redstar504's proposal though to remove the "focus" feeling after something is picked.
Ok cool sounds good to me. Let's go with the O.G. proposal. Thanks all.
@thesahindia @daraksha-dk @redstar504
offers sent in Upwork
@redstar504, @marcaaron, @arielgreen, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!
Solution is on staging now - just waiting for it to hit production.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.85-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-03-23. :confetti_ball:
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:
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:
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.
@marcaaron @thesahindia please see and complete checklist
It wasn't a regression so we can skip the first three items.
Let's just add the regression steps
Regression test proposal
It wasn't a regression so we can skip the first three items.
๐
Excellent, we are good to close then.
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:
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?
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:
https://user-images.githubusercontent.com/43996225/221579483-aab7a1f8-0181-42b6-bf90-6465848868e0.mp4
https://user-images.githubusercontent.com/43996225/221579538-8a836cfc-a657-46ec-9789-d6896fb08e91.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