-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lens][Embeddable] Apply the correct references for filters (#204047)
## Summary Fixes #180726 Fix the filter references when inline editing with the correct ones. I've tried to reduce the fix to a minimal `extract` wrapper, but unfortunately that is not possible due to some shared logic who rely on the passed filters references and need to be injected. So, why not injecting them and instead rely on the search context api? Right now there's no difference, but formally the `api.filters$` is the right place to get the latest version, and if in the future the `Edit filters` flows would change, this api should be the go-to place to have the right value. Why not adding a FTR? There's a bigger problem with the panel filters action who has a dynamic `data-test-subj` value which is impossible to get right now. I would rather prefer to fix that first and then add some tests in general for multiple scenarios in Lens. ## Testing it locally * Create a viz with a filter in the editor, save and return to dashboard * Check the filters are shown correctly in the dashboard panel * Edit inline and change the chart type. Apply changes * Check the filters are shown correctly * Now "edit" in the editor without changing anything * Check the filter can be edited correctly (no empty popover) ✅ or 💥 * Save and return to dashboard * Check the filters are shown correctly ✅ or 💥
- Loading branch information
Showing
3 changed files
with
58 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters