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

Bug fix: ActionList item label weight and spacing if description exists #3490

Merged
merged 5 commits into from
Jul 6, 2023

Conversation

langermank
Copy link
Contributor

@langermank langermank commented Jul 6, 2023

The item label should be bold is there's a description. I think this likely broke at some point recently. Also fixed the spacing between rows.

Screenshots

Before After
Action list with description before fix Action list with description after fix

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@langermank langermank requested review from a team and josepmartins July 6, 2023 03:01
@changeset-bot
Copy link

changeset-bot bot commented Jul 6, 2023

🦋 Changeset detected

Latest commit: 45d7b83

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 101.83 KB (+0.03% 🔺)
dist/browser.umd.js 102.36 KB (+0.02% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-3490 July 6, 2023 03:08 Inactive
@langermank langermank temporarily deployed to github-pages July 6, 2023 03:12 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3490 July 6, 2023 03:12 Inactive
fontWeight: slots.description && slots.description.props.variant !== 'block' ? 'bold' : 'normal',
fontWeight: slots.description ? 'bold' : 'normal',
marginBlockEnd:
slots.description && slots.description.props.variant !== 'inline' ? '4px' : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be the token space-1 than 4px?

Copy link
Member

Choose a reason for hiding this comment

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

good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can someone let me know what the syntax is meant to look like to access the spacing token here? I couldn't figure it out, gave up and used px 😛

Copy link
Member

@siddharthkp siddharthkp Jul 6, 2023

Choose a reason for hiding this comment

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

- slots.description && slots.description.props.variant !== 'inline' ? '4px' : undefined,
+ slots.description && slots.description.props.variant !== 'inline' ? 1 : undefined,

unlessssssss, styled-system doesn't understand logical properties like marginBlockEnd, only marginRight because the last release was in 2019 (open issue).

We could figure out how to add support for logical properties in primer/react or we could add '4px' for now and move on. I say 4px and move on. (only for primer, look the other way @maraisr 😛)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SIGH haha okay, thanks @siddharthkp!

Copy link
Contributor

@maraisr maraisr left a comment

Choose a reason for hiding this comment

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

Thank you so much for this :shipit:

Copy link
Contributor

@josepmartins josepmartins left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

:shipit:

@langermank langermank temporarily deployed to github-pages July 6, 2023 16:56 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3490 July 6, 2023 16:57 Inactive
@langermank langermank temporarily deployed to github-pages July 6, 2023 18:52 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3490 July 6, 2023 18:52 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants