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

feat: Add id prop to Text, TouchableWithoutFeedback and View docs #3285

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,16 @@ This can be one of the following values:

---

### `id`

Used to locate this view from native code. Has precedence over `nativeID` prop.

| Type |
| ------ |
| string |

---

### `maxFontSizeMultiplier`

Specifies the largest possible scale a font can reach when `allowFontScaling` is enabled. Possible values:
Expand Down
10 changes: 10 additions & 0 deletions docs/touchablewithoutfeedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ This defines how far your touch can start away from the button. This is added to
| ---------------------- |
| [Rect](rect) or number |

### `id`

Used to locate this view from native code. Has precedence over `nativeID` prop.

| Type |
| ------ |
| string |

---

### `onBlur`

Invoked when the item loses focus.
Expand Down
12 changes: 12 additions & 0 deletions docs/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ For example, if a touchable view has a height of 20 the touchable height can be

---

### `id`

Used to locate this view from native classes. Has precedence over `nativeID` prop.

> This disables the 'layout-only view removal' optimization for this view!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
> This disables the 'layout-only view removal' optimization for this view!
> This disables the 'layout-only view removal' optimization for this view!

Can you explain this part a bit broader or provide a reference (link) for the optimization you are referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% sure what this is TBH, but this is the exact same wording used in the nativeID section

https://github.com/facebook/react-native-website/blob/main/docs/view.md?plain=1#L309

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, I see so you have just copied it over from the other prop. Let's leave this as-is for now, and I will ask around if someone can clarify this not a bit (or maybe even it's no longer valid, will see).


| Type |
| ------ |
| string |

---

### `importantForAccessibility` <div class="label android">Android</div>

Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only.
Expand Down