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

Extend FluentButtonToggleStyle to support overrideTokens(_:) #1996

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

nodes11
Copy link
Contributor

@nodes11 nodes11 commented Apr 12, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

There is a use case internally where we need to use slightly different colors for the FluentButtonToggleStyle than what is provided through the default button styles. To support this, we should extend FluentButtonToggleStyle to support overrideTokens(_:).

Binary change

Total increase: 5,864 bytes
Total decrease: 0 bytes

File Before After Delta
Total 30,977,488 bytes 30,983,352 bytes ⚠️ 5,864 bytes
Full breakdown
File Before After Delta
FluentButtonToggleStyle.o 66,648 bytes 70,904 bytes ⚠️ 4,256 bytes
__.SYMDEF 4,754,208 bytes 4,755,448 bytes ⚠️ 1,240 bytes
FocusRingView.o 813,256 bytes 813,624 bytes ⚠️ 368 bytes

Verification

I validated the change internally by verifying the colors I provided via overrideTokens(_:) are applied to the Toggle.

Visual Verification

Recording of changes made to demo to show functionality of using the exposed overrideTokens(_:):

Screen.Recording.2024-04-12.at.4.58.37.PM.mov

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

@nodes11 nodes11 requested a review from a team as a code owner April 12, 2024 22:14
@nodes11 nodes11 merged commit e01e7f4 into microsoft:main Apr 15, 2024
7 checks passed
nodes11 added a commit to nodes11/fluentui-apple that referenced this pull request Apr 24, 2024
…ft#1996)

* Extend FluentButtonToggleStyle to support overrideTokens(_:) and add functionality to the SwiftUI button demo.
nodes11 added a commit that referenced this pull request Apr 24, 2024
…2003)

* Extend FluentButtonToggleStyle to support overrideTokens(_:) and add functionality to the SwiftUI button demo.
@joannaquu joannaquu mentioned this pull request May 23, 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