Skip to content

feat: add an abillity to disable writing tools on iOS - #111

Merged
IvanIhnatsiuk merged 1 commit into
developmentfrom
feat/add-an-abillity-to-disable-writing-tools-on-iOS
Jun 27, 2026
Merged

feat: add an abillity to disable writing tools on iOS#111
IvanIhnatsiuk merged 1 commit into
developmentfrom
feat/add-an-abillity-to-disable-writing-tools-on-iOS

Conversation

@IvanIhnatsiuk

Copy link
Copy Markdown
Collaborator

Summary

This pull request adds support for the writingToolsBehavior prop to the EnrichedTextInput and EnrichedReanimatedTextInput components, enabling control over iOS 18's writing tools behavior. The implementation ensures the prop is available in TypeScript types, passed through JS/TS and native layers, and handled appropriately on each platform (with a no-op on Android and full support on iOS 18+).

iOS writing tools behavior support:

  • Added the writingToolsBehavior prop to EnrichedTextInput and EnrichedReanimatedTextInput, allowing values 'automatic' | 'complete' | 'disabled' | 'limited', and updated TypeScript types accordingly.
  • On Android, the prop is a no-op to maintain cross-platform compatibility.

No breaking changes are introduced; the prop defaults to 'automatic' and is ignored on unsupported platforms.

Test Plan

Provide clear steps so another contributor can reproduce the behavior or verify the feature works.
For example:

  • Steps to reproduce the bug (if this is a bug fix)
  • Steps to verify the new feature
  • Expected vs actual results
  • Any special conditions or edge cases to test

Screenshots / Videos

Include any visual proof that helps reviewers understand the change — UI updates, bug reproduction or the result of the fix.

Compatibility

OS Implemented
iOS
Android

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new cross-platform prop, writingToolsBehavior, to the public Enriched text input components and wires it through to native so iOS 18+ can control UIKit Writing Tools behavior (with an explicit no-op on Android).

Changes:

  • Added writingToolsBehavior?: 'automatic' | 'complete' | 'disabled' | 'limited' to EnrichedTextInputProps and propagated it through EnrichedTextInput and EnrichedReanimatedTextInput (defaulting to 'automatic').
  • Updated the native component prop surface to accept writingToolsBehavior and implemented iOS 18+ handling by mapping string values to UIWritingToolsBehavior.
  • Added an Android view manager prop setter as a no-op to avoid unknown-prop warnings while keeping parity across platforms.

Reviewed changes

Copilot reviewed 9 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/types.ts Adds writingToolsBehavior to the public JS/TS props type.
src/EnrichedTextInputNativeComponent.ts Extends native props surface with writingToolsBehavior.
src/EnrichedTextInput.tsx Defaults and forwards writingToolsBehavior to the native component.
src/EnrichedReanimatedTextInput.tsx Defaults and forwards writingToolsBehavior to the native component.
ios/extensions/NSString+WritingToolsBehavior.h Declares iOS 18+ string→UIWritingToolsBehavior conversion helper.
ios/extensions/NSString+WritingToolsBehavior.mm Implements mapping for disabled/complete/limited with default fallback.
ios/EnrichedTextInputView.mm Applies writingToolsBehavior to the underlying text view on iOS 18+.
android/src/main/java/com/swmansion/enriched/EnrichedTextInputViewManager.kt Adds a no-op writingToolsBehavior prop setter for Android.
lib/typescript/src/types.d.ts Generated typings updated to include the new prop.
lib/typescript/src/types.d.ts.map Generated sourcemap updated for typings.
lib/typescript/src/EnrichedTextInputNativeComponent.d.ts Generated native component typings updated.
lib/typescript/src/EnrichedTextInputNativeComponent.d.ts.map Generated sourcemap updated for native component typings.
lib/typescript/src/EnrichedTextInput.d.ts Generated component typings updated to include the new prop in the signature.
lib/typescript/src/EnrichedTextInput.d.ts.map Generated sourcemap updated for EnrichedTextInput typings.
lib/typescript/src/EnrichedReanimatedTextInput.d.ts Generated component typings updated to include the new prop in the signature.
lib/typescript/src/EnrichedReanimatedTextInput.d.ts.map Generated sourcemap updated for EnrichedReanimatedTextInput typings.
lib/module/EnrichedTextInputNativeComponent.ts Built JS module native props surface updated.
lib/module/EnrichedTextInput.js Built JS module forwards the new prop.
lib/module/EnrichedTextInput.js.map Built sourcemap updated accordingly.
lib/module/EnrichedReanimatedTextInput.js Built JS module forwards the new prop.
lib/module/EnrichedReanimatedTextInput.js.map Built sourcemap updated accordingly.
Files not reviewed (2)
  • lib/module/EnrichedReanimatedTextInput.js: Generated file
  • lib/module/EnrichedTextInput.js: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IvanIhnatsiuk
IvanIhnatsiuk merged commit b8e68cb into development Jun 27, 2026
1 check passed
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.

2 participants