Skip to content

Documentation: Add "components" doc #4952

Closed

Description

@gziolo

Issue Overview

@mtias tried to create an up to date documentation of all available reusable components in #2762. We decided to close this PR because there are so many components to process and this would require to manually keep in sync README files created for all exposed components and the document we want.

It'd be nice to generate new document, which will be part of Gutenberg's handbook, from each component's readme. It is possible to reuse some of the copy from #2762 and just start PRs for each component and then combine them together into one page with the script.

Activity

  1. wpscholar commented on Jul 26, 2018

    @wpscholar
    Member

    I'm thinking we could use something like Husky combined with Lint-Staged so that when a component markdown file is edited it could copy the appropriate file over to a components directory in the docs directory. Then we'd just need a top-level components page.

  2. gziolo commented on Jul 26, 2018

    @gziolo
    MemberAuthor

    We don't need to move it anywhere, we already expose README.md from components folder: https://wordpress.org/gutenberg/handbook/packages/packages-components/. We just need to create a script which properly indexes all components and includes them in this file: https://github.com/WordPress/gutenberg/blob/master/docs/manifest.json.

    At the moment we regenerate this manifest file manually with npm run docs:build so Husky and Lint-Staged would be a really nice improvement 💯

  3. wpscholar commented on Jul 26, 2018

    @wpscholar
    Member

    @gziolo So just to clarify, we want to create a script that will take any component in this location https://github.com/WordPress/gutenberg/tree/master/editor/components that has a readme file and add that to the docs? Your link points to the packages, which appear to already be dynamically indexed.

  4. gziolo commented on Jul 30, 2018

    @gziolo
    MemberAuthor

    @wpscholar, correct. This is what @youknowriad did in the past for store folders #7264. This should be a quite similar effort.

    By the way, @mmtr is working to add usage examples for all components with #8267 so we should have good materials to expose in the Gutenberg handbook.

  5. self-assigned this
    on Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions