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

Update the TouchableHighlight component #29654

Conversation

ayushjainrksh
Copy link
Contributor

@ayushjainrksh ayushjainrksh commented Aug 14, 2020

Fixes MLH-Fellowship#194

Summary

The PR is part of an effort to update the code comments to match the current documentation on the React Native website. The project is a part of MLH fellowship program and involves automatic generation of the website docs from code comments and flow types as the end result.

To learn more about the project you can visit the project wiki:

Link to the documentation(the source of truth):

Changes

  • Update the title and prop description from docs.
  • Remove unnecessary * from the code comments.
  • Add Snack player example specified in the docs to the code comments.
  • Remove default values from description and add it to @default annotation.
  • Cap comments to 80 characters.

Changelog

[Internal]

Test Plan

All changes are made to the code comments and thus there is no need for testing.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 14, 2020
@analysis-bot
Copy link

analysis-bot commented Aug 14, 2020

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,763,643 -239,415
android hermes armeabi-v7a 6,426,602 -240,059
android hermes x86 7,151,283 -272,100
android hermes x86_64 7,041,203 -273,070
android jsc arm64-v8a 8,935,603 -227,323
android jsc armeabi-v7a 8,590,947 -227,703
android jsc x86 8,766,361 -244,963
android jsc x86_64 9,341,908 -246,506

Base commit: eecb930

@analysis-bot
Copy link

analysis-bot commented Aug 14, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: eecb930

Comment on lines 132 to 147
```jsx
function MyComponent(props) {
return (
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}>
<Text>My Component</Text>
</View>
);
}

<TouchableHighlight
activeOpacity={0.6}
underlayColor="#DDDDDD"
onPress={() => alert('Pressed!')}>
<MyComponent />
</TouchableHighlight>;
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be indented:

Suggested change
```jsx
function MyComponent(props) {
return (
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}>
<Text>My Component</Text>
</View>
);
}
<TouchableHighlight
activeOpacity={0.6}
underlayColor="#DDDDDD"
onPress={() => alert('Pressed!')}>
<MyComponent />
</TouchableHighlight>;
```
```jsx
function MyComponent(props) {
return (
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}>
<Text>My Component</Text>
</View>
);
}
<TouchableHighlight
activeOpacity={0.6}
underlayColor="#DDDDDD"
onPress={() => alert('Pressed!')}>
<MyComponent />
</TouchableHighlight>;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@motiz88 Sorry for that, I've made an amend.

Copy link
Contributor

@motiz88 motiz88 left a comment

Choose a reason for hiding this comment

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

LGTM except for indentation in the comment.

* Update the title and prop description from docs.
* Remove asterisks from the comments.
* Add snackplayer example.
* Cap comments to 80 characters.
* Add platform, default and type annotations.
@ayushjainrksh ayushjainrksh force-pushed the components/TouchableHighlight branch from ffd95dc to ad318f4 Compare August 18, 2020 15:00
@ayushjainrksh ayushjainrksh requested a review from motiz88 August 18, 2020 15:01
@github-actions
Copy link

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 25, 2023
@github-actions
Copy link

github-actions bot commented Jul 2, 2023

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the TouchableHighlight component
4 participants