Skip to content

Add maximumFontSize - #2389

Merged
Adam Gleitman (amgleitman) merged 11 commits into
microsoft:mainfrom
amgleitman:text-maximum-size
Dec 15, 2022
Merged

Adam Gleitman (amgleitman) merged 11 commits into
microsoft:mainfrom
amgleitman:text-maximum-size

Conversation

@amgleitman

@amgleitman Adam Gleitman (amgleitman) commented Dec 6, 2022 •

Copy link
Copy Markdown
Contributor

Platforms Impacted

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

Description of changes

This adds a maximumFontSize token that can cap the size of Dynamic Type text.

Verification

Added an example to the TextV2 test page. The text takes up (roughly) the entirety of the width of an iPhone 14 Pro at its maximum size, as seen below.

UIContentSizeCategoryLarge UIContentSizeCategoryAccessibilityLarge (AX2)
Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 17 52 33 Simulator Screen Shot - iPhone 14 Pro - 2022-12-05 at 17 50 06

Pull request checklist

This PR has considered (when applicable):

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

@amgleitman
Adam Gleitman (amgleitman) requested a review from a team as a code owner December 6, 2022 01:57
@amgleitman Adam Gleitman (amgleitman) changed the title Add maximumSize Add maximumFontSize Dec 13, 2022
@lyzhan7

Copy link
Copy Markdown
Contributor

Talked offline - seems like it might be a little unclear to someone who has no context what maximumFontSize is on what the Disp (<= 70) is testing. Maybe making a new section called "maximum font size" and giving a short description on what it is would be more clear.

@lyzhan7 Lynn Zhang (lyzhan7) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Besides updating the test page to be more clear this looks good to me. I am wondering though if we should have a discussion about Mike's suggestion before merging? If it's another possible approach maybe it would replace this PR.

@Saadnajmi Saad Najmi (Saadnajmi) left a comment

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.

Approved with minor comments

@amgleitman
Adam Gleitman (amgleitman) merged commit ac1a77d into microsoft:main Dec 15, 2022
@amgleitman
Adam Gleitman (amgleitman) deleted the text-maximum-size branch December 15, 2022 14:24
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.

5 participants