fix(fabric): colors not respecting dark mode appearance, implement platform color#2867
Open
Saadnajmi wants to merge 7 commits intomicrosoft:mainfrom
Open
fix(fabric): colors not respecting dark mode appearance, implement platform color#2867Saadnajmi wants to merge 7 commits intomicrosoft:mainfrom
Saadnajmi wants to merge 7 commits intomicrosoft:mainfrom
Conversation
Resolve dynamic/semantic colors against the current effective appearance on macOS so that dark mode colors are correctly extracted in the Fabric renderer. Fixes microsoft#2830 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add complete macOS semantic color dictionary (label, text, content, control, window colors etc.) and ColorWithSystemEffect support from PR microsoft#2737. Includes Swift-style aliases, fallback colors, array-based color selectors, and PlatformColorExample for RNTester. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
- Fix bare #endif to use proper #endif // macOS] tags per conventions - Revert Playground and testerStateUtils to upstream defaults (test-only) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- RCTViewComponentView.mm: RCTUIView.updateLayer already resolves dynamic colors via .CGColor when AppKit calls it with the correct appearance context - PlatformColorExample.js: macOS platform color examples already exist in Paper renderer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Saadnajmi
commented
Mar 22, 2026
...Common/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...Common/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...Common/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...Common/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...Common/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...eactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...eactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Mar 22, 2026
...eactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm
Outdated
Show resolved
Hide resolved
- Fix #else/#endif comment tags to follow diffs-with-upstream guide - Flip all macOS-first (#if TARGET_OS_OSX) blocks with #else to iOS-first - Remove unnecessary TargetConditionals.h and AppKit.h imports - Add back missing [macOS] tags on modified lines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No platform/macos directory exists since all code is inline in platform/ios with #if TARGET_OS_OSX guards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vmoroz
approved these changes
Mar 23, 2026
Replace manual NSAppearance save/restore with the cleaner performAsCurrentDrawingAppearance API (available since macOS 11.0, our min target is 14.0). This is exception-safe and more readable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ColorWithSystemEffectsupport (pressed, disabled, rollover) to Fabric rendererPlatformColorExampleand a Playground test page for dark mode color verificationTest plan
TARGET_OS_OSXguards)🤖 Generated with Claude Code