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

Frontend documentation and components gallery #4383

Merged
merged 37 commits into from
Dec 4, 2017
Merged

Conversation

edmundoa
Copy link
Contributor

This PR introduces a frontend documentation site built with React Styleguidist.

The documentation and site is still in a very early stage, but I think it's better to merge the changes sooner than later, since there are already lots of them.

As a summary, I took care of two things in this PR:

  1. Install and do a basic configuration of React Styleguidist. I am still not satisfied with the styling, and we need to find a way of properly mocking stores, as they currently try to do one request
  2. Document all our common components. For now I also included other components in the gallery, but they are still not documented. I will take care of that in further PRs
  3. Write some very basic global frontend documentation. We need to expand that in the future as well

To see the new documentation site, we have two new yarn scripts that let you do that:

  • yarn run docs:server will run a development server with the documentation
  • yarn run docs:build will generate HTML that can be used to serve the site from the local system or another server

I'm sorry about the length of the PR 🐙 I can split it up if the reviewer thinks that will make the task easier.

Edmundo Alvarez added 30 commits November 22, 2017 11:36
- Include shared components in the gallery
- Add build scripts to build the gallery and serve it
React Select uses `labelKey` instead of `displayKey` so pass the right
prop down.
This prop was not updated when we migrated to our own Input component.
We used the wrong import here, `moment` doesn't know about timezones.
As we specify the `onChange` prop in the TimezoneSelect prop types, we
should at least use it instead of passing it down as other props that
are not listed.

We should restrict the supported props at some point, protecting
our code from changes in underlying components.
@edmundoa edmundoa added this to the 3.0.0 milestone Nov 29, 2017
@ghost ghost assigned edmundoa Nov 29, 2017
@edmundoa edmundoa removed their assignment Nov 29, 2017
@edmundoa
Copy link
Contributor Author

edmundoa commented Nov 29, 2017

As I change many files in here, it's normal the linter is complaining. I didn't see any warnings in IntelliJ while writing the documentation, so I hope there are no new issues from the changes in here.

@bernd bernd self-assigned this Dec 4, 2017
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

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

Good work! 👍

@bernd bernd merged commit 84843a8 into master Dec 4, 2017
@ghost ghost removed the ready-for-review label Dec 4, 2017
@bernd bernd deleted the components-gallery branch December 4, 2017 16:37
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.

2 participants