Skip to content

Base string filter#899

Merged
gaspergrom merged 7 commits intofeature/filtersfrom
feature/base-string
May 25, 2023
Merged

Base string filter#899
gaspergrom merged 7 commits intofeature/filtersfrom
feature/base-string

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented May 24, 2023

Changes proposed ✍️

Screenshot 2023-05-24 at 19 28 34

What

🤖 Generated by Copilot at bce1d82

This pull request improves the filter components by adding custom input, select, and switch components, refactoring the code to use a FilterOperator enum, and adding configuration options and validation rules for the string filter. It also removes unused imports and code, and fixes type annotations and interfaces for better readability and type safety. The files affected are mainly in the frontend/src/shared/modules/filters directory.

🤖 Generated by Copilot at bce1d82

Sing, O Muse, of the glorious pull request
That refined the filter components with skill and zest
Removing unused imports and improving type annotation
With FilterOperator enum and custom FilterInput creation

Why

How

🤖 Generated by Copilot at bce1d82

  • Removed unused imports of defineProps and defineEmits from several filter type components (link, link, link, link, link, link, link)
  • Changed the defineEmits type annotation from any to void in several filter type components to specify the return type of the emitted events (link, link, link, link, link, link, link, link)
  • Added a popper-class attribute to the el-popover component in FilterItem.vue to remove the default padding of the popover (link)
  • Replaced the px-1 class with p-3 class in the div element that wraps the filter component in FilterItem.vue to increase the padding of the filter component (link)
  • Renamed the BooleanFilter.vue file to filter-type-boolean.vue to follow the naming convention of the filter type components (link)
  • Replaced the StringFilter.vue file with a new implementation of the string filter component in filter-type-boolean.vue that uses a custom input component, a custom inline select component, and a filter include switch component to allow the user to choose the operator, value, and inclusion of the string filter (link, link, link)
  • Added a FilterInput.vue file to implement a custom input component for the filter components that uses the el-input component from Element UI and emits the update:modelValue event to support the v-model directive (link)
  • Added a FilterInlineSelect.vue file to implement a custom inline select component for the filter components that uses the el-dropdown and el-dropdown-item components from Element UI and emits the update:modelValue event to support the v-model directive (link)
  • Added a label.operator.filter.renderer.ts file to export a constant object that maps the FilterOperator enum values to their corresponding labels for the filter components and the filter item labels (link)
  • Added a string.operator.filter.renderer.ts file to export a function that generates an array of options for the inline select component of the string filter component using the labelOperatorRenderer module (link)
  • Updated the string.filter.renderer.ts file to handle the different operators and the inclusion of the string filter value for the API query using the FilterOperator enum and the not property (link)
  • Updated the string.label.renderer.ts file to use the labelOperatorRenderer module to generate the label for the operator of the string filter value and to handle the inclusion of the filter value by adding the (exclude) text if the value is excluded (link)
  • Updated the string.parser.ts file to use the FilterOperator enum instead of a string for the operator property of the QueryUrlStringValue interface (link)
  • Updated the FilterConfig.ts file to export a FilterOperator enum that defines the possible operators for the filter values (link)
  • Updated the StringFilterConfig.ts file to use the FilterOperator enum instead of a string for the operator property of the StringFilterValue interface and to include a hideIncludeSwitch property in the StringFilterOptions interface to allow the configuration of the filter to hide the include switch component (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@joanagmaia joanagmaia requested a review from gaspergrom May 24, 2023 18:29
@joanagmaia joanagmaia force-pushed the feature/base-string branch from 202e2e6 to 103bd2e Compare May 25, 2023 14:08
@gaspergrom gaspergrom merged commit 2aa2ebc into feature/filters May 25, 2023
@gaspergrom gaspergrom deleted the feature/base-string branch May 25, 2023 14: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.

2 participants