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

Allow several font sizes for Subhead headings #2330

Merged
merged 5 commits into from
Oct 31, 2023
Merged

Conversation

camertron
Copy link
Contributor

What are you trying to accomplish?

This PR allows adjusting the (font) size of headings in the Subhead component. A Hubber asked in Slack why Subhead headings in PVC have a font size of 24px, but a font size of 20px in PRC and in Figma. Rather than change the font size and potentially mess with a bunch of existing usages in dotcom, I have chosen to introduce two heading sizes, large (the default), and medium.

Screenshots

Large Medium
A screenshot of the Subhead component. Some heading text of 'My Heading' appears above a muted description of 'My Description'. The font size of the heading is large (24px). A screenshot of the Subhead component. Some heading text of 'My Heading' appears above a muted description of 'My Description'. The font size of the heading is medium (20px).

Integration

No changes necessary in production.

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • 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.

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2023

🦋 Changeset detected

Latest commit: 3888ac4

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

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

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 github-actions bot added ruby Pull requests that update Ruby code css Pull requests that update CSS code labels Oct 24, 2023
@camertron camertron temporarily deployed to preview October 24, 2023 21:27 — with GitHub Actions Inactive
@lesliecdubs
Copy link
Member

Thanks for working on this, @camertron!

Let's make sure to get an approval from someone on Primer Design on this PR before merge.

@camertron camertron temporarily deployed to preview October 24, 2023 21:44 — with GitHub Actions Inactive
@camertron camertron marked this pull request as ready for review October 24, 2023 22:57
@camertron camertron requested a review from a team as a code owner October 24, 2023 22:57
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Code changes look good 👍🏻

app/components/primer/beta/subhead.pcss Outdated Show resolved Hide resolved
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Suggesting primitives, but not blocking

app/components/primer/beta/subhead.pcss Outdated Show resolved Hide resolved
app/components/primer/beta/subhead.pcss Outdated Show resolved Hide resolved
Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
@camertron camertron merged commit 6bf8da5 into main Oct 31, 2023
30 checks passed
@camertron camertron deleted the subhead_heading_sizes branch October 31, 2023 21:21
@camertron camertron temporarily deployed to preview October 31, 2023 21:21 — with GitHub Actions Inactive
@primer primer bot mentioned this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css Pull requests that update CSS code minor release ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants