App icon indicating copy to clipboard operation
App copied to clipboard

[Paid] Placeholders are not vertically centered in text inputs

Open isagoico opened this issue 5 years ago β€’ 27 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. Navigate to staging.new.expensify.com
  2. Check the placeholders in text inputs

Expected Result:

Placeholder should be vertically centered in text input

Actual Result:

Placeholders are not vertically centered in text inputs

Workaround:

N/A, visual issue.

Platform:

Where is this issue occurring?

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

Version Number: 1.0.85-0

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

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @shawnborton https://expensify.slack.com/archives/C01GTK53T8Q/p1629099710369000

It looks like the placeholder label is not exactly vertically centered in the new text inputs

isagoico avatar Aug 16 '21 17:08 isagoico

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

MelvinBot avatar Aug 16 '21 17:08 MelvinBot

Proposal

Adding a value of 16 here for expensiTextInputLabel can fix this issue.

(Proposal after Triage)

thesahindia avatar Aug 16 '21 18:08 thesahindia

Proposal

As I mentioned before in Slack

We have to remove top style from expensiTextInputLabel.

Result: centered label

Screenshot_20210816-131405_New Expensify

kakajann avatar Aug 16 '21 23:08 kakajann

We have to remove top style from expensiTextInputLabel.

Hi, I think removing the property is not a good idea. I tried that and some UI issues appeared. image

Changing the value to from 14 to 16 has no such effect. image

thesahindia avatar Aug 17 '21 11:08 thesahindia

This looks like it has what it needs. Un-assigning myself and adding the External label.

joelbettner avatar Aug 18 '21 18:08 joelbettner

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

MelvinBot avatar Aug 18 '21 18:08 MelvinBot

Created a job in Upwork!

Internal: https://www.upwork.com/ab/applicants/1428832340082450432/job-details External: https://www.upwork.com/jobs/~014ccda5d494c2b148

marklouisdeshaun avatar Aug 20 '21 21:08 marklouisdeshaun

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

MelvinBot avatar Aug 20 '21 21:08 MelvinBot

UpWork Proposal

Using vertical-align can solve this problem. You center the box where is the placeholder. Or you can play with the box height to center it. line-height can be helpful too. Also adding padding top-bottom, for precision.

darienistornicolae avatar Aug 20 '21 23:08 darienistornicolae

Proposed Solution:

Basically when there is no focus it shows ExpensiTextInputLabel.js component. We need to update top value for expensiTextInputLabel style within src/styles/styles.js file. i.e. change top: 14 to top: 16 as under:

expensiTextInputLabel: {
...
    top: 16,
...
},

So now we moved inactive label default position 2 pt down, So to keep the active label (i.e. when focused) at the same position we have to set ACTIVE_LABEL_TRANSLATE_Y = -12 (at present it is -10) within src/components/ExpensiTextInput/BaseExpensiTextInput.js (line 12)

I updated both value as I suggested. Below are some screenshot for iOS, Web, and Mac Desktop. Also tested and attached android screenshot .

Web

4675-Web

Web - After Login UI

It will also correct input label position everywhere text input used. There is no side effect. Below is the screenshot where text input used after login. 4675-Web-Inner

iOS

iOS Desktop

macOS Desktop

macOS Desktop

Android 7.1.1

macOS Desktop

If my solution considered then kindly invite me on Upwork to submit proposal. I will do final testing, and submit pull request within 4 days once proposal accepted on Upwork.

My Upwork profile: https://www.upwork.com/freelancers/~01c718889ed7821f82

Best Regards, Prashant Mangukiya

PrashantMangukiya avatar Aug 21 '21 16:08 PrashantMangukiya

Nice, Yeah i like your proposal @PrashantMangukiya since its the most descriptive, you've tested it well and it looks good to me.

@marklouisdeshaun can you hire @PrashantMangukiya in upwork. @PrashantMangukiya feel free to create the PR.

chiragsalian avatar Aug 23 '21 18:08 chiragsalian

Hired in Upwork!

marklouisdeshaun avatar Aug 24 '21 22:08 marklouisdeshaun

Hi @marklouisdeshaun. Thanks for the job. I accepted it from Upwork. I am doing final testing and preparing for pull request. I will message via Upwork once PR submitted. Also @chiragsalian thanks for the comment.

PrashantMangukiya avatar Aug 25 '21 05:08 PrashantMangukiya

Hi @chiragsalian I submit pull request #4823 Kindly review it. If more action need from my side then kindly suggest me. This is my first pull request to expensify so please guide me if I missed something to submit.

PrashantMangukiya avatar Aug 25 '21 16:08 PrashantMangukiya

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

MelvinBot avatar Aug 26 '21 23:08 MelvinBot

I've re-assigned this issue as I'll be OOO so that another member of the team can keep an eye on it. Thanks!

marklouisdeshaun avatar Aug 26 '21 23:08 marklouisdeshaun

Nice! @marklouisdeshaun anything need doing on my end?

dylanexpensify avatar Aug 27 '21 10:08 dylanexpensify

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

botify avatar Sep 01 '21 16:09 botify

πŸš€ Deployed to staging by @cead22 in version: 1.0.91-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 02 '21 01:09 botify

πŸš€ Deployed to production by @roryabraham in version: 1.0.92-0 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 03 '21 01:09 botify