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

Support on-screen keyboard #9

Merged
merged 19 commits into from
Jan 28, 2024
Merged

Support on-screen keyboard #9

merged 19 commits into from
Jan 28, 2024

Conversation

fujidaiti
Copy link
Owner

@fujidaiti fujidaiti commented Jan 28, 2024

This PR includes changes and new features to address the issue of the keyboard overlap on the sheet. Once the PR is merged, the framework will automatically offset the sheet by the keyboard height to prevent the content from being overlapped by the keyboard.

Changes made

Breaking changes

  • Change the type of SheetMetrics.viewportDimensions from Size to ViewportDimensions, which holds the MediaQueryData.viewInsets of the window (typically the keyboard height) in addition to the viewport size.

Internal changes

  • Change SheetViewport to gradually offset the sheet by the keyboard height.
  • Split _ContentScrollDrivenSheetActivity into the 3 parts according to the lifecycle; _ContentIdleScrollSheetActivity, _ContentUserScrollSheetActivity and _ContentBallisticScrollSheetActivity.
  • Change some sheet activities such as UserDragSheetActivity and _ContentUserScrollSheetActivity to keep the visual position of the sheet unchanged while a keyboard dismissing/appearing animation is running.

New features

Documentation

@fujidaiti fujidaiti self-assigned this Jan 28, 2024
@fujidaiti fujidaiti merged commit fd4e84f into main Jan 28, 2024
1 check passed
@fujidaiti fujidaiti deleted the keyboard-support branch January 28, 2024 17:35
@fujidaiti fujidaiti linked an issue Jan 28, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant