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

Increase the default space between form elements #3087

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HDinger
Copy link
Contributor

@HDinger HDinger commented Sep 13, 2024

What are you trying to accomplish?

Currently, long forms are very hard to grasp. The elements are all very close together making it hard to recognize which text belongs to which input field. In this PR, I slightly increased the space between individual elements in a form to create a clearer visual differentiation.

Screenshots

Before After
Bildschirmfoto 2024-09-13 um 09 15 40 Bildschirmfoto 2024-09-13 um 09 12 34
Bildschirmfoto 2024-09-13 um 09 15 04 Bildschirmfoto 2024-09-13 um 09 18 38
Bildschirmfoto 2024-09-13 um 09 16 33 Bildschirmfoto 2024-09-13 um 09 13 07
Bildschirmfoto 2024-09-13 um 09 14 39 Bildschirmfoto 2024-09-13 um 09 13 41

Integration

No

List the issues that this change affects.

Closes #3042

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.

What approach did you choose and why?

Increase the space between form elements by using the --stack-gap-normal variable for the .FormControl-spacingWrapper instead of a custom space.

In the linked issue it was discussed whether we should touch the spacings on the form groups instead. I decided to not touch the groups here, as imho the framework should be able to render a good looking form without needing to wrap every element into an individual group.

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.

@HDinger HDinger requested review from a team as code owners September 13, 2024 07:22
@HDinger HDinger requested review from langermank and removed request for a team September 13, 2024 07:22
Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: 1b98497

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

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.

Form elements do not have sufficient vertical spacing
1 participant