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

DSD-1924: Heading component mobile line height #1729

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

bigfishdesign13
Copy link
Collaborator

@bigfishdesign13 bigfishdesign13 commented Jan 17, 2025

Fixes JIRA ticket DSD-1924

This PR does the following:

  • Updates the Heading component to add line-height styles for mobile.

How has this been tested?

  • local Storybook

Accessibility concerns or updates

  • n/a

Accessibility Checklist

  • Checked Storybook's "Accessibility" tab for color contrast and other issues.
  • The feature works with keyboard inputs including tabbing back and forward and pressing space, enter, arrow, and esc keys.
  • For hidden text or when aria-live is used, a screenreader was used to verify the text is read.
  • For features that involve UI updates and focusing on DOM refs, focus management was reviewed.
  • The feature works when the page is zoomed in to 200% and 400%.

Open Questions

Checklist:

  • I have updated the Storybook documentation and changelog accordingly.
  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.

Front End Review:

  • Review the Vercel preview deployment once it is ready.

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nypl-design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 6:28pm

@@ -172,7 +172,7 @@ export const headings = {
},
fontWeight: "heading.heading8",
letterSpacing: "0",
lineHeight: "1.50",
lineHeight: { base: "1.50", md: "1.50" }, // This value is intensionally the same for mobile and desktop.
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to just set this to lineHeight: "1.50" and it should be set for both mobile and the medium breakpoint.

As an aside, is 1.50 not the same as 1.5?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right. I will simplify and then update my comment to explain why this one is not setup to be responsive like the others.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, can you share documentation about the difference of 1.50 and 1.5 for line-height?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know if it's true that those two values 1.50 and 1.5 are not the same so I was asking, but I can look for resources.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, I read that as a statement and not as a question. Yes, 1.50 and 1.5 are numerically the same. However, the designer in me opted to use the same format as those that do require two decimal places. Symmetry. Consistency. All that.

@bigfishdesign13 bigfishdesign13 added Ship It Pull requests that have been reviewed and approved. and removed Needs Review Pull requests that are ready for peer review. labels Jan 22, 2025
@bigfishdesign13 bigfishdesign13 merged commit 9eafca1 into development Jan 22, 2025
5 checks passed
@bigfishdesign13 bigfishdesign13 deleted the DSD-1924/heading-line-height branch January 22, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ship It Pull requests that have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants