Docusaurus: Component library for classic-theme

Created on 15 Jul 2020  路  4Comments  路  Source: facebook/docusaurus

馃挜 Proposal

  • We should implement a component library for the classic theme.
  • Those components would be reusable across the theme, and not coupled to a specific plugin.
  • We could have a storybook for the theme
  • We could do visual regression diffing using tools like Chromatic
  • A user should be able to reuse such a component in custom pages

See also https://github.com/facebook/docusaurus/discussions/3064#discussioncomment-37801 => one usecase could to be give users the ability to reuse the docs sidebar on custom pages, if they want to create their own hardcoded sidebar in a custom page.

Some questions:

  • Should it live in a separate package? so that all themes (including custom themes) can import it?
  • Which components should be in this library?
mlh proposal v2

Most helpful comment

I'd love to see storybook being implemented. My question is would you scope storybook to this proposed component library only, or the whole project? I could help with this.

Docusaurus core does not depend on Infima, but the classic theme does.
I think we should scope this to the classic theme, as all the comps we'll make would use Infima classes. What do you think @yangshun ?

Great idea, I'd love to work on this as well but reserved for MLH it seems

We should setup some initial infra, and then we could split the work by migrating component by component, so there will be work for everybody :p

All 4 comments

Having the components in a separate package can give some modularity, it can promote integrating components in custom themes as you've highlighted.

In terms of components, apart from the navigation - code blocks, announcement bars

I'd love to see storybook being implemented. My question is would you scope storybook to this proposed component library only, or the whole project? I could help with this.

I'd love to see storybook being implemented. My question is would you scope storybook to this proposed component library only, or the whole project? I could help with this.

Great idea, I'd love to work on this as well but reserved for MLH it seems

I'd love to see storybook being implemented. My question is would you scope storybook to this proposed component library only, or the whole project? I could help with this.

Docusaurus core does not depend on Infima, but the classic theme does.
I think we should scope this to the classic theme, as all the comps we'll make would use Infima classes. What do you think @yangshun ?

Great idea, I'd love to work on this as well but reserved for MLH it seems

We should setup some initial infra, and then we could split the work by migrating component by component, so there will be work for everybody :p

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipmjohnson picture philipmjohnson  路  3Comments

JoelMarcey picture JoelMarcey  路  3Comments

omry picture omry  路  3Comments

NikitaIT picture NikitaIT  路  3Comments

sebqq picture sebqq  路  3Comments