Skip to content
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

[Fabric] Introducing autocapitalize prop in TextInput - Take 2 #13343

Öffnen Sie
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

danielayala94
Copy link
Contributor

@danielayala94 danielayala94 commented Jun 13, 2024

Description

Type of Change

New feature.

Why

Enables TextInput controls to autocapitalize letters, depending on the selected mode. This PR introduces support for characters. words and sentences are out of scope, tracked in #13479.

Resolves #13120

What

Introduced logic to update the TextInput during updateProps(), to enable/disable all character capitalization.

Testing

  • Tested manually by running the E2E Fabric Test App via Visual Studio, then typing on the corresponding TextInput fields.
  • Reused existing unit tests to run as part of the TextInputComponentTest suite.

Changelog

Yes

Microsoft Reviewers: Open in CodeFlow

@danielayala94 danielayala94 added Area: TextInput Area: Fabric Support Facebook Fabric New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Parity: Fabric vs. Paper RNW Fabric does not look or behave like RNW Paper labels Jun 13, 2024
@danielayala94 danielayala94 self-assigned this Jun 13, 2024
@danielayala94 danielayala94 requested a review from a team as a code owner June 13, 2024 00:38
@danielayala94 danielayala94 requested a review from a team July 19, 2024 23:00
});
test('TextInputs can autocapitalize: Autocapitalize Words', async () => {

// Test behavior when text is set from JS - Requires change in RN Core repo to avoid override issues
Copy link
Contributor

Choose a reason for hiding this comment

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

What change is needed in RN core? Whats the issue here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, I set defaultValues to the TextInputs featuring autocapitalization, which are declared in TextInputSharedExamples.js. Doing this caused an "override error" since that .js file is expected to be an exact copy of its parent living in RN Core. IIRC, the source of conflict was here:

\packages\@react-native\tester\overrides.json

"type": "copy",
"directory": "js/examples/TextInput",
"baseDirectory": "packages/rn-tester/js/examples/TextInput",

@danielayala94 danielayala94 requested a review from a team August 7, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Component Views Area: Fabric Support Facebook Fabric Area: TextInput New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Parity: Fabric vs. Paper RNW Fabric does not look or behave like RNW Paper
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Implement autoCapitalize property for TextInput for fabric
3 participants