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

Fixing keyboard support in Drawers #1938

Merged

Conversation

sophialee0416
Copy link
Contributor

@sophialee0416 sophialee0416 commented Dec 4, 2023

Platforms Impacted

  • iOS
  • macOS

Description of changes

In #1936 , there was a bug fix for drawers not being able to support expand with keyboard if the drawer was presented in a custom-set origin. This is because we automatically calculate the frame origin on contentFrame.maxY - contentSize.height, which is not necessarily always the correct origin especially if a keyboard is in use. The keyboard height code is also simplified so that it is more accurate in the presentation calculations.

Binary change

(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)

Verification

Manual tests below, no change should be observed, since the bug was found in the PopupMenuController that had a search bar. Hypothetically, if a drawer with a unique origin point that goes up prompts a keyboard to appear, the bug should appear. This should also only affect presentations that go .up.

Example (pre bug-fix):

Without keyboard engagement With keyboard engagement
image image
Visual Verification
Before After
image image
image !image
image image

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)

@sophialee0416 sophialee0416 requested a review from a team as a code owner December 4, 2023 21:56
@sophialee0416 sophialee0416 enabled auto-merge (squash) December 4, 2023 21:56
@sophialee0416 sophialee0416 merged commit 8fd3718 into microsoft:main Dec 5, 2023
sophialee0416 added a commit to sophialee0416/fluentui-apple that referenced this pull request Dec 5, 2023
@mischreiber mischreiber mentioned this pull request Mar 6, 2024
12 tasks
@sophialee0416 sophialee0416 deleted the sople/fixKeyboardSupport branch July 15, 2024 23:29
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