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 filter multi select #8682

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Fix filter multi select #8682

merged 5 commits into from
Nov 22, 2024

Conversation

bosiraphael
Copy link
Contributor

  • Created a dropdown inside a dropdown for the ObjectFilterDropdownOperandDropdown so the operand can be opened over the selection with an offset
  • Refactored dropdown component and introduced DropdownUnmountEffect to close the dropdown when the component unmounts
  • Removed old logic

Before:
Capture d’écran 2024-11-22 à 14 03 58

After:
Capture d’écran 2024-11-22 à 14 03 40

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

This PR refactors the filter dropdown functionality to implement a nested dropdown pattern for operand selection, improving UI by allowing operands to appear over the main selection with proper offset spacing.

  • Added new ObjectFilterDropdownOperandDropdown component in /packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownOperandDropdown.tsx to handle nested dropdown behavior
  • Added DropdownUnmountEffect component in /packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownUnmountEffect.tsx to properly close dropdowns on component unmount
  • Added ObjectFilterDropdownOperandDropdown scope to FiltersHotkeyScope enum for keyboard shortcut handling
  • Removed old unfolding state logic (isObjectFilterDropdownOperandSelectUnfolded) across multiple components in favor of nested dropdown approach
  • Added className prop support to DropdownMenuHeader and DropdownMenuItemsContainer for better style customization

18 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile

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.

Behavior looks really nice
Small comments, PR approved nevertheless

@martmull martmull enabled auto-merge (squash) November 22, 2024 13:57
@martmull martmull merged commit f44e293 into main Nov 22, 2024
19 checks passed
@martmull martmull deleted the fix-filter-multi-select branch November 22, 2024 14:08
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.

2 participants