feat: introduce KeyboardChatScrollView#1314
Merged
kirillzyusko merged 102 commits intomainfrom Feb 24, 2026
Merged
Conversation
Contributor
|
Images automagically compressed by Calibre's image-actions ✨ Compression reduced images by 41%, saving 12.5 KB.
|
Contributor
📊 Package size report
|
Contributor
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
KeyboardChatScrollViewKeyboardChatScrollView
f638b80 to
1c3da31
Compare
kirillzyusko
commented
Feb 20, 2026
1c3da31 to
7313ca0
Compare
…the end and close keyboard is causing ghost padding
…e it's a reused functionality and ScrollViewDecorator depends on presence of additional view
… 100px is hidden). In this case we need to interpolate 300 (keyboard height) by 200 (300 - 100). Applicable for inverted lists, whenAtEnd, persistent, never behavior
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.
📜 Description
Added
KeyboardChatScrollViewcomponent for building chat apps easy than before 😊💡 Motivation and Context
It's possible to build chat app with this library (keyboard handling), but:
KeyboardAvoidingViewthat will work well everywhere;But in fact all chat app keyboard handling is similar to each other:
And for building chat app that will satisfy these requirements you'll need to write many lines of code, for example: Expensify/App#71440 and Expensify/App#71438. The purpose of this PR is to expose a component that will be easy to integrate in client apps. Similar to what we did with
KeyboardAvoidingView,KeyboardAwareScrollViewand other componentsThe key idea in this component is that we don't change layout of
ScrollViewand instead extend scrollable area. In this case it's super-performant and allows to introduce advanced features with keyboard, such as conditional content re-positioning (composer is built on top ofKeyboardStickyView, and this is the layout that is used in many chat apps, such as Telegram, ChatGPT, etc.). On iOS it's achieved usingcontentInsets. On Android -ClippingScrollViewDecoratorhelps a lot.All logic with content re-positioning is placed in hook file and covered by unit tests. Later I'm planning to cover this component with e2e tests (and fix minor styling issues)
Important
Interactive keyboard dismissal may not work really well yet. Turns out Android+Fabric has some issues (but paper may have it too). iOS 26 in general is super buggy. But I'm happy to have a component-based public API where we can test interactive dismissal. Before it was kind of cool feature, but not really well tested. Now it will be built inside the public component, so we can properly fix it (same as we had
onSelectionChangeevent - before it wasn't stable, but when we added it toKeyboardAwareScrollViewit improved stability a lot).Closes #1011 #594 #951 #871 #1110
📢 Changelog
Android
contentInsetTopproperty forClippingScrollViewDecorator;JS
useChatKeyboardhooks that responsible for extending scroll range and content re-positioning.Docs
KeyboardChatScrollViewAPI reference page;🤔 How Has This Been Tested?
Tested manually on:
📸 Screenshots (if appropriate):
React commits (keyboard opening)
KeyboardAvoidingViewKeyboardChatScrollViewRe-layout pass
KeyboardAvoidingViewKeyboardChatScrollViewSimulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-20.at.22.21.00.mp4
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-20.at.22.21.52.mp4
Non-inverted list
telegram-cloud-document-2-5247105741013160806.mp4
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-21.at.23.43.53.mov
Inverted list
telegram-cloud-document-2-5247105741013160807.mp4
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-21.at.23.44.59.mov
🐛 Tests conducted
freezeproperty📝 Checklist