Skip to content

修复主题自动异常切换#394

Open
klxiaoniu wants to merge 1 commit intomasterfrom
fix/css-interop-dark-mode
Open

修复主题自动异常切换#394
klxiaoniu wants to merge 1 commit intomasterfrom
fix/css-interop-dark-mode

Conversation

@klxiaoniu
Copy link
Copy Markdown
Contributor

@klxiaoniu klxiaoniu commented Apr 14, 2026

Apply patch from nativewind/nativewind#1767

也可以等他们合了发版,不知道等到啥时候

@klxiaoniu klxiaoniu requested review from a team and renbaoshuo as code owners April 14, 2026 16:03
Copilot AI review requested due to automatic review settings April 14, 2026 16:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Applies an upstream NativeWind/react-native-css-interop fix to prevent invalid "unspecified" system color scheme values from causing theme switching glitches during AppState transitions.

Changes:

  • Add patch-package and a postinstall hook to apply dependency patches automatically.
  • Introduce a patch for react-native-css-interop@0.2.3 to normalize/resolve invalid color scheme values.
  • Remove the app-level Appearance.getColorScheme monkey-patch from the theme provider.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
yarn.lock Locks new dependencies introduced by patch-package setup.
patches/react-native-css-interop+0.2.3.patch Patches react-native-css-interop to filter/resolve "unspecified" color scheme values.
package.json Adds postinstall script and dev dependencies for patching.
components/app-theme-provider.tsx Removes the global Appearance.getColorScheme override now that dependency patching is introduced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/app-theme-provider.tsx
Comment thread patches/react-native-css-interop+0.2.3.patch
Comment thread package.json
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.

2 participants