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

Density-aware overlay close-button spacing #3533

Closed
wants to merge 6 commits into from

Conversation

tomhazledine
Copy link
Contributor

@tomhazledine tomhazledine commented Jun 7, 2024

Adjusts the right-hand spacing of <OverlayPanelContent> to match the width of the close button in all densities.

Touch density

Screenshot 2024-06-07 at 11 57 08

Medium density

Screenshot 2024-06-07 at 12 49 29

Copy link

vercel bot commented Jun 7, 2024

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

Name Status Preview Comments Updated (UTC)
saltdesignsystem ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 11:40am

Copy link

changeset-bot bot commented Jun 7, 2024

🦋 Changeset detected

Latest commit: 1d19f54

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

This PR includes changesets to release 1 package
Name Type
@salt-ds/core 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

@joshwooding
Copy link
Contributor

Converted to draft due to the scrollbar overlapping the close button

@tomhazledine
Copy link
Contributor Author

Converted to draft due to the scrollbar overlapping the close button

Talked to @bhoppers2008 about this while dev'ing, and we decided that the scrollbar/close-button overlap was the least bad of all the current options.

I guess our options are:

  1. keep the overlap
  2. make the scrollbar always visible
  3. bump the margins so that the close button always leaves enough room for a scrollbar (whether needed or not)
  4. work out if there is a scroll bar required, and only reposition the close button when there is a scroll bar

My view is that the happy-path is when all the content fits inside the overlay panel (thus no scrolling), so option 4 wouldn't be a sensible ROI 🤷

Thoughts?

@origami-z
Copy link
Contributor

Talked to @bhoppers2008 about this while dev'ing, and we decided that the scrollbar/close-button overlap was the least bad of all the current options.

Given long content isn't a common scenario, and overlapping with close button looks particularly bad on Windows, can we do

  • When not long, make it content | close
  • When long, make it content | scrollbar | close

I think overflow: auto is enough to achieve this?

@origami-z
Copy link
Contributor

Is this ready for review? Design decision made yet?

@tomhazledine
Copy link
Contributor Author

After talking to @bhoppers2008 we're going to revisit the scrollbar position in the future, but for now we're going with content | scrollbar | closebutton (which means the scrollbar never overlaps the close button). The main focus for this PR is the fix to spacing (which previously did not respect changes in density).

@tomhazledine tomhazledine marked this pull request as ready for review July 2, 2024 09:04
@tomhazledine tomhazledine requested a review from origami-z July 2, 2024 09:05
@tomhazledine tomhazledine marked this pull request as draft July 2, 2024 16:07
@tomhazledine tomhazledine force-pushed the overlay-button-overflow branch from bb9d18d to e7515b0 Compare July 3, 2024 11:14
@tomhazledine tomhazledine marked this pull request as ready for review July 3, 2024 11:15
@tomhazledine tomhazledine requested a review from origami-z July 3, 2024 11:32
Copy link
Contributor

@origami-z origami-z left a comment

Choose a reason for hiding this comment

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

Tested in chrome/safari/firefox on Mac

@tomhazledine
Copy link
Contributor Author

Closing now that we have a new approach from design: #3839

@origami-z
Copy link
Contributor

Closing now that we have a new approach from design: #3839

That does not address our user needs. Also don't know yet whether #3839 would be a viable non-breaking change

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.

Overlay close button overlaps with content when no title is used
3 participants