Skip to content

Fragmented documentation #6069

Description

@PavelVanecek

Situation

So we have three different sources of documentation:

  1. The recharts.org website
  2. The storybook args
  3. The Typescript type definition

And bonus! Five sources for what is the default value:

  1. The same three as above
  2. The component itself
  3. Defaults in the reducer/slice in state

The problem

There is nothing that forces these five places to be synchronized and so depends where you look you will find conflicting information.

What have I tried

I tried to play around with https://storybook.js.org/docs/configure/integration/typescript but it doesn't seem to be working quite 100% - for example it doesn't set the defaults in the Controls tab (currently we use getStoryArgsFromArgsTypesObject for this which works fine but requires us to manually maintain the argTypes).

This docgen solution anyway will allow us to generate (2) storybook args from (3) the type but it will not solve the website and will not solve the component default props being out of sync with the type and will not solve the reducer defaults out of sync with the type.

Alternatives?

We could have a script that checks that these all places are in sync?

Any other ideas?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions