forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(fabric, textinput): enable spelling and grammer props #2290
Merged
Conversation
This file contains 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
Summary: **Context** - Port Paper TextInput api's to Fabric https://www.internalfb.com/code/fbsource/[dab91113a70a2f967fa2996f4aca0f49a58aea17]/third-party/microsoft-fork-of-react-native/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m?lines=440-444 **Change** - Automatic spelling correction works on Fabric TextInput Test Plan: **Enable "Correct Spelling Automatically"** |https://pxl.cl/3MFjJ| https://pxl.cl/3MFx6| {F1146645411} Reviewers: chpurrer, lefever, #rn-desktop Reviewed By: chpurrer Differential Revision: https://phabricator.intern.facebook.com/D51158136
Summary: **Context** - Port Paper TextInput api's to Fabric https://www.internalfb.com/code/fbsource/[25297dddce1b]/third-party/microsoft-fork-of-react-native/react-native-macos/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm?lines=500-505 **Change** - Automatic spell checking works on Fabric TextInput Test Plan: **Enable "Check Spelling While Typing"** https://pxl.cl/3MG01 Reviewers: chpurrer, lefever, #rn-desktop Reviewed By: chpurrer Differential Revision: https://phabricator.intern.facebook.com/D51177294
Summary: **Context** - Port Paper TextInput api's to Fabric https://www.internalfb.com/code/fbsource/[25297dddce1b]/third-party/microsoft-fork-of-react-native/react-native-macos/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm?lines=507-512 **Change** - Automatic grammar checking works on Fabric TextInput Test Plan: Enable "Check Grammar With Spelling" https://pxl.cl/3MWj6 {F1146663064} Reviewers: chpurrer, lefever, #rn-desktop Reviewed By: chpurrer Differential Revision: https://phabricator.intern.facebook.com/D51179163
Summary: `BOOL` being a char type, when building with our current BUCK config we need to static cast it to `bool` in Obj-C++ files when assigning those to a `bool`. Test Plan: Build Zeratul with BUCK. ``` BUILDING: FINISHED IN 5m 13.7s (100%) 11302/11302 JOBS, 6/11302 UPDATED BUILD SUCCEEDED ``` Reviewers: shawndempsey Reviewed By: shawndempsey Differential Revision: https://phabricator.intern.facebook.com/D51258122
Saadnajmi
changed the title
fix(fabric, textinput): Enable grammer props
fix(fabric, textinput): enable autocorrect / spell check / grammer check props
Nov 21, 2024
tido64
reviewed
Nov 28, 2024
...ents/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp
Outdated
Show resolved
Hide resolved
...onents/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h
Outdated
Show resolved
Hide resolved
Saadnajmi
commented
Nov 29, 2024
...ents/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp
Outdated
Show resolved
Hide resolved
Saadnajmi
force-pushed
the
fabric/text-input-grammer
branch
from
November 30, 2024 04:01
e4f0b98
to
2d607df
Compare
Saadnajmi
changed the title
fix(fabric, textinput): enable autocorrect / spell check / grammer check props
fix(fabric, textinput): enable spelling and grammer props
Nov 30, 2024
tido64
reviewed
Dec 2, 2024
...ges/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
Show resolved
Hide resolved
tido64
approved these changes
Dec 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should reconsider whether unsetting autocorrection means falling back to default user setting.
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.
This is part of a series of PRs where we are cherry-picking fixes from #2117 to update our Fabric implementation on macOS.
Summary:
React Native macOS on the old architecture has some macOS specific props for toggling some of the built-in autocorrect / spell check / grammer check in text inputs. This change cherry-picks the changes to bring them to the new architecture.
I needed to make a couple of followup changes:
-I changed the paper event types to direct events. These feel like they should be direct events, and now they are for both paper and fabric
Test Plan:
Testing...