Skip to content
New issue

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

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

Already on GitHub? # to your account

Adding minimumScaleFactor to HUD rendering #1997

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

mischreiber
Copy link
Contributor

@mischreiber mischreiber commented Apr 16, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Introducing a minimumScaleFactor to the text of a HUD. Using 0.6 as it strikes a good balance between adding a little extra space, and maintaining a reasonable level of readability.

Binary change

Total increase: 8,096 bytes
Total decrease: 0 bytes

File Before After Delta
Total 31,486,872 bytes 31,494,968 bytes ⚠️ 8,096 bytes
Full breakdown
File Before After Delta
HeadsUpDisplay.o 252,584 bytes 258,952 bytes ⚠️ 6,368 bytes
__.SYMDEF 4,881,264 bytes 4,882,992 bytes ⚠️ 1,728 bytes

Verification

Ensured text begins to overflow as expected, with a small amount of extra text available. Also verified a11y text sizes--no behavioral impact compared to the existing feature.

Visual Verification
Standard Scaled
HUD_standard HUD_squished

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)

@mischreiber mischreiber requested a review from a team as a code owner April 16, 2024 18:48
@mischreiber mischreiber merged commit 3fed828 into microsoft:main Apr 17, 2024
7 checks passed
@mischreiber mischreiber deleted the hudMinimumScaleFactor branch April 18, 2024 04:43
mischreiber added a commit to mischreiber/fluentui-apple that referenced this pull request Apr 18, 2024
* Adding `minimumScaleFactor` to HUD rendering

* Move minimumScaleFactor constant to HeadsUpDisplayTokenSet
mischreiber added a commit that referenced this pull request Apr 23, 2024
* Adding `minimumScaleFactor` to HUD rendering

* Move minimumScaleFactor constant to HeadsUpDisplayTokenSet
@joannaquu joannaquu mentioned this pull request May 23, 2024
12 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants