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
Initial implementation of smaller modules
a. #1200, which breaks out the smaller modules, but leaves the component-library as the default
Cleanup smaller module implementation
a. #1208, tooling & build scripts
a. #1209, improve documentation
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.
Publish "final" ci version of component-library with deprecation warning
Switch to usage of smaller modules in other projects
a. For example, Open Elections
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?
Component Library Migration Plan
Summary
A plan to migrate from using the
component-library
to using the smaller modules outlined in #1200Motivation
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
component-library
as the defaultcomponent-library
in the2018
package.component-library
with deprecation warningcomponent-library
from the civic repoHow 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
?