Repository navigation
Keep the keyboard up while the composer sheet changes above its field - #81
Merged
Merged
Conversation
EDGE numbers unkeyed nodes in the order they're drawn, and iOS and Android treat a new id as a new view. Typing the first character turned Commit on, which wraps its circle in a pressable and adds a node above the field. Every id after it moved, so the field was rebuilt and the keyboard went down. The issue badge and the error and refresh banners above the sheet did the same. Keying the sheet and its field keeps the field's id stable. Tests check the ids from the root to the field stay put in each case, and that the Reply bar and the Remotes composer (already safe, since bottom bars are hoisted ahead of the page) stay that way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Typing the first character into the composer sheet dropped the keyboard.
EDGE gives every node without a
native:keythe next number from a counter, in the order the tree is drawn, and iOS and Android treat a new id as a new view. The Commit check is 2 nodes while it's disabled and 3 once it's enabled, because it gains a pressable wrapper. So as soon as the draft could be committed, every id below the button moved by one, the field was rebuilt, and the keyboard went with the old one.autofocusdoesn't bring it back because it only fires the first time a field appears. The/featurebadge, the sheet's error text and the error or "couldn't refresh" banners behind the sheet did the same.This keys the bottom sheet and its field. Inside a keyed node, unkeyed children are numbered by their position within it, so the sheet's key covers the Commit button and the banners, and the field's key covers the badge and the error text that sit above it in its own column. With only the sheet keyed the badge case still fails.
The new test in ComposeSheetTest checks that every id from the root down to
sheet-bodystays the same through each of those changes. It fails without the keys.I also checked the commit page's Reply bar and the Remotes composer, which looked like the same setup. They aren't affected, because
NativeComponent::resolveBottomBarlifts a screen'sbottom-barto the root ahead of the page, so nothing on the page can move its ids. The tests added to CommitDetailTest and ConversationTest passed before this change. They're there to catch it if that ever stops being true, and can go if you'd rather not have them.Tests: the full suite passes (1196) on main's lock. I haven't tried it on a phone yet.
🤖 Generated with Claude Code