react / react/react-native

Fractional metrics with inline Views cause inconsistent Text wrapping

Open
#54,422 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Author Provided Repro Needs: React Native Team Attention Type: New Architecture
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Description

on Android, Text containing an inline positions the outside the bounding box of its parent as if it was wrapping. This is affected by font size, font scaling, and both the size and position of the container.

Steps to reproduce

Compare snack with screenshots

React Native Version

0.81.5

Affected Platforms

Runtime - Android

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info
n/a
Stacktrace or Logs
n/a
MANDATORY Reproducer

https://snack.expo.dev/@codatrigger/shallow-orange-chips

Screenshots and Videos

Web: ideal appearance
Image
iOS: unrelated baseline positioning bug, otherwise correct
Image
Android: width reserved but positioned on next "line"
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the mandatory Snack reproducer on Android with React Native 0.81.5, then compare its inline View placement with the provided web, iOS, and Android screenshots. Trace the Fabric text and inline-View layout path, checking font size, font scaling, and container size or position; done means the View stays within its parent's bounding box across those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
46/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.