facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.45k stars 24.37k forks source link

Incorrect bottom padding in `Text` with `justify` alignment #30786

Open Kolyunya opened 3 years ago

Kolyunya commented 3 years ago

Description

Text component has unwanted bottom padding when justify alignment is used. The issue depends on the amount of text contents.

React Native version:

» node_modules/.bin/react-native info
info Fetching system and libraries information...
System:
    OS: Linux 5.10 Arch Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz
    Memory: 14.85 GB / 23.43 GB
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 15.6.0 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.11 - /usr/bin/npm
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 10.0.2 - /usr/bin/javac
    Python: 3.9.1 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.0 => 17.0.1 
    react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Add Text component.
  2. Set alignment to justify.
  3. Add text contents to the component.
  4. Run the application on an Android device.
  5. See unwanted bottom padding depending on the length of the contents.

Expected Results

See no unwanted bottom padding.

Demo application

Minimal reproducible bug demo on expo.io.

Screenshots

2021-01-25_13-20

zegermouw commented 2 years ago

I will try to solve this one

Epicato commented 2 years ago

Has this been solved till now?

lhervert-digitalfemsa commented 1 year ago

anyone have a solution for this?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Kolyunya commented 10 months ago

Stop this nonsense please. The fact that nobody can do anything about the bug doesn't mean it has been fixed or it doesn't exist. Closing stale issues is like hiding you head in sand.

alvyfz commented 5 months ago

try to parsing props textBreakStrategy <Text textBreakStrategy={'simple'}>...Your Text</Text>

references: https://reactnative.dev/docs/text#textbreakstrategy-android