fix(mobile): chat layout collapses after returning from background - #6284
Open
LiaoyuanNing wants to merge 1 commit into
Open
fix(mobile): chat layout collapses after returning from background#6284LiaoyuanNing wants to merge 1 commit into
LiaoyuanNing wants to merge 1 commit into
Conversation
|
@LiaoyuanNing is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
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
Fix the mobile Chat layout that can collapse after the app returns from the background while a multiline draft has the keyboard open.
The affected screen used React Native's event-driven
KeyboardAvoidingView. When iOS dismissed the keyboard while JavaScript was inactive, the finalkeyboardWillHideevent could be missed or not applied, leaving a large bottom padding on resume. That stale padding consumed the container height: the message list'sflex: 1area collapsed toward zero and the composer was pushed upward and compressed.Chat now uses the
KeyboardAvoidingViewfromreact-native-keyboard-controller. The rootKeyboardProvideris already mounted, so this introduces no dependency. Its padding derives from native keyboard state rather than delivery of JavaScript keyboard events, so a background dismissal cannot leave the stale offset behind.Reproduction
Before this change, the composer could collapse below the header with overlapping text and toolbar controls while the message list became blank.
Scope and follow-up
This is deliberately Chat-only: it fixes the reported expanded-composer layout without changing unrelated form screens.
new-issue.tsx,search.tsx,project/new.tsx,issue/[id]/edit.tsx,login.tsx, andverify.tsxuse the same React NativeKeyboardAvoidingViewpattern, so they may have the same failure mode; they have not been individually verified. A follow-up could standardize those screens if maintainers want the wider change.Validation
pnpm --filter @multica/mobile typecheckpnpm --filter @multica/mobile lint(passes with 7 pre-existing warnings)pnpm --filter @multica/mobile test(42 tests passed)