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

Use common Space type across components #1433

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jamesmockett
Copy link
Contributor

@jamesmockett jamesmockett commented May 8, 2024

What are you changing?

  • Use the common Space type in components that accept spacing values as props.
  • Fixes a bug where spacing styles are not applied if space.0 is used due to 0 being falsy.
  • Update Stack stories to better show how spacing is applied.
  • Expands Inline and Stack stories to include examples of all spacing values.
Screenshot 2024-05-08 at 15 00 27

Why?

  • It removes a small amount of duplication and avoids having to update spacing values in multiple places. New spacing values were added last year, but some components still lack support for these as their types were not updated at the same time.

Copy link

changeset-bot bot commented May 8, 2024

🦋 Changeset detected

Latest commit: 1d8ff16

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented May 8, 2024

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label May 8, 2024
@jamesmockett jamesmockett added run_chromatic Runs chromatic when label is applied and removed 📦 npm Affects a @guardian package on NPM labels May 8, 2024
@jamesmockett jamesmockett self-assigned this May 8, 2024
@github-actions github-actions bot added the 📦 npm Affects a @guardian package on NPM label May 8, 2024
@jamesmockett jamesmockett marked this pull request as ready for review May 8, 2024 14:29
@jamesmockett jamesmockett requested review from a team as code owners May 8, 2024 14:29
Copy link
Member

@sndrs sndrs left a comment

Choose a reason for hiding this comment

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

looks good, does it need a patch release?

@jamesmockett jamesmockett changed the title Use common Space type across components Use common Space type across components May 8, 2024
@jamesmockett
Copy link
Contributor Author

looks good, does it need a patch release?

Good point. I was thinking this doesn't need a release, but I suppose it does expose some new spacing values in those components. I'll add a changeset…

@jamesmockett jamesmockett force-pushed the jm/use-common-space-type branch 2 times, most recently from fb656fa to 0091e4b Compare May 16, 2024 14:11
@jamesmockett jamesmockett requested review from a team as code owners May 16, 2024 14:16
@jamesmockett jamesmockett requested a review from sndrs May 17, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 npm Affects a @guardian package on NPM run_chromatic Runs chromatic when label is applied
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants