accordproject / cicero-ui

A library of React components for Accord Project templates
Apache License 2.0
29 stars 46 forks source link

Storybook for all AP Components #399

Closed dselman closed 4 years ago

dselman commented 4 years ago

I've recently completed a spike on aggregating all the AP components into a single Storybook, and investigated how we might use various features: knobs, notes, docs, actions ...

The results are here: https://github.com/accordproject/web-components

I also took the opportunity to standardise the build for all components to use react-create-library which does a nice job of web packing the libraries and standardises how they are tested, linted etc.

The repo above shows the following features:

Note that I could not get Cicero-UI to play nice with react-create-library due to some strange Webpack errors, hence it is referenced as an external package from npm. More investigation needed....

Possible Actions and Questions

  1. Is this the way we want to go?
  2. Can we get Cicero-UI to play nice with react-create-library?
  3. When/how do we refresh the code?
  4. Do we care about losing GH history for the files?
  5. We will need to do more work on each Story to add more useful knobs and actions
  6. Do we want to move away from Netlify for static sites in general? The GH Actions are fast and seem to work well.
  7. When do we cut over and archive the old repos?
  8. We need to test that publishing the npm packages from the new repo works
irmerk commented 4 years ago
  1. Is this the way we want to go?
  2. Can we get Cicero-UI to play nice with react-create-library?

I think as long as we can get Cicero-UI to work with react-create-library, this is the route to go. All of our components are related (cicero-ui, concerto-ui, markdown-editor, etc.), and I think we should have them housed in the same area to reflect that. It just adds more difficulty on the potential consumer/developer to have them spread out. The added benefit of the Storybook having everything together for development and demoing purposes is great.

  1. When/how do we refresh the code?

If we do keep them separate, I would think on major releases we would refresh. A sort of LTS version.

  1. Do we care about losing GH history for the files?

A little bit, but not enough to sway me.

  1. We will need to do more work on each Story to add more useful knobs and actions

Agreed, but this is already much better than the current demos we have, so I don't see this as an issue.

  1. Do we want to move away from Netlify for static sites in general? The GH Actions are fast and seem to work well.

Faster, free, and more consolidation under GitHub sounds great to me.

  1. When do we cut over and archive the old repos?
  2. We need to test that publishing the npm packages from the new repo works

I think along with your second point, we would cut over once we solve the Cicero-UI in react-create-library and npm publishing issues.

DianaLease commented 4 years ago

I agree with the above. IIRC, cicero-ui's configuration is not much different from markdown-editor's, so I think we should be able to get it to work with create-react-library if the markdown-editor worked.

That seems to be the only blocker to this change for me. Although I don't really understand what is meant by 3. When/how do we refresh the code?.

jeromesimeon commented 4 years ago

A few things from my end:

DianaLease commented 4 years ago

On @jeromesimeon 's third point, I think we'll definitely still be able to have separate lifecycles for different projects. Also, often we'll release markdown-editor, then update cicero-ui to use that new release, and possibly then also release cicero-ui. How would that workflow go in this new setup? I assume we would still release each package separately, correct?

irmerk commented 4 years ago

Finished with web-components