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 KeyboardAvoidingView component #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ayushjainrksh
Copy link
Member

@ayushjainrksh ayushjainrksh commented Jun 18, 2020

Fixes #47

Summary

The PR is towards fixing the documentation of the Components in react-native by updating the code comments in synchronisation with the actual documentation(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 with @example annotation.
  • Add inherit annotation for inherited component.

Changelog

[General] [Changed] - Update the code comments in keyboardavoidingview.js to synchronise with the react native documentation.

Test Plan

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

* Update the title and prop description from docs.
* Remove asterisks from the comments.
* Add snackplayer example with example annotation.
* Add inherit annotation for inherited component.
@ayushjainrksh ayushjainrksh added the documentation Improvements or additions to documentation label Jun 18, 2020
@ayushjainrksh ayushjainrksh requested a review from jevakallio June 18, 2020 17:40
@ayushjainrksh ayushjainrksh self-assigned this Jun 18, 2020
*/
contentContainerStyle?: ?ViewStyleProp,

/**
* Controls whether this `KeyboardAvoidingView` instance should take effect.
* This is useful when more than one is on the screen. Defaults to true.
Enabled or disabled KeyboardAvoidingView. The default is `true`.
Copy link
Member Author

Choose a reason for hiding this comment

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

The default value is given in the description in the documentation(the source of truth). I would suggest removing it from the description and adding a @default annotation for default value to keep it consistent. Or we can keep both and later remove it.

Choose a reason for hiding this comment

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

I agree, @default is better here.

* Distance between the top of the user screen and the React Native view. This
* may be non-zero in some cases. Defaults to 0.
This is the distance between the top of the user screen and the react native view,
may be non-zero in some use cases. Defaults to 0.
Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above (the default value).

Choose a reason for hiding this comment

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

I agree, @default is better here.

Copy link

@jevakallio jevakallio left a comment

Choose a reason for hiding this comment

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

LGTM. I'm ok with making the @default changes either now, or logging them for a big mass refactor later.

@ayushjainrksh
Copy link
Member Author

Okay, let's focus on our primary objective to write the script now and we'll come back to this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the KeyboardAvoidingView component
2 participants