[Lens] Filter out pinned filters from saved object of Lens#57197
[Lens] Filter out pinned filters from saved object of Lens#57197mbondyra merged 7 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
wylieconlon
left a comment
There was a problem hiding this comment.
As discussed, please take a look at whether it makes sense to limit the filters elsewhere in the app plugin or editor frame. And please add a test!
|
@elasticmachine merge upstream |
There was a problem hiding this comment.
Nitpick: Instead of running .filter twice, can you use _.partition like const [globalFilters, appFilters] = _.partition(..., esFilters.isFilterPinned);?
Also, it seems worth it to avoid filters being undefined by having a default of []. Also a nitpick.
There was a problem hiding this comment.
Nice! We'll need to copy this into a few other places now.
6e4d7f5 to
e883885
Compare
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* master: (22 commits) Use log4j pattern syntax (elastic#57433) [ML] Categorization field example endpoint tests (elastic#57471) [Lens] Filter out pinned filters from saved object of Lens (elastic#57197) Lens client side shim cleanup (elastic#56976) [Maps] do not show border color for icon in legend when border width is zero (elastic#57501) refactors 'data-providers' tests (elastic#57474) add `absolute` option to `getUrlForApp` (elastic#57193) [Telemetry] Migrate public to NP (elastic#56285) address flaky test where instances might have different start… (elastic#57506) fix(NA): support legacy plugins path in plugins (elastic#57472) build immutable bundles for new platform plugins (elastic#53976) [SIEM] [Detection Engine] Reject if duplicate rule_id in request payload (elastic#57057) Add autocomplete="off" for input type="password" to appease the scanners (elastic#56922) Use default spaces suffix for signals index if spaces disabled (elastic#57244) [Alerting] Create alert design cleanup (elastic#56929) Management Api - add to migration guide (elastic#56892) fixing maps (elastic#56706) [Maps] Autocomplete for custom color palettes and custom icon palettes (elastic#56446) [Alerting] make actionGroup name's i18n-able (elastic#57404) fixed flaky test (elastic#57490) ... # Conflicts: # src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap # src/plugins/telemetry/public/components/telemetry_management_section.tsx
* master: (22 commits) skip flaky suite (elastic#50018) skip settings tests (elastic#57608) skip failing suite (elastic#44631) [SIEM] [Case] Initial UI (elastic#57283) handle viewing sample dashboards on default dist (elastic#57510) Fix detection of "system requests" in plugins (elastic#57149) [ML] New Platform server shim: update job service schema (elastic#57614) skip flaky suite (elastic#44631) [APM] Update monospace font family variable (elastic#57555) skip flaky test (elastic#57377) Skip save query tests (elastic#57589) [Maps] allow simultaneous opening of multiple tooltips (elastic#57226) [Uptime] Fix/host connected components (elastic#56969) [logs][metrics][docs] Update screenshots for 7.6 (elastic#57254) [ML] New Platform server shim: update job service routes to use new platform router (elastic#57403) [Maps] Fix document source top hits split by scripted field (elastic#57481) Use log4j pattern syntax (elastic#57433) [ML] Categorization field example endpoint tests (elastic#57471) [Lens] Filter out pinned filters from saved object of Lens (elastic#57197) Lens client side shim cleanup (elastic#56976) ...
Summary
Fixes #56627
Lens currently saves also pinned filters with the visualization. Our current behaviour across other apps is not to save pinned filters into any saved object.
I also removed all the warnings from React with wrapping state changes with
act, that's why more lines than you'd expect. :)Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibility- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser- [ ] This was checked for cross-browser compatibility, including a check against IE11For maintainers
- [ ] This was checked for breaking API changes and was labelled appropriately