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

Added information about the Accordion to the README of components #198

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

Conversation

paulvazbad
Copy link
Contributor

No description provided.

Copy link
Collaborator

@rhenshaw56 rhenshaw56 left a comment

Choose a reason for hiding this comment

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

Thanks, @paulvazbad I think we should do more of this documentation often. Would be nice to write up most of the docs for most of the components as well, but they're a lot.

Copy link
Contributor

@beingtmk beingtmk left a comment

Choose a reason for hiding this comment

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

Thankyou @paulvazbad, i too think this the step in the right direction, i will also try to document other components as i go through them.

| title |`string`| | Title of the Accordion |

```
<div className={`accordion ${this.props.border ? 'border' : ''}`}>
Copy link
Collaborator

@jomadoye jomadoye Apr 10, 2019

Choose a reason for hiding this comment

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

Thanks for this PR @paulvazbad.
I believe adding the full HTML of the component to the documentation would make the readME too bulky and tough to read.
Good code should be self-documenting so we can skip this part.

We should focus on documenting the props the components use, which is what you have done.
Thanks.

cc @rhenshaw56 what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I agree @jomadoye ... I think having sample HTML of how to use the component could be helpful, but it looks like this an example of the code generated by the component?

Are there any best practices for React component comments... I see a generation tool that appears to be popular:

https://github.com/styleguidist/react-styleguidist

For what it's worth, here's the format I came up with for the one component I actually documented:

https://github.com/openmrs/openmrs-react-components/blob/master/src/components/list/List.jsx#L7

I'm not necessarily married to that format (or any other), but would be great to pick a format and standardize on it.

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Thanks @paulvazbad ! I made one comment on the PR.

| title |`string`| | Title of the Accordion |

```
<div className={`accordion ${this.props.border ? 'border' : ''}`}>
Copy link
Member

Choose a reason for hiding this comment

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

I agree @jomadoye ... I think having sample HTML of how to use the component could be helpful, but it looks like this an example of the code generated by the component?

Are there any best practices for React component comments... I see a generation tool that appears to be popular:

https://github.com/styleguidist/react-styleguidist

For what it's worth, here's the format I came up with for the one component I actually documented:

https://github.com/openmrs/openmrs-react-components/blob/master/src/components/list/List.jsx#L7

I'm not necessarily married to that format (or any other), but would be great to pick a format and standardize on it.

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

Successfully merging this pull request may close these issues.

5 participants