Skip to content

Prevent NaN baselines in Paper nested Text layout - #3124

Draft
Saad Najmi (Saadnajmi) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-baseline-aligned-nested-text
Draft

Saad Najmi (Saadnajmi) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-baseline-aligned-nested-text

Conversation

Copilot AI commented Oct 13, 2026 •

Copy link
Copy Markdown

Baseline-aligned nested View/Text layouts can terminate macOS Paper with Expect custom baseline function to not return NaN. Yoga’s measure-only pass can reach unmeasured descendant text, whose undefined height becomes CGFLOAT_MAX and converts back to NaN.

  • Baseline calculation: Use TextKit’s measured text height when the supplied height is undefined. Preserve the existing baseline formula for finite heights and leave Yoga’s assertion intact.
  • Regression coverage: Add native tests for undefined/non-finite dimensions, empty text, explicit heights, and nested baseline-aligned fixed-size views across repeated layouts.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 2 commits October 13, 2026 23:14
Co-authored-by: Saadnajmi <6722175+Saadnajmi@users.noreply.github.com>
Co-authored-by: Saadnajmi <6722175+Saadnajmi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix baseline-aligned nested Text layout NaN error Prevent NaN baselines in Paper nested Text layout Oct 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Paper][0.81.9] Baseline-aligned nested Text layout aborts with ‘Expect custom baseline function to not return NaN’

2 participants