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

fix(tokens)!: correct space and size tokens #10727

Merged
merged 31 commits into from
Nov 27, 2024

Conversation

alisonailea
Copy link
Contributor

@alisonailea alisonailea commented Nov 14, 2024

Related Issue: #10012 #10014

Summary

Corrects space and size tokens to align with the Calcite UI Kit and uses REM based tokens for the web platform token output. Updates Calcite Components to ensure there are no visual breaking changes to components using the updates size and space tokens.

BREAKING CHANGE: Size and Space token values have changed. Line Height tokens exported for JS and ES6 are now unitless.

Size

calcite-size-px: 1px;
calcite-size-xxxs: 0.75rem; // 12px was 2px
calcite-size-xxs: 0.875rem; // 14px was 4px
calcite-size-xs: 1rem; // 16px was 6px
calcite-size-sm: 1.5rem; // 24px was 8px
calcite-size-sm-plus; // removed
calcite-size-md: 2rem; // 32px was 12px
calcite-size-md-plus; // removed
calcite-size-lg: 2.75rem; // 44px was 16px
calcite-size-xl: 3rem; // 48px was 20px
calcite-size-xxl: 4rem; // 64px was 24px
calcite-size-xxxl: 6rem; // 96px was 32px

Space

calcite-spacing-none: 0; // new
calcite-spacing-px: 1px;
calcite-spacing-base: 2px;
calcite-spacing-xxs: 0.25rem; // 4px
calcite-spacing-xs: 0.375rem; // 6px
calcite-spacing-sm: 0.5rem; // 8px
calcite-spacing-sm-plus: 0.625rem; // new
calcite-spacing-md: 0.75rem; // 12px
calcite-spacing-md-plus: 0.875rem; // new
calcite-spacing-lg: 1rem; // 16px was 14px
calcite-spacing-xl: 1.25rem; // 20px was 16px
calcite-spacing-xxl: 1.5rem; // 24px was 20px
calcite-spacing-xxxl: 2rem; // 32px

Pixel based tokens are now categorized under "fixed"

calcite-size-fixed-xxxl: 32px; // deprecated
calcite-size-fixed-xxl: 24px; // deprecated
calcite-size-fixed-xl: 20px; // deprecated
calcite-size-fixed-lg: 16px; // deprecated
calcite-size-fixed-md: 12px; // deprecated
calcite-size-fixed-sm: 8px; // deprecated
calcite-size-fixed-xs: 6px; // deprecated
calcite-size-fixed-xxs: 4px; // deprecated
calcite-size-fixed-xxxs: 2px; // deprecated

calcite-spacing-fixed-lg: 14px; // deprecated
calcite-spacing-fixed-md: 12px; // deprecated
calcite-spacing-fixed-sm: 8px; // deprecated
calcite-spacing-fixed-xl: 16px; // deprecated
calcite-spacing-fixed-xs: 6px; // deprecated
calcite-spacing-fixed-xxl: 20px; // deprecated
calcite-spacing-fixed-xxs: 4px; // deprecated
calcite-spacing-fixed-xxxl: 32px; // deprecated

@alisonailea alisonailea added breaking change Issues and pull requests with code changes that are not backwards compatible. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. design-tokens Issues requiring design tokens. labels Nov 14, 2024
Base automatically changed from lumina to dev November 15, 2024 04:47
BREAKING CHANGES

moves all old pixel based size tokens to a “fixed” category and marks them for deprecation.
new default size tokens are different sizes
new default size tokens convert to REMs when built for web platforms
BREAKING CHANGES

moves all old pixel based space tokens to a “fixed” category and marks them for deprecation.
new default space tokens are different values
new default space tokens convert to REMs when built for web platforms
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Can you update the breaking change footer to follow the conventional commits spec (see example in conventions and example PRs)? Otherwise, it won't get picked up in the changelog.

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

We'll need to keep and deprecate the spacing-named tokens in favor of space tokens since these were not deprecated beforehand.

#10012 wasn't marked as breaking, but If we restore the spacing ones, I think we could bundle it with #10014 for the 3.0 release, as they're related. I can update our 3.0 doc afterward. cc @ashetland @geospatialem

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
⭐🚀🚀🚀🚀⭐🚀⭐⭐⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐⭐🚀🚀🚀⭐⭐🚀🚀⭐⭐🚀⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐🚀⭐
⭐🚀⭐⭐🚀⭐🚀⭐⭐⭐⭐⭐🚀⭐🚀⭐⭐⭐⭐🚀⭐⭐⭐⭐🚀⭐⭐🚀⭐🚀🚀⭐🚀🚀⭐🚀⭐⭐⭐⭐🚀⭐
⭐🚀🚀🚀🚀⭐🚀⭐⭐🚀⭐⭐🚀⭐🚀🚀🚀⭐⭐⭐🚀🚀⭐⭐🚀⭐⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀🚀🚀⭐⭐🚀⭐
⭐🚀⭐⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀⭐🚀⭐⭐⭐⭐⭐⭐⭐🚀⭐🚀⭐⭐🚀⭐🚀⭐⭐⭐🚀⭐🚀⭐⭐⭐⭐⭐⭐
⭐🚀⭐⭐🚀⭐⭐🚀⭐⭐⭐🚀⭐⭐🚀🚀🚀🚀⭐🚀🚀🚀⭐⭐⭐🚀🚀⭐⭐🚀⭐⭐⭐🚀⭐🚀🚀🚀🚀⭐🚀⭐
⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

…i/calcite-design-system into ali-openPR/10012-10014-space-size-tokens-refactor
@alisonailea alisonailea added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Nov 27, 2024
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
This reverts commit f18208b.
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
@alisonailea alisonailea added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 27, 2024
@alisonailea alisonailea merged commit febb217 into dev Nov 27, 2024
15 checks passed
@alisonailea alisonailea deleted the astump/10012-10014-space-size-tokens branch November 27, 2024 23:26
@github-actions github-actions bot added this to the 2024-12-17 - Dec Milestone milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Issues and pull requests with code changes that are not backwards compatible. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. design-tokens Issues requiring design tokens. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants