Skip to content

fix: add fontVariationSettings to style properties config - #10239

Draft
tjzel wants to merge 2 commits into
mainfrom
@tjzel/rn-nightly-font-variation-settings
Draft

fix: add fontVariationSettings to style properties config#10239
tjzel wants to merge 2 commits into
mainfrom
@tjzel/rn-nightly-font-variation-settings

Conversation

@tjzel

@tjzel tjzel commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Note

This pull request was authored by AI on behalf of tjzel.

Failing job: https://github.com/software-mansion/react-native-reanimated/actions/runs/31530561295/job/93909391982

Summary

The nightly leg of the TypeScript compatibility test has failed since React Native 0.88.0-nightly-20260810, which added a new style prop fontVariationSettings. PropsBuilderConfig<P> maps over keyof Required<P>, so every style key is a mandatory key of STYLE_PROPERTIES_CONFIG and any prop React Native adds breaks config.ts with TS2741.

I added the prop with the value false, matching how the other props we do not animate are handled — there is no interpolator for it in InterpolatorRegistry.cpp. The @ts-ignore is functionally required rather than explanatory: on RN 0.83 through 0.87 the key does not exist in AllStyleProps, so without it the object literal raises TS2353 on those legs. This mirrors the backgroundImage precedent added for the same reason when RN 0.87 introduced it.

The web config needs no change, because its own PropsBuilderConfig is homomorphic and preserves optionality.

Test plan

From packages/react-native-reanimated, against the locally installed [email protected]:

  • yarn type:check:src:native, yarn type:check:src:web, yarn type:check:legacy-rn-types:src and yarn eslint src/common/style/config.ts all pass.
  • Removing the @ts-ignore reproduces TS2353 on the installed version, confirming the directive is required rather than dead weight.

RN nightly was not installed locally, so the nightly leg passing is an inference that CI will confirm. The failing runs stopped at the first type-check step, so the later steps never ran against nightly-20260810; if that nightly changed anything outside StyleSheetTypes.d.ts, a further failure could surface.

Changelog

  • I added an entry to the Unpublished section of each changed package's CHANGELOG.md, or this PR does not change react-native-reanimated or react-native-worklets.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 049d2a22-5ea6-47c2-83ac-3f377451302b

📥 Commits

Reviewing files that changed from the base of the PR and between 1294853 and 67fa559.

📒 Files selected for processing (2)
  • packages/react-native-reanimated/CHANGELOG.md
  • packages/react-native-reanimated/src/common/style/config.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for recognizing the fontVariationSettings style property, including compatibility with React Native 0.88 type checking.
  • Documentation

    • Updated the changelog to document the new style property support.

Walkthrough

The style configuration now includes fontVariationSettings as an unsupported property available in React Native 0.88. The changelog records this type-checking compatibility change.

Changes

Font variation style support

Layer / File(s) Summary
Add font variation style property
packages/react-native-reanimated/src/common/style/config.ts, packages/react-native-reanimated/CHANGELOG.md
The style configuration adds fontVariationSettings with processing disabled and a React Native 0.88 availability annotation. The changelog records the change.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: matipl01

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the addition of fontVariationSettings to the style properties configuration.
Description check ✅ Passed The description explains the React Native compatibility issue, implementation, testing, and changelog update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch @tjzel/rn-nightly-font-variation-settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant