-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Prevent layout shift caused by the AddressSearch dropdown #6116
Comments
@Expensify/design is this something we should fix? |
Agree, the dropdown should be absolutely positioned on top of the other elements. Maybe we should even give it a bit of a shadow too to create some more visual separation as well. |
Thanks for confirming @shawnborton! I'm coming across an edge case when: The library we are using does not expose a way to limit the maximum number of results (so we always display 5 if there are enough matches). One suggestion that I have is to display the dropdown show above the input in those cases. Any thoughts here? |
Displaying above is interesting - how might that look on mobile? Are we able to get the text input to be focused and scrolled directly above the keyboard so that there is ample room for the results? |
Hmm my suggestion might have issues with shorter forms. If the form is short there isn't enough room for the dropdown above the input and we can't scroll, so the view is either cut at the bottom or at the top. Here's an example: Now I'm not too sure how to solve this one. Any ideas @shawnborton? |
Hmm the only thing I can think of is to always launch the form to the bottom of the input and try to scroll the input towards the top of the viewport as much as possible. |
Still not sure how to approach the edge cases here. I'm gonna try to come back to this one next week. |
Haven't made any progress here yet. I will try to look into it next week. |
I have a suggestion. 🐿️ 🤡 The issue with the approach we are exploring so far.
I think we should create a new screen for selecting the address and show the Address selector as it is on that screen.
|
I like that idea, it reminds me of how Google Maps handles adding in addresses for directions. |
Sounds like a good idea! I'll do some more thinking on how to handle the manual address input solution we are implementing. |
I will try to carve out some time to work on this issue this week! |
I actually discussed this 1:1 with @marcaaron. Since nothing is broken and the solution at hand is really involved and hard to maintain, we will just close this for now. |
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:
/bank-account/company
layoutshift.mov
Expected Result:
The form shouldn't shift.
Actual Result:
The form shifts.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround? Yes, layout only.
Platform:
Version Number:
Reproducible in staging?:
Reproducible in production?:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: