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

Listbox padding #2341

Closed
wants to merge 8 commits into from
Closed

Conversation

fredvisser
Copy link
Contributor

@fredvisser fredvisser commented Aug 9, 2024

Pull Request

🀨 Rationale

Brandon noted that the visual design for select, combobox, and mention, specifies a 4px 'mat' around the options, even when the content is scrolling.

πŸ‘©β€πŸ’» Implementation

Screenshot 2024-08-09 at 3 31 01β€―PM
Screen.Recording.2024-08-09.at.3.31.34.PM.mp4
  • Moved padding: var(--ni-private-listbox-padding); from the scrollable content, to the fixed listbox container
  • Made the combobox template more consistent with the select template, so the shared styling at the same effect (i.e. moved the scrollable-region class into it's own div)

πŸ§ͺ Testing

  • Manual Storybook review
  • Chromatic

βœ… Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@fredvisser fredvisser changed the title Listbox padding and scroll snap Listbox padding Aug 13, 2024
@fredvisser fredvisser marked this pull request as ready for review August 13, 2024 18:28
@@ -220,6 +220,7 @@ export const styles = css`
box-shadow: ${elevation2BoxShadow};
border: ${borderWidth} solid ${popupBorderColor};
background-color: ${applicationBackgroundColor};
padding: var(--ni-private-listbox-padding);
Copy link
Member

Choose a reason for hiding this comment

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

on windows this change is resulting in the padding being around the scrollable region which seems off.

main:
image

pr:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

There are also some suspicious Chromatic diffs. For example, the Search field seems squished and the No items found item seems taller

Copy link
Member

Choose a reason for hiding this comment

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

@fredvisser fyi the latest commit does still seem to impact the scrollbar, notice the top and bottom of the list box:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Closing the loop - the initial behavior (padding around the scrollbar) is the intended design.

However, @atmgrifter00 says he has this fix in a branch, so I'll abandon this PR.

@fredvisser fredvisser closed this Aug 15, 2024
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.

3 participants