Skip to content

Fix missing menu border padding #11782

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

abdulrahmancodes
Copy link
Contributor

Demo

Screen.Recording.2025-04-29.at.10.46.38.AM.mov

Closes #11766

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed dropdown menu padding regression by adjusting container spacing and scroll wrapper styling.

  • Modified padding in StyledDropdownMenuItemsExternalContainer to theme.spacing(1, 1, 0, 1) to remove bottom padding
  • Added margin-bottom: theme.spacing(1) to StyledScrollWrapper for consistent spacing
  • Replaced basic ScrollWrapper with StyledScrollWrapper in scrollable case for uniform styling

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@prastoin prastoin self-requested a review April 29, 2025 14:51
Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

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

Hey @abdulrahmancodes thanks for your contribution
Unfortunately this brings the following regression due to StyledDropdownMenuItemsExternalContainer bottom-margin removal

@abdulrahmancodes
Copy link
Contributor Author

Hey @abdulrahmancodes thanks for your contribution
Unfortunately this brings the following regression due to StyledDropdownMenuItemsExternalContainer bottom-margin removal

Ah, got it. Didn’t realize that was affecting layout elsewhere. I’ll investigate and make sure it is fixed.

@prastoin prastoin self-requested a review April 29, 2025 16:10
Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

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

Decided to refactor the component globally as it was kinda hard to get through in the first place

Not sure about what container should handle the spacing, fixed and implemented a solution following @abdulrahmancodes initial idea

@lucasbordeau same here if you could give this an review please 🙏

@prastoin prastoin self-requested a review April 30, 2025 09:14
Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

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

Created a new abstraction to handle ScrollWrapper dynamic display in order to simplify initial component and restored padding attributes usage only

I think we should mainly good to go with this, @lucasbordeau could you please have a look ?

@abdulrahmancodes
Copy link
Contributor Author

Hey @prastoin , just wanted to check - is the padding after the scrollbar okay?

Screen.Recording.2025-04-30.at.2.53.53.PM.mov

@prastoin
Copy link
Contributor

prastoin commented Apr 30, 2025

Hey @prastoin , just wanted to check - is the padding after the scrollbar okay?

Screen.Recording.2025-04-30.at.2.53.53.PM.mov

Ah yes my bad you're right, about to fix

@prastoin prastoin self-requested a review April 30, 2025 10:11
@prastoin prastoin dismissed their stale review April 30, 2025 10:11

Testing ci merge

Copy link
Contributor

github-actions bot commented Apr 30, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:55195

This environment will automatically shut down when the PR is closed or after 5 hours.

Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

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

import { PropsWithChildren, useId } from 'react';

const StyledScrollWrapper = styled(ScrollWrapper)`
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

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

Open question: Not sure why this is required here but it is, not getting globally applied from the index.css

Copy link
Contributor

@lucasbordeau lucasbordeau left a comment

Choose a reason for hiding this comment

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

This PR breaks the scroll wrapper mechanism, if you want to merge it please do a big round of tests on any dropdown and resize the window vertically to test the scroll behavior, and make the appropriate changes.

@prastoin prastoin self-requested a review April 30, 2025 14:47
Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

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

Here is a repro, first part of the video with StyledPaddingBlockContainer second commented StyledPaddingBlockContainer

were you talking about that @lucasbordeau ?

Screen.Recording.2025-04-30.at.16.46.18.mov

@lucasbordeau
Copy link
Contributor

Main :

Enregistrement.de.l.ecran.2025-04-30.a.16.59.34.mov

This branch :

Enregistrement.de.l.ecran.2025-04-30.a.17.00.00.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menus - Regression - Missing bottom padding on menus
4 participants