Skip to content

feat(input-accessory): clear bar on iOS 26+, suspend/restore, collapsed inset - #686

Open
NathanWalker wants to merge 1 commit into
mainfrom
feat/input-accessory-ios26-clear-bar
Open

NathanWalker wants to merge 1 commit into
mainfrom
feat/input-accessory-ios26-clear-bar

Conversation

@NathanWalker

Copy link
Copy Markdown
Contributor

What

Completes what #666 started and upstreams the accessory behavior the ChatGPT-style composer in ns-octane runs on.

  • iOS 26+: clear bar. fix(input-accessory): ensure scroll edge is used on ios 26+ #666 registers the docked container with UIScrollEdgeElementContainerInteraction, but the container is a keyboard-style UIInputView, and its material paints over the effect, so it was never visible. The container is now .default on iOS 26+ and the scroll view's edge effect is the bar's background: content blurs and washes out under the bar the way it does under system bars, with the keyboard open or closed. Before iOS 26 the keyboard material stays.
  • suspend() / restore(). The accessory lives in the keyboard's window, which UIKit z-orders above sheet presentations, so a page sheet or popover opened over the chat had the bar floating on top of it. suspend() slides the bar (and keyboard) away and gates the plugin's auto-restore paths; restore() brings it back and also recovers the bar after a full-screen modal, where UIKit does not restore first responder on its own (it polls until the modal is really gone, so it is safe to call as the modal starts closing). No-ops on Android, where dialogs are separate windows.
  • collapsedHorizontalInset. The docked bar floats narrower while the keyboard is hidden and widens in step with the keyboard's own animation; the NativeScript relayout runs inside the animation block so the bar's children animate too.
  • Growth past maxHeight enables the TextView's own scrolling so the newest lines and the caret stay reachable.
  • Scroll content relayout measures and positions the content inside the safe-area insets core lays it out with, and no longer pads contentSize up to the viewport, so short content stays put when the keyboard moves.

Behavior change

The plugin no longer writes textContainerInset or the input traits (autocorrection, spell checking, smart punctuation) on the hosted TextView. Core maps the TextView's CSS padding onto textContainerInset and re-applies that mapping on every full style pass, so a value written natively was stomped later and misaligned the text; and forcing traits overrode both the user's keyboard settings and the view's own attributes. Size the text with CSS padding and configure traits on the TextView.

Verification

Exercised in ns-octane on the iPhone 18 Pro / iOS 27 simulator: docked bar over dark content, keyboard open and closed, interactive dismiss, dark mode, sheet and drawer over the page (suspend/restore). Compiled output of this port matches the patch-package build the app ran, apart from comments. nx build input-accessory and eslint pass.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ae0dcdbd-4dff-48cc-bf48-cdbaa863e053

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant