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(macOS Button): Use Fluent 2 alias tokens #3778

Merged
merged 9 commits into from
Oct 17, 2024

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Oct 7, 2024

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

The macOS Button color tokens were still being set by older, deprecated tokens instead of the Fluent-2-vetted alias tokens. Let's update them.

Notable changes and things I learned (though I probably missed a few):

  • macOS default buttons use neutralBackground2 / neutralForeground2 / neutralstroke2 for a softer overall color set
  • macOS in general shouldn't have a hover state for its' buttons, except Subtle Button. Some alias tokens don't respect this, see the followup tasks.
  • Apart from Subtle Button, I try to always define a non-transparent border, which adds 2 px to the overall width and height of each button. Subtle Button has bugs, see the followup tasks.
  • strokeFocus1 and strokeFocus2 seem very win32 specific, so we probably shouldn't use them elsewhere. They seem explicitly for the two-toned focus border.

Followups:

Verification

Video of how the buttons look now.

Screen.Recording.2024-10-16.at.3.44.39.PM.mov

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@rurikoaraki
Copy link
Collaborator

"and that our jest tests are actually testing that on macOS."

-- I think right now our jest tests only run on one platform at a time, so we kinda have to pick which platform we want tested.

@Saadnajmi Saadnajmi marked this pull request as ready for review October 9, 2024 00:21
@Saadnajmi Saadnajmi requested a review from a team as a code owner October 9, 2024 00:21
@Saadnajmi Saadnajmi marked this pull request as draft October 14, 2024 23:43
@Saadnajmi
Copy link
Collaborator Author

Moving back to draft, as I am making updates to the token definitions

@Saadnajmi Saadnajmi marked this pull request as ready for review October 15, 2024 21:14
@Saadnajmi
Copy link
Collaborator Author

Token definition updates blocked upstream. Merging as is.

@Saadnajmi Saadnajmi merged commit 7149414 into microsoft:main Oct 17, 2024
9 of 11 checks passed
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