Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dark mode issues with new color system #2105

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

mischreiber
Copy link
Contributor

@mischreiber mischreiber commented Nov 8, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Fix broken dark mode on some UIKit screens.

There's some subtle misbehavior when creating a UIColor from a Color whose value is defined by a color resolver. It's likely an Apple bug, but to work around it in the meantime, this reverts back to the 0.30 and earlier behavior of storing raw color data as DynamicColor values.

Binary change

Coming soon!

Verification

Ensured light and dark modes all function as expected in both UIKit and SwiftUI.

Visual Verification
Before After
Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 16 04 Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 00 01
Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 16 06 Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 00 04
Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 16 14 Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 00 18
Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 16 15 Simulator Screenshot - iPhone 16 Pro - 2024-11-08 at 10 00 21

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@mischreiber mischreiber requested a review from a team as a code owner November 8, 2024 18:22
@mischreiber mischreiber merged commit 0e6e9a1 into microsoft:main Nov 8, 2024
7 checks passed
@mischreiber mischreiber deleted the fixDynamicColor branch November 8, 2024 21:38
@joannaquu joannaquu mentioned this pull request Nov 21, 2024
12 tasks
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