Files
plane/packages/ui
c59e3b764c [WEB-4991] feat: add custom properties to work item rich filters (#4364)
* feat: add extended complex filter backend and custom property filters for enhanced querying capabilities

* feat: enhance filter operators and configurations with number range support and equality operator updates

* feat: add extended filter configs and helpers

* feat: add new property filter configurations for boolean, date, dropdown, member-picker, number, and text types

* fix: update property validation to allow custom properties in WorkItemFiltersAdapter

* feat: introduce custom property filter key and extend work item filter types

* feat: enhance work item filters with custom property configurations and member support

* feat: update ExtendedIssueFilterSet to support URL property type and enhance range filtering

* feat: refine ExtendedIssueFilterSet to enforce property type checks for various lookup operations

* feat: enhance ExtendedIssueFilterSet to include checks for deleted properties in filter queries

* fix: update work item filter condition data type to include boolean

* feat (temp): enhance custom property filters to include issue type icons and improve filter icon rendering

* - Updated the transformation logic to combine property_id and value into a single string for backend processing.
- Enhanced the filtering method to validate UUIDs and handle the new format for custom property values.

* refactor: update filter value input handling and enhance multi-value operator support

- Changed condition value handling in TextFilterValueInput to use optional chaining for better safety.
- Updated WorkItemFiltersAdapter to correctly parse raw values based on multi-value operator support.
- Introduced CORE_MULTI_VALUE_OPERATORS and EXTENDED_MULTI_VALUE_OPERATORS to categorize operators that support multiple values.
- Consolidated multi-value operators into a single export for easier access.

* refactor: enhance input validation and UI for filter value components

- Added input validation logic to disable the apply button in NumberRangeFilterValueInput, NumberFilterValueInput, and TextFilterValueInput based on user input.
- Updated PopoverFilterInput to conditionally render helper text and apply button state based on input validity.
- Improved styling for input fields by setting a consistent size across different filter components.

* refactor: enhance validation messages for filter value inputs

- Added validation messages for minimum and maximum values in NumberRangeFilterValueInput and NumberFilterValueInput components.
- Implemented similar validation messages for minLength and maxLength in TextFilterValueInput.
- Updated styling for validation messages to ensure consistency across filter components.

* refactor: improve condition value update logic in filter

- Added isEqual check to prevent unnecessary updates when the condition value remains unchanged.
- Introduced a deep clone of the condition before update to enhance validation and ensure accurate comparisons.
- Enhanced early return conditions for invalid expressions and conditions to streamline the update process.

* refactor: enhance ComplexFilterBackend and BaseFilterSet for Q object filtering

- Introduced BaseFilterSet to support Q object construction for complex filtering.
- Updated ComplexFilterBackend to utilize Q objects for building querysets.
- Improved error handling and validation in filter methods.
- Refactored filter evaluation logic to streamline query construction.

* fix: improve filter processing in BaseFilterSet to handle empty cleaned_data and optimize filter evaluation

- Added handling for cases where cleaned_data is None or empty, returning an empty Q object.
- Optimized filter evaluation by only processing filters that are provided in the request data.

* feat: enhance issue type logo sizes and integrate tooltip for custom property filters

* update ComplexFilterBackend to pass queryset in filter evaluation

* feat: add entity type support and enhance project-level filter logic for project level work items and epics custom properties

* fix: disable tooltip when work item type name is not available in work item filters

* feat: implement loader readiness checks and enhance filter configuration management

* feat: add invalid filter item component

* fix: ensure custom property filters are only enabled for active properties

* refactor: enhance ExtendedComplexFilterBackend and ExtendedIssueFilterSet for improved filtering

- Updated ExtendedComplexFilterBackend to validate filterset_class and utilize it for queryset filtering.
- Refactored ExtendedIssueFilterSet to return Q objects instead of querysets for better handling of custom property filters.
- Improved error handling for invalid filter conditions and missing filterset_class.

* refactor: update maxHeight options for dropdown components

- Changed maxHeight values in AddFilterButton and FilterItem components to specific sizes (3xl and 2xl).
- Updated CustomSearchSelect and helper types to support new maxHeight options, enhancing dropdown flexibility.

* fix: build errors

* fix: update operator labels for consistency

- Changed "contains" to "icontains" in both the operator labels and extended equality operator definitions to ensure uniformity in terminology.

* feat: add work item name filter configuration

- Introduced a new filter configuration for work item names in the useWorkItemFiltersConfig hook.
- Updated constants to include the "name" filter key in various filter configurations.
- Enhanced the ISSUE_DISPLAY_FILTERS_BY_PAGE to incorporate the new work item name filter for better filtering capabilities.

* refactor: improve filter row visibility handling with loading state

* feat: enhance name filter options in ExtendedIssueFilterSet

- Added new filtering options for the "name" field, including "exact", "icontains", "contains", "startswith", and "endswith" to improve search capabilities.

* feat: enhance rich filters with tooltip and right content support

- Added tooltip support to FilterItemProperty for displaying additional information on hover.
- Introduced rightContent property in filter configurations to allow custom content display in dropdown options.
- Updated AddFilterButton to utilize rightContent for enhanced UI.
- Refactored related hooks and components to accommodate new properties.

* fix: update maxHeight options in dropdown components

* chore: re structure rich filter value inputs for various data types

* chore: minor clean up

* fix: build errors

* enhance ComplexFilterBackend with transformation hooks for field validation

- Added _transform_field_name_for_validation and _preprocess_leaf_conditions methods to support custom property filtering.
- Updated field extraction logic to utilize the new transformation hooks for improved filter handling.
- Refactored ExtendedComplexFilterBackend to leverage these enhancements for custom property filters.

* refactor: reorganize rich-filters component structure and enhance filter item functionality

- Moved AddFilterButton to a new directory structure for better organization.
- Introduced AddFilterDropdown component to improve filter selection UI.
- Updated FilterItemProperty to handle filter selection and condition updates more effectively.
- Enhanced FilterInstance methods to support condition property updates with proper negation handling.
- Adjusted imports across various components to reflect the new structure.

* [WEB-5111] feat: add filters for created_at and updated_at in issue filter sets

- Updated IssueFilterSet and ExtendedIssueFilterSet to include "updated_at" as a filter option.
- Enhanced useWorkItemFiltersConfig to incorporate created_at and updated_at filter configurations.
- Introduced getCreatedAtFilterConfig and getUpdatedAtFilterConfig utility functions for date filters.
- Updated WORK_ITEM_FILTER_PROPERTY_KEYS to include created_at and updated_at.

* fix: build

---------

Co-authored-by: pablohashescobar <[email protected]>
Co-authored-by: Dheeraj Kumar Ketireddy <[email protected]>
Co-authored-by: Nikhil <[email protected]>
2025-10-14 13:12:54 +05:30
..
2025-10-14 01:03:31 +05:30
2023-10-02 13:40:28 +05:30