App icon indicating copy to clipboard operation
App copied to clipboard

Label is overlapping with date selector

Open isagoico opened this issue 5 years ago • 6 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Start Bank setup flow
  2. Reach a step that requires entering a date

Expected Result:

Selector and label should not overlap

Actual Result:

Selector and label are overlapping

Workaround:

None needed, visual issue.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: Main build

Reproducible in staging?: No, issue is in Main Reproducible in production?: No

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

Issue reported by: @marcaaron Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1633367592384900

View all open jobs on GitHub

isagoico avatar Oct 04 '21 18:10 isagoico

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Oct 04 '21 18:10 MelvinBot

It looks like this is fixed on the latest main branch for me. I know @marcaaron mentioned it was happening for you on main can you confirm if it's fixed now?

image

TomatoToaster avatar Oct 04 '21 20:10 TomatoToaster

I know @marcaaron mentioned it was happening for you on main can you confirm if it's fixed now?

1000% still happening. Try using a mobile user agent in Safari or Chrome?

2021-10-04_11-13-39

marcaaron avatar Oct 04 '21 21:10 marcaaron

Try using a mobile user agent in Safari or Chrome?

Although it would reproduce the bug, the datepicker would not be rendered like that on the actual Safari on an iPhone

The bug is related to the browser window width. It would only happen if you intentionally use too small width on a desktop browser

On the actual mobile browser the field is rendered like this image

image

To reproduce the bug shrink the browser window to be less than 800px

kidroca avatar Oct 04 '21 21:10 kidroca

The content mm/dd/yyyy is rendered only on desktop and web. It's special content (not a value or a placeholder), rendered for native date inputs (input type=date) image On these platforms the user has the option to input the date by typing (or using arrows, mouse scroll, as well as from a picker popup)

On mobile web - users are presented with a picker after they focus a date field. They can't input the date by typing so they don't see a date pattern hint inside the field


The implementation for the DatePicker tries to render the label in the active state when we're on a larger screen https://github.com/Expensify/App/blob/817240d823d4872a4fff7034567d01994b6f1264/src/components/DatePicker/index.js#L76-L78

I have searched and haven't found a way to know that a pattern like mm/dd/yyyy would be displayed besides knowing that if we don't have a value and we're on desktop the patter will be displayed so we need to move up the label

IMO we have a few options:

  1. The web/desktop picker might be re-implemented: https://expensify.slack.com/archives/C01GTK53T8Q/p1633013785293700 if we're not using input type=date this won't be a problem or will be handled differently
  2. Change the test for forceActiveLabel to be based on the current device supporting touches. We assume a touch based device is mobile
  3. Always render the label moved up - forceActiveLabel=true for the DatePickers

kidroca avatar Oct 04 '21 22:10 kidroca

Ok I think we should probably just do nothing because as you pointed out this really only affects mobile web browsers IN a desktop platform. That's not really going to affect anyone except us when we're testing this locally.

With the new web/desktop picker hopefully that works nicely on small screen widths. I think this is safe to close.

TomatoToaster avatar Oct 04 '21 23:10 TomatoToaster