Closed fabOnReact closed 1 month ago
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
The difference of baseline is 1.15 (barely noticeable), maximumLineHeight 20, maximumFontLineHeight 17.69
Before | After |
---|---|
Before | After |
---|---|
The result is achieved after setting textInputCompose.lineHeight: 40.
Before | After |
---|---|
Before | After |
---|---|
Before | After |
---|---|
Fixes issue https://github.com/Expensify/App/issues/15640
Before | After |
---|---|
Thanks @fabOnReact for this amazing PR!
@fabOnReact We've reviewed the changes and we'd like to merge this PR but it's still marked as draft
@tomekzaw Thanks a lot. I moved the PR to ready for review.
@fabOnReact I think this PR introduced this regression. Do we have any plan to fix it or should we create an issue for that?
@hungvu193 did you test it?
@hungvu193 did you test it?
- Remove that line of code from Expensify
- You need to build Expensify and run it on Android
- Does the bug disappear?
Because the bug is Android only, while this PR introduces changes only to iOS. Thanks a lot!
My apologize for this confusion. I think I mentioned wrong PR here :(
@hungvu193 Thanks for the clarification. No problem about that. 🙏
Details
Sets the
NSBaselineOffsetAttributeName
of theattributedText
based on the following formula:The text is vertically centered in the lineHeight of the TextInput (which corresponds to the height of the cursor). The solution was already added in facebook/react-native:
Related Issues
fixes https://github.com/Expensify/App/issues/17767 fixes https://github.com/Expensify/App/issues/14445 fixes https://github.com/Expensify/App/issues/15640 Related https://github.com/facebook/react-native/issues/35741 https://github.com/facebook/react-native/issues/31112 https://github.com/facebook/react-native/issues/28012 https://github.com/facebook/react-native/issues/33986
Manual Tests
Linked PRs