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 Modal component #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ayushjainrksh
Copy link
Member

Fixes #63

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 the 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 asterisks from the comments.
  • Add snackplayer example with example annotation.
  • Add platform annotation for platfroms.

Changelog

[General] [Changed] - Update the code comments in modal.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.

*
* See https://reactnative.dev/docs/modal.html
*/

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved the updated comments directly above the declared component so that it can be parsed by react-docgen.

Libraries/Modal/Modal.js Outdated Show resolved Hide resolved
events will not be emitted as long as the modal is open.

@type {@platform android, Platform.isTVOS}{@required yes} function
@type {@platform (others)}{@required no} function
Copy link
Member Author

Choose a reason for hiding this comment

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

Point of discussion

The required parameter changes with the platform used.

Screenshot

Screenshot from 2020-06-22 16-36-59

| Type | Required | Platform |
| -------- | -------- | ------------------------ |
| function | Yes | Android, Platform.isTVOS |
| function | No | (Others) |
Copy link
Member Author

Choose a reason for hiding this comment

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

@jevakallio As a special case I added the whole markdown table. How does this look?

Copy link
Member Author

Choose a reason for hiding this comment

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

Parsing the table from description works but we cannot get rid of the autogenerated table.

@ayushjainrksh ayushjainrksh self-assigned this Jun 25, 2020
@ayushjainrksh ayushjainrksh added the documentation Improvements or additions to documentation label Jun 25, 2020
* Update the title and prop description from docs.
* Remove asterisks from the comments.
* Add snackplayer example.
* Add platform annotation for platfroms.
* Cap comments to 80 characters and add annotations
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 Modal component
2 participants