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

Add top-padding for the Dialog Body to move closer to the React component and avoid it being glued to the divider #3253

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Jan 7, 2025

Copying commits from: #3043 in order to generate screenshots 🖼️

Original author is @HDinger


What are you trying to accomplish?

Add top-padding for the Dialog body to move it closer to the React component and avoid it being glued to the divider.

Screenshots

Before After
Default Bildschirmfoto 2024-08-30 um 14 43 59 Bildschirmfoto 2024-08-30 um 14 43 21
With large header and divider Bildschirmfoto 2024-08-30 um 14 44 29 Bildschirmfoto 2024-08-30 um 14 37 02
Custom header Bildschirmfoto 2024-08-30 um 14 45 33 Bildschirmfoto 2024-08-30 um 14 36 42
Header filter Bildschirmfoto 2024-08-30 um 14 45 12 Bildschirmfoto 2024-08-30 um 14 36 31

List the issues that this change affects.

Closes #3008

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.

What approach did you choose and why?

  • Looking at the React component, which always has a padding-top for the body of a dialog
  • In Rails this was explicitly canceled (probably because the divider is not always visible as in React??). However, this results in the body being glued to the header which looks super strange
  • I am aware that the spacings are sill not optimal and consistent with the React component, however I think that this might already be a good improvement and would fix the related issue.

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.
  • No new axe scan violation - This change does not introduce any new axe scan violations.
  • New axe violation - This change introduces a new axe scan violation. Please describe why the violation cannot be resolved below.

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.

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: e5a960e

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 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

Copy link
Contributor

github-actions bot commented Jan 7, 2025

⚠️ Visual differences found

Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review visual differences

@joshblack joshblack marked this pull request as ready for review January 8, 2025 19:05
@joshblack joshblack requested review from a team as code owners January 8, 2025 19:05
@joshblack joshblack requested review from jonrohan and langermank and removed request for a team January 8, 2025 19:05
@joshblack joshblack merged commit 3a63cf0 into main Jan 9, 2025
35 checks passed
@joshblack joshblack deleted the joshblack-opf-fix/spacing-in-dialog branch January 9, 2025 15:59
@primer primer bot mentioned this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialog spacings between content and header in Rails
3 participants