Fix: Make KeyboardScaffoldSafeArea work when not at bottom of screen (Resolves #2489) #2490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Make KeyboardScaffoldSafeArea work when not at bottom of screen (Resolves #2489)
Apparently when I recently created the new implementation of the keyboard scaffold I never tested with widgets below the chat editor, such as bottom nav tabs. When there's a widget below the editor, we were pushing the editor up too far, equal to the height of whatever was below it before pushing it up.
There's one known shortcoming even with the PR. When the content below the editor changes size, the editor position is one frame behind, leading to some jitter. This is likely to happen because the widget at the bottom of the screen is probably wrapped in a
SafeArea
to deal with bottom insets.Here's an example of the jitter:
Screen.Recording.2025-01-03.at.4.48.49.PM.mov
The same demo on an SE, which doesn't the bottom safe area space, is stable:
Screen.Recording.2025-01-03.at.4.48.03.PM.mov