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

Introduction of new spacing grid #3285

Merged

Conversation

alessioventuriniAND
Copy link
Contributor

@alessioventuriniAND alessioventuriniAND commented Aug 6, 2024

What is the context of this PR?

Some changes have been made to our current spacing grid. Our rems used to be 18px , they are now 16px.
We have also aligned all of our components line height to the below table. So any component that had a bespoke line height has been edited to the closest match where possible.

The type matrix has been updated to reflect the below table.

Image

BREAKING CHANGES

  • Description of change: New margin and padding sizes and have been introduced and relevant utility classes have been updated with the new corresponding size

  • Reason for change: As we have changed the size of our rems to be 16px we needed to introduce new sizes to support our updated spacing grid.

  • Components impacted:

    • Any component or layout where you have manually set our margin or padding utility classes.
  • Migration steps:

    1. Locate all instances of the utility classes in your codebase.
    2. Replace old size name with new corresponding size name
    • Click for example:
      EG: 
      .ons-u-mt-xs --> .ons-u-mt-2xs
      .ons-u-mb-xl --> .ons-u-mb-3xl
      //OLD Sizes
      $sizes: (
          no: 0,
          xxs: 0.25rem,
          xs: 0.5rem,
          s: 1rem,
          m: 1.5rem,
          l: 2rem,
          xl: 3rem,
          auto: auto,
      );
      
      //NEW Sizes 
      $sizes: (
          no: 0,
          4xs: 0.125rem,
          3xs: 0.25rem,
          2xs: 0.5rem,
          xs: 0.75rem,
          s: 1rem,
          m: 1.25rem,
          l: 1.5rem,
          xl: 2rem,
          2xl: 2.5rem,
          3xl: 3rem,
          4xl: 4rem,
          5xl: 5rem,
          auto: auto,
      );

Considerations.

Some visual changes have been applied to buttons.

How to review this PR

The VR tests will look different. The button and inputs have been aligned with the Figma library whilst the rest of the components should just be slightly smaller due to our smaller rems(now 16px) If you see bigger changes in the VR tests please highlight it.

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

Copy link

netlify bot commented Aug 6, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 33e2cca
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/670534ef71851b0008173869
😎 Deploy Preview https://deploy-preview-3285--ons-design-system-preview.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.

@alessioventuriniAND alessioventuriniAND marked this pull request as draft August 6, 2024 11:08
@alessioventuriniAND alessioventuriniAND self-assigned this Aug 7, 2024
@alessioventuriniAND alessioventuriniAND changed the title Enhancement/69/change utility classes to 8px grid Introduction of new spacing grid. Aug 7, 2024
@alessioventuriniAND alessioventuriniAND changed the base branch from main to major-release September 10, 2024 14:02
@alessioventuriniAND alessioventuriniAND added the Breaking changes This PR contains at least one breaking change label Sep 10, 2024
@alessioventuriniAND alessioventuriniAND marked this pull request as ready for review September 10, 2024 14:05
@alessioventuriniAND alessioventuriniAND marked this pull request as draft September 10, 2024 14:06
…ithub.com:ONSdigital/design-system into enhancement/69/change-utility-classes-to-8px-grid
…ithub.com:ONSdigital/design-system into enhancement/69/change-utility-classes-to-8px-grid
…ithub.com:ONSdigital/design-system into enhancement/69/change-utility-classes-to-8px-grid
@rmccar rmccar merged commit 88da872 into major-release Oct 8, 2024
42 checks passed
@rmccar rmccar deleted the enhancement/69/change-utility-classes-to-8px-grid branch October 8, 2024 14:47
@rmccar rmccar mentioned this pull request Oct 8, 2024
2 tasks
rmccar pushed a commit that referenced this pull request Oct 9, 2024
rmccar pushed a commit that referenced this pull request Oct 9, 2024
* Standardise setting heading level across components #3111

* Update param names to camel case naming standard #3188

* Renamed utility class from ons-grid--flex to ons-grid-flex #3268

* Removed metadata component #3275

* Remove call to action component and all references #3143

* Update parameter from UnreadLink to UnreadLinkUrl in Message component #3290

* Update parameter subject from text to object type in Message list component #3291

* Add option for additional logo in footer #3227

* Update parameter from link to text in Footer Component #3294

* Update parameter name from url to src in Image Component #3293

* Update parameter names from LogoImage and LogoURL to image and url a in header component #3292

* Update parameter name from url to linkUrl in feedback component #3295

* Rename summary component parameters #3224

* Refactor timeline macro for compatibility with Jinja2 templates #3180

* Update parameter names in document list component #3299

* Update param name settingsLinkTextURL to settingsLinkURL in Cookies Banner component #3300

* Update parameter names in card component #3303

* Update parameter from linkText to text in external link component #3304

* Update param name from title to text in section navigation component #3305

* Update parameter from linkText to videoLinkText in Video Component #3306

* Update parameter from manualLink to manualLinkUrl in Address Input component #3307

* Ensure list item custom attributes are always set on list item #3336

* Rename items summary param for compatibility with Jinja #3382

* Update DS components to ensure compatibility with Jinja #3380

* Rename html OGL Link param to current naming standard #3379

* Format migration guide #3377

* Introduction of new spacing grid #3285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking changes This PR contains at least one breaking change
Projects
None yet
4 participants