fix: add navigationBarsPadding to composer / agent editor (bottom nav overlap) - #5
Open
talwayh1 wants to merge 1 commit into
Open
fix: add navigationBarsPadding to composer / agent editor (bottom nav overlap)#5talwayh1 wants to merge 1 commit into
talwayh1 wants to merge 1 commit into
Conversation
The app calls enableEdgeToEdge() in MainActivity, so content extends behind the system bars. The prompt composer on SessionDetailScreen and the agent editor on AgentDetailScreen only applied imePadding(), which handles the software keyboard but not the system navigation bar. On devices with gesture navigation or 3-button nav (e.g. Xiaomi/MIUI), the bottom composer is partially hidden behind the virtual navigation bar, making the input field and send button hard to reach. Fix by chaining navigationBarsPadding() after imePadding() on both bottom-anchored containers: - SessionDetailScreen: composer Column in the Scaffold bottomBar - AgentDetailScreen: root editor Column Keyboard behavior is preserved: when the IME is open the navigation bar insets are already consumed by the keyboard, so navigationBarsPadding() adds nothing extra.
Author
|
Fixes #6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the prompt composer (and the agent editor) being partially hidden behind the system navigation bar on devices with gesture navigation or 3-button navigation (e.g. Xiaomi MIUI/HyperOS, Samsung, Pixel with gesture mode).
Problem
MainActivitycallsenableEdgeToEdge(), so the UI extends behind the system bars. The bottom-anchored input areas only appliedimePadding():imePadding()only consumes the IME (software keyboard) insets. When the keyboard is dismissed, the navigation bar insets are still present, and the composer sits behind the gesture bar / 3-button nav — the text field and send button are partially covered and hard to tap.Fix
Chain
navigationBarsPadding()afterimePadding()on both bottom-anchored containers:SessionDetailScreen— the composerColumnin theScaffoldbottomBarAgentDetailScreen— the root editorColumnThe ordering is safe in both states:
navigationBarsPadding()adds nothing extra.imePadding()is 0 andnavigationBarsPadding()lifts the composer fully above the navigation bar.Test plan
Related
Fixes the issue about the composer being covered by the virtual navigation bar.