microsoft / microsoft/react-native-windows

Remove Patching To TextInputExample.windows.js

Open
#5,688 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: TextInput Deforking enhancement Quick Task Upstream Workstream: Releases and Integrations
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

The examples have some freestanding text inside of properties of a React Element (see "generic generic generic"). The dev-mode React renderer will throw when it sees this, explicitly checking that any text is surrounded by a Text element. This goes through only upstream code, so this will likely affect other platforms and is worth submitting a fix for.

 {
    title: 'Auto-expanding',
    render: function(): React.Node {
      return (
        <View>
          <AutogrowingTextInputExample
            enablesReturnKeyAutomatically={true}
            returnKeyType="done"
            multiline={true}
            style={{maxHeight: 400, minHeight: 20, backgroundColor: '#eeeeee'}}>
            generic generic generic
            <Text style={{fontSize: 6, color: 'red'}}>
              small small small small small small
            </Text>
            <Text>regular regular</Text>
            <Text style={{fontSize: 30, color: 'green'}}>
              huge huge huge huge huge
            </Text>
            generic generic generic
          </AutogrowingTextInputExample>
        </View>
      );
    },
  },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open TextInputExample.windows.js and inspect the AutogrowingTextInputExample content shown in the issue. Remove the freestanding text outside Text elements, then verify that the example no longer triggers the dev-mode React renderer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
desktop, frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.