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: navigation drawer clip while making folder in favorites #8619

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

harshrajeevsingh
Copy link
Contributor

Fixes: #8606

Reason for the issue:

The issue was caused by the padding in TEXT_INPUT_STYLE, which was being applied to the StyledTextInput component used in NavigationDrawerInput.

Changes

  • Overrode the padding in StyledTextInput with a value of 0.
  • Added padding-right: 8px to the Icon. This ensures consistent spacing between the Icon and the input value, maintaining the same visual alignment as before.
Screencast.from.2024-11-20.23-32-24.webm

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 navigation drawer overflow issue when creating favorite folders by adjusting input and icon padding in NavigationDrawerInput component.

  • Removed default padding from StyledTextInput in /packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerInput.tsx to prevent overflow
  • Added paddingRight: theme.spacing(2) to Icon component to maintain consistent spacing
  • Ensures input text stays within drawer boundaries while preserving visual alignment

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

@@ -27,6 +31,7 @@ export const FavoriteFolderPickerFooter = () => {
<MenuItem
className="add-folder"
onClick={() => {
setIsNavigationDrawerExpanded(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

@martmull How about this? I missed this earlier and added it here -- not related to the issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ehconitin nice change
You should add also a setFavoriteFolderExpanded(true) when clicking on the add folder icon on the navigationDrawer
image

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.

Hey, nice one thank you. One comment

@@ -27,6 +31,7 @@ export const FavoriteFolderPickerFooter = () => {
<MenuItem
className="add-folder"
onClick={() => {
setIsNavigationDrawerExpanded(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

@ehconitin nice change
You should add also a setFavoriteFolderExpanded(true) when clicking on the add folder icon on the navigationDrawer
image

@ehconitin ehconitin requested a review from martmull November 25, 2024 19:37
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 guys

@martmull martmull enabled auto-merge (squash) November 25, 2024 19:43
@martmull martmull merged commit 4952693 into twentyhq:main Nov 25, 2024
17 checks passed
Copy link
Contributor

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

Contributions

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.

Navigation drawer clip while making folder in favorites
3 participants