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

[RFC] Component Library Migration Plan #1207

Open
jaronheard opened this issue May 6, 2020 · 0 comments
Open

[RFC] Component Library Migration Plan #1207

jaronheard opened this issue May 6, 2020 · 0 comments
Labels
planning:RFC Request for comment. A document outlining the what, why, and how of a project.

Comments

@jaronheard
Copy link
Contributor

jaronheard commented May 6, 2020

Component Library Migration Plan

Summary

A plan to migrate from using the component-library to using the smaller modules outlined in #1200

Motivation

Primary motivations

Module size & performance

The component-library is 8.47 MB unpacked, which is way, way too big, especially when you're trying to use CIVIC components outside of civicplatform.org. You should be able to use a Button without adding mapping libraries as dependencies.
(Note that unpacked size isn't really the right way to measure the size of the module, but rest assured it is way too big, even if I don't have the gzipped numbers)

Smaller modules are easier to improve and maintain

By breaking up modules into smaller parts, we can make smaller areas of responsibility that can have the opportunity to engage contributors more effectively.

Detailed design

Plan

  1. Initial implementation of smaller modules
    a. Break up the component-library into smaller modules #1200, which breaks out the smaller modules, but leaves the component-library as the default
  2. Cleanup smaller module implementation
    a. Common module build script and tooling clean-up #1208, tooling & build scripts
    a. Common module documentation improvement #1209, improve documentation
  3. Switch to usage of smaller modules in civic repo
    a. Update default Storybook to use smaller modules. Also our hosted Storybook would be updated at this time.
    b. Update civicplatform.org to use smaller modules by replacing all uses of component-library in the 2018 package.
  4. Publish "final" ci version of component-library with deprecation warning
  5. Switch to usage of smaller modules in other projects
    a. For example, Open Elections
  6. Remove component-library from the civic repo

How we teach this

We'll want to update our documentation and Storybook to reflect the use of these smaller modules.

Drawbacks

There is a transition period where we'll have both sets of modules in the repo.

Alternatives

This could be done in a different order. It could be possible to split out the new modules into a separate repo.

Unresolved questions

When exactly is it ok to remove the component-library?

@jaronheard jaronheard added the planning:RFC Request for comment. A document outlining the what, why, and how of a project. label May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planning:RFC Request for comment. A document outlining the what, why, and how of a project.
Projects
None yet
Development

No branches or pull requests

1 participant