You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
The text was updated successfully, but these errors were encountered:
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
a. Break up the component-library into smaller modules #1200, which breaks out the smaller modules, but leaves the
component-library
as the defaulta. Common module build script and tooling clean-up #1208, tooling & build scripts
a. Common module documentation improvement #1209, improve documentation
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 the2018
package.component-library
with deprecation warninga. For example, Open Elections
component-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
?The text was updated successfully, but these errors were encountered: