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

fix(Dialog)!: Prevent a focus indicator from being cut off #1879

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

VincentSmedinga
Copy link
Contributor

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

This addresses #1828. It moves padding from Dialog down to its header, body and footer sections.

Why

To prevent focus indicators at the edge of the body to become cut off. This could happen because the body is a scroll container without any padding. The browser creates a new block formatting context for it, and it can’t draw anything outside of that.

How

n/a

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

  • Header and footer now have zero bottom and top padding – this white space is managed by the gap of the Dialog. It uses component space, while padding uses grid space, and I didn’t want to change that now.

@VincentSmedinga VincentSmedinga requested a review from a team as a code owner February 18, 2025 15:07
@VincentSmedinga VincentSmedinga changed the title fix(Dialog)!: Move padding down to header, body and footer fix(Dialog)!: Prevent a focus indicator from being cut off Feb 18, 2025
@RubenSibon
Copy link
Contributor

It uses component space, while padding uses grid space, and I didn’t want to change that now.

Is it worth the wait for the release of correct spacing tokens?

@VincentSmedinga
Copy link
Contributor Author

Is it worth the wait for the release of correct spacing tokens?

The space tokens are currently correct as well. And if we change them, we’ll come across the Dialog layout. So, no, let’s not wait.

dlnr
dlnr previously approved these changes Feb 21, 2025
Copy link
Contributor

@dlnr dlnr left a comment

Choose a reason for hiding this comment

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

This solves the overflow bug and I don't think it's breaking anything either.

@RubenSibon RubenSibon self-requested a review February 21, 2025 14:29
RubenSibon
RubenSibon previously approved these changes Feb 21, 2025
@github-actions github-actions bot temporarily deployed to demo-DES-1187-focus-cut-off-in-dialog February 25, 2025 11:12 Destroyed
# Conflicts:
#	proprietary/tokens/src/components/ams/dialog.tokens.json
@VincentSmedinga VincentSmedinga dismissed stale reviews from dlnr and RubenSibon via d12ae33 February 26, 2025 12:13
@github-actions github-actions bot temporarily deployed to demo-DES-1187-focus-cut-off-in-dialog February 26, 2025 12:13 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-1187-focus-cut-off-in-dialog February 26, 2025 12:29 Destroyed
@VincentSmedinga VincentSmedinga enabled auto-merge (squash) February 26, 2025 12:31
@VincentSmedinga VincentSmedinga merged commit 336ff55 into develop Feb 26, 2025
6 checks passed
@VincentSmedinga VincentSmedinga deleted the fix/DES-1187-focus-cut-off-in-dialog branch February 26, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants