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: dropdowns should have a max-height & padding from screen #8055

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

harshrajeevsingh
Copy link
Contributor

Fixes: #6105

Problem

  • The dropdown gets clipped when the number of filters increases.

Solution

  • Added scroll property to the DropdownMenu
  • Added size middleware to the floating UI hook.
  • Provided padding of 20px to the size middleware, so that it maintains distance from the bottom of the screen.
Screencast.from.2024-10-25.13-47-04.webm

@FelixMalfait
Copy link
Member

/award 500
I'm not confident enough to approve but rewarding the effort at least! Thanks!

Copy link

oss-gg bot commented Oct 25, 2024

Awarding harshrajeevsingh: 500 points 🕹️ Well done! Check out your new contribution on oss.gg/harshrajeevsingh

@harshrajeevsingh
Copy link
Contributor Author

@FelixMalfait Thanks for your constant support :)

Copy link
Contributor

@martmull martmull left a comment

Choose a reason for hiding this comment

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

LGTM, thank you that's nice fix. I have just updated the padding value so it matches figma design

@martmull martmull enabled auto-merge (squash) October 28, 2024 16:44
@martmull martmull merged commit e648d94 into twentyhq:main Oct 28, 2024
16 checks passed
@harshrajeevsingh
Copy link
Contributor Author

@martmull Thanks for the merge. But due to some recent changes to this component (before raising this PR), I found an issue with this solution. In the attached screencast, you can see that at some point, the dropdown behaves weirdly.
However, I found a solution for this. Can you raise an issue? Then, I can make a PR with a different solution.

Screencast.from.2024-10-29.13-51-57.webm

@martmull
Copy link
Contributor

@harshrajeevsingh ok thank you for checking that. I will revert that merge and then open a new issue so you can add a proper solution to that issue

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.

Dropdowns should have a max-height and a scroll bar
4 participants