Skip to content

Floating Panel - Add Keyboard Avoidance Support #380

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

Merged
merged 17 commits into from
Aug 8, 2023

Conversation

dfeinzimer
Copy link
Collaborator

@dfeinzimer dfeinzimer commented Jul 31, 2023

Apollo # 102

Before After
before.mp4
after.mp4

Adds keyboard avoidance functionality to the Floating Panel component and updates its associated example view. The example view has been reworked to set the stage for presenting different types of content compared to the single static list it currently presents. This should help to demonstrate and more easily test different use cases for the Floating Panel.

@dfeinzimer dfeinzimer added the enhancement New feature or request label Jul 31, 2023
@dfeinzimer dfeinzimer self-assigned this Jul 31, 2023
@dfeinzimer dfeinzimer changed the title FloatingPanel Keyboard Avoidance Floating Panel - Add Keyboard Avoidance Support Aug 1, 2023
@dfeinzimer dfeinzimer requested a review from mhdostal August 1, 2023 22:53
@dfeinzimer dfeinzimer marked this pull request as ready for review August 1, 2023 22:53
@mhdostal
Copy link
Member

mhdostal commented Aug 2, 2023

The displaying/hiding the keyboard, the height of the floating panel changes a bit; is this expected?

FPHeightChanges

@mhdostal
Copy link
Member

mhdostal commented Aug 2, 2023

With the keyboard visible, it is possible to drag the height of the FP beyond the top of the screen:

FP extends off top of display

@dfeinzimer dfeinzimer requested a review from mhdostal August 3, 2023 14:26
@mhdostal
Copy link
Member

mhdostal commented Aug 3, 2023

I'm getting incorrect, but different than before, behavior, along with the following message in the console:

2023-08-03 10:34:59.391896-0500 Examples[15616:1674059] [SwiftUI] Invalid frame dimension (negative or non-finite).

Simulator Screen Recording - iPhone 14 Pro - 2023-08-03 at 10 34 50

Steps:
Present "Text Field"
Click in text entry box
Show keyboard if it doesn't automatically show (this is in the simulator)
The text field scrolls up to avoid the keyboard, but then the floating panel appears to switch to half-height.

At this point, you can no longer drag the FP handle to resize.

Copy link
Member

@mhdostal mhdostal left a comment

Choose a reason for hiding this comment

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

See the comment on keyboard avoidance and the FP switching to half-height

@dfeinzimer dfeinzimer requested a review from mhdostal August 7, 2023 23:44
@dfeinzimer
Copy link
Collaborator Author

This has been re-worked and is ready for review once again.

@dfeinzimer dfeinzimer merged commit 9723d0a into v.next Aug 8, 2023
@dfeinzimer dfeinzimer deleted the df/floatingPanelKeyboardAvoidance branch August 8, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants