-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fixed sub-field filter dropdown content and icons #12516
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Enhanced the advanced filters sub-field selection with better UX and cleaner code implementation.
- Refactored
AdvancedFilterSubFieldSelectMenu
to use field-specific icons and labels instead of type-based ones - Added immediate field selection in
useSelectFieldUsedInAdvancedFilterDropdown
with smart defaults (e.g., 'amountMicros' for CURRENCY) - Inverted and renamed utility from
isCompositeTypeFilterableByAnySubField
toisCompositeTypeNonFilterableByAnySubField
for better clarity - Improved performance by moving field selection logic before composite type checks in
AdvancedFilterFieldSelectMenu
- Removed redundant
ICON_NAME_BY_ANY_SUB_FIELD
constant map to reduce code complexity
5 files reviewed, 5 comments
Edit PR Review Bot Settings | Greptile
...nt/src/modules/object-record/advanced-filter/components/AdvancedFilterSubFieldSelectMenu.tsx
Show resolved
Hide resolved
...t/src/modules/object-record/record-filter/utils/isCompositeTypeNonFilterableByAnySubField.ts
Show resolved
Hide resolved
...rc/modules/object-record/advanced-filter/hooks/useSelectFieldUsedInAdvancedFilterDropdown.ts
Show resolved
Hide resolved
...front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectMenu.tsx
Show resolved
Hide resolved
...rc/modules/object-record/advanced-filter/hooks/useSelectFieldUsedInAdvancedFilterDropdown.ts
Outdated
Show resolved
Hide resolved
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:39870 This environment will automatically shut down when the PR is closed or after 5 hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR improves the sub-field selection UX in advanced filters. - Now using the icon of the field instead of the field type - Now using the label of the field instead of the field type - Removed now useless constant ICON_NAME_BY_ANY_SUB_FIELD - Now selects a default value (any or default sub-field for type) when clicking on the field, instead of waiting for the user to select the sub-field Fixes twentyhq/core-team-issues#1005
This PR improves the sub-field selection UX in advanced filters.
Fixes twentyhq/core-team-issues#1005