[Paid] Placeholders are not vertically centered in text inputs
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:
- Navigate to staging.new.expensify.com
- 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

Expensify/Expensify Issue URL:
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
Triggered auto assignment to @joelbettner (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Proposal
Adding a value of 16 here for expensiTextInputLabel can fix this issue.
(Proposal after Triage)
Proposal
As I mentioned before in Slack
We have to remove top style from expensiTextInputLabel.
Result: centered label

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.

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

This looks like it has what it needs. Un-assigning myself and adding the External label.
Triggered auto assignment to @marklouisdeshaun (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Created a job in Upwork!
Internal: https://www.upwork.com/ab/applicants/1428832340082450432/job-details External: https://www.upwork.com/jobs/~014ccda5d494c2b148
Triggered auto assignment to @chiragsalian (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
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.
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
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.

iOS
macOS Desktop
Android 7.1.1
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
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.
Hired in Upwork!
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.
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.
Triggered auto assignment to @dylanexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
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!
Nice! @marklouisdeshaun anything need doing on my end?
: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.
π Deployed to staging by @cead22 in version: 1.0.91-1 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |
π Deployed to production by @roryabraham in version: 1.0.92-0 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | success β |
| πΈ web πΈ | success β |