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

No scrollbar in Select component when menu has dividers #6804

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

evansjohnson
Copy link
Contributor

@evansjohnson evansjohnson commented May 15, 2024

Fixes #6780

Checklist

  • Includes tests
  • Update documentation

I don't think these are relevant for this PR

Changes proposed in this pull request:

For a menu divider inside of a select-popover, we already have applied a 5px padding inside the popover. This means to get to full popover width we need to apply the -5px margin to the outer list element, and therefor also undo the -5px margin on the menu divider.

This PR is a variation on #6786, which correctly identified that the -5px margin on the menu divider is responsible for the scrollbar being added, but this PR additionally applies this -5px margin on the list element so that the divider continues to take up the full width.

Reviewers should focus on:

Screenshot

Before
Screenshot 2024-05-15 at 2 20 22 PM

After
Screenshot 2024-05-15 at 2 19 48 PM
*note right and bottom padding outside of list are now also removed. this seems to match what we do in the menu popover

@changelog-app
Copy link

changelog-app bot commented May 15, 2024

Generate changelog in packages/core/changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

No scrollbar in Select component when menu has dividers


Generate changelog in packages/select/changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

No scrollbar in Select component when menu has dividers


Check the box to generate changelog(s)

  • Generate changelog entry

@svc-palantir-github
Copy link

no select scrollbar with dividers

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

alpha order

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@chaejunlee
Copy link

I think going over the <Menu /> is necessary. Can you post the screenshot of it?

@evansjohnson
Copy link
Contributor Author

There's no changes to the menu in this PR, except when inside a select popover

I checked for good measure and in the generated docs preview you can see the styling menu is unaffected:
Screenshot 2024-05-16 at 5 28 33 PM

Note in #6786 since the -5px margin is removed there is a slight visual regression in the screenshot where the border no longer goes to the edge of the menu, which seems to be what the intent of that style is.

@gluxon gluxon self-assigned this May 29, 2024
Copy link
Contributor

@gluxon gluxon left a comment

Choose a reason for hiding this comment

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

Menu Items Flush

Is it intended that the menu items themselves are flush with the border of the popover after these changes? I see from your description that we wanted to make the horizontal dividers flush, which I agree with.

Screenshot 2024-05-30 at 1 15 34 PM

Here's the before picture again for reference. I think the intended visual design was to have a bit of spacing around them menu item since the light blue hover background has a slight border radius. That border radius doesn't look as great if the background is how flush with the border.

Screenshot 2024-05-30 at 1 15 23 PM

Suggestion

I'm wondering if we should tweak @mixin menu-divider()'s implementation to instead be a ::before pseudo-element that is "out of flow".

The negative margin would then only be on the pseudo-element driving the horizontal border. Since the pseudo-element is "out of flow", we would eliminate unintended CSS layout calculations (like this one) entirely in the future.

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.

Select has a horizontal scrollbar
4 participants