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

Added max-height to innerlist to get scrolling behaviour #6541

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

ehconitin
Copy link
Contributor

Fixes #6538

2024-08-05.15-46-28.mp4

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

Added max-height to StyledInnerList in CommandMenu.tsx to enable scrolling for long command menus.

  • Modified packages/twenty-front/src/modules/command-menu/components/CommandMenu.tsx to add max-height to StyledInnerList.
  • Ensures command menu is scrollable when content exceeds viewport height.
  • Improves user experience by allowing access to all items in the command menu.

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

@@ -100,6 +100,7 @@ const StyledList = styled.div`
`;

const StyledInnerList = styled.div`
max-height: calc(100vh - ${({ theme }) => theme.spacing(19)});
Copy link
Member

Choose a reason for hiding this comment

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

FYI for whoever reviews this PR ; #6209 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that out, @FelixMalfait. I switched to using dvh and also adjusted the max-height for mobile screens, which I had missed in the initial commit. I appreciate the feedback—please let me know if this addresses your concern.

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Thanks! Made an edit for clarity of code for future readers

@FelixMalfait FelixMalfait merged commit d23e5f1 into twentyhq:main Aug 5, 2024
2 of 7 checks passed
Copy link

github-actions bot commented Aug 5, 2024

Thanks @ehconitin for your contribution!
This marks your 0th PR on the repo. You're top 0% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@ehconitin ehconitin deleted the fixed-issue-6538 branch August 6, 2024 06:13
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.

Command menu is not scrollable
2 participants