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

Consolidate packages into cfpb-design-system #2005

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

anselmbradford
Copy link
Member

@anselmbradford anselmbradford commented Jul 26, 2024

This PR seeks to simplify distribution of the DS by consolidating all the packages into the single @cfpb/cfpb-design-system package and deprecating the other packages. The /dist/ folder contains all packages merged together, as well as each individual component as their own built files. This will be released as v3.0.0 of the DS.

The file structure is inspired by https://sass-guidelin.es/#architecture

packages
  cfpb-design-system
    dist
      …
    src
      abstracts
      base
      components
        cfpb-buttons
        cfpb-expandables
        cfpb-forms
        cfpb-icons
        cfpb-layout
        cfpb-notifications
        cfpb-pagination
        cfpb-tables
        cfpb-typography
      utilities
        behavior
        transition

Changes

  • Consolidate packages into cfpb-design-system.
  • Make js filenames consistently lowercase + dash separated + non-plural.
  • Import .scss files through the JS, making the entry points only JS.
  • Move tests files to live with their accompanying components.
  • Move simulateEvent test utility function to global space.
  • Move font to a mixin and use CSS custom property for font-stack.
  • Convert normalize.css to normalize.scss and remove some browser prefixes that the linter removed.

Testing

  1. Visit PR preview site and compare to github pages.

Todos

  • Update outdated font usage instructions (such as removing @cf-fonts-path references).
  • Remove lerna and maybe replace it with release-it.
  • Refactor heading mixins to remove font size override and replace it with a margin override.

@anselmbradford anselmbradford force-pushed the ans_single_package2 branch 3 times, most recently from 9ccb86e to ee363b4 Compare July 26, 2024 23:13
Copy link

netlify bot commented Jul 26, 2024

Thanks for the improvements! Browse a preview of your changes using the link below.

Name Link
🔨 Latest commit 2c0940d
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system/deploys/66b3edda1a2b4800084530fc
😎 Deploy Preview https://deploy-preview-2005--cfpb-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@anselmbradford anselmbradford force-pushed the ans_single_package2 branch 3 times, most recently from 5bcc595 to a5162f7 Compare July 31, 2024 14:15
@anselmbradford anselmbradford added the lerna-changelog/breaking lerna label. DO NOT MODIFY label Aug 2, 2024
@anselmbradford anselmbradford force-pushed the ans_single_package2 branch 12 times, most recently from 734407b to 6a0dbfb Compare August 7, 2024 13:26
Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool! Things generally seem correct to me. Are you planning on getting the TODOs in this PR or another?

await ctx.rebuild();
await ctx.dispose();
}
//await copy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably delete this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! Removed in 2c0940d

@anselmbradford
Copy link
Member Author

This is cool! Things generally seem correct to me. Are you planning on getting the TODOs in this PR or another?

I will get to them in another!

Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, let's do it.

@anselmbradford anselmbradford merged commit d2971a9 into main Aug 8, 2024
8 checks passed
@anselmbradford anselmbradford deleted the ans_single_package2 branch August 8, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lerna-changelog/breaking lerna label. DO NOT MODIFY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants