Ab#78019 changing the context filter to use the filter builder
Description
The purpose of the ticket was to implement the filter-builder in place of the JSON builder within the 'shared-contextual-filters-settings' component. My goal was to maintain the same variable that previously stored the filter as the one responsible for receiving the result from the filter-builder, aiming to minimize the impact of the changes on the system. With that said, I will describe below how the implementation is functioning:
- Inside 'shared-contextual-filters-settings,' I prepare a variable responsible for retrieving the information selected by the user in the filter-builder.
- The 'shared-filter-builder' component was created to handle necessary situations before calling the existing component that creates the filter.
- In the calls to 'shared-contextual-filters-settings,' it was necessary to create a variable that stores information needed for the process.
- I am assuming that the filter field for all forms calling the 'contextual-filters-settings' component is 'contextFilters.'
- To apply the filter, I require at least one resource linked to the dashboard, as it follows an existing filter builder pattern.
Useful links
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Improvement (refactor or addition to existing functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
- [X] A dashboard was created, and a resource and layout were added. Fields were included in this layout.
Screenshots
Checklist:
( * == Mandatory )
- [X] * I have set myself as assignee of the pull request
- [X] * My code follows the style guidelines of this project
- [X] * Linting does not generate new warnings
- [X] * I have performed a self-review of my own code
- [X] * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
- [X] * I have commented my code, particularly in hard-to-understand areas
- [X] * I have put JSDoc comment in all required places
- [X] * My changes generate no new warnings
- [X] * I have included screenshots describing my changes if relevant
- [X] * I have selected labels in the Pull Request, according to the changes with code brings
- [ ] I have made corresponding changes to the documentation ( if required )
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Adjustments made:
- Merged the alpha branch.
- Adjusted so that the search logic is done within the component that creates the filter.
@AntoineRelief I pushed some fixes and refactoring. Now it's working, but maybe we'll have to check deeper in all the filter flow and form logic because im sure that this can be improved.
Deleted the {{filter.}} check as with the new filter builder that won't be needed anymore, and now the context filters for widgets are correctly applied 👍