Skip to content

Add Dynamic FluentColor for GlassForeground and integrate into TabBarItemView#2155

Merged
amoggo merged 9 commits intomicrosoft:mainfrom
amoggo:user/amaralim/FluentGlassColor-TabBarItemGlassColorSupport
May 15, 2025
Merged

Add Dynamic FluentColor for GlassForeground and integrate into TabBarItemView#2155
amoggo merged 9 commits intomicrosoft:mainfrom
amoggo:user/amaralim/FluentGlassColor-TabBarItemGlassColorSupport

Conversation

@amoggo
Copy link
Copy Markdown
Contributor

@amoggo amoggo commented May 13, 2025

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

  • A new BottomSheetControllerStyleGlass was introduced which begs for an improved foreground color for Enabled & Disabled states.
  • Two new Fluent Colors have been introduced in this chanage
    glassForeground1
    glassForegroundDisabled1
  • These have now been hooked into the TabBarItemView via a usesGlassEffectColors property
  • This brings the contrast of foreground elements on a Glass material close to that of Solid Material
Visual Verification
BottomSheet Solid Material BottomSheet Glass Material
Screenshot 2025-05-13 at 17 27 33 - Solid Screenshot 2025-05-13 at 17 26 35 - Glass

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

@amoggo amoggo marked this pull request as ready for review May 14, 2025 00:38
@amoggo amoggo requested a review from a team as a code owner May 14, 2025 00:38
@amoggo amoggo enabled auto-merge (squash) May 15, 2025 20:44
@amoggo amoggo merged commit 2fce89b into microsoft:main May 15, 2025
7 checks passed
let disabledColor = tokenSet[.disabledColor].uiColor
titleLabel.textColor = disabledColor
imageView.tintColor = disabledColor
imageView.alpha = style == .glass ? 0.6 : 1.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No urgency, since this already merged (and you gave me plenty of time to review it 😁), but I think it'd be nice to move the 0.6 constant into the constants extension of TabBarItemTokenSet. Just a nice-to-have next time one of us is touching this class!

@mischreiber mischreiber mentioned this pull request Jun 13, 2025
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.

3 participants