-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lens] allow user to disable auto apply #125158
[Lens] allow user to disable auto apply #125158
Conversation
b85cd65
to
49069af
Compare
c575d08
to
6e6f127
Compare
…uto-apply-duplicate-state-strategy
900315a
to
4811574
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good to me.
There's one "bug" I found:
updateTimeRange(storeDeps.lensServices.data, store.dispatch); |
is updating the search session id and the time range which is implicitly applying and sending out another request. To reproduce, set current time range to 15mins, turn off auto apply and wait for 20 seconds, then do a change - it will be applied automatically. I suggest we just turn off this "outdated now" behavior as long as auto apply is not active.
One behavior I found a bit strange: Changing query/filter/timerange is reloading the chart (which is expected), but it's also auto-applying all changes made to the config in the meantime. This is theoretically fine, but it's different than TSVB and Visualize agg based behavior and IMHO it's closer to what a user would expect. cc @ghudgins @MichaelMarcialis what do you think?
...ck/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
Outdated
Show resolved
Hide resolved
...ck/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
Outdated
Show resolved
Hide resolved
Thanks for pinning this down. I had seen the behavior but hadn't yet been able to reproduce reliably. This has been addressed so that, while auto-apply is disabled, the time range is only updated when the user applies changes.
I don't think anyone objected to this last week during my demo at the vis-editors sync, but I still agree with you that it could be unexpected behavior. After digging into it a bit, I found that this behavior is due to
It isn't clear how to address both of these issues. Any ideas? |
Per our discussion in today's vis editors sync, I think the current implementation (auto-applying all changes when a query/filter/date picker change is made) makes sense given that the reason to add this feature was to provide users an option that avoids having to perform multiple, performance-heavy re-renderings of the visualization. Applying only query/filter/date picker changes and no other changes asks that users also apply and re-render their visualization a second time, which goes against that original intent. |
@elasticmachine merge upstream |
…ithub.com:andrewctate/kibana into 74490/disable-auto-apply-duplicate-state-strategy
@stratoula thanks for the catch. I fixed it 👍 |
💚 Build SucceededMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tested it once again and I can't find other bugs. Thanx @andrewctate for applying all the comments! 🥇
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Allows user to disable Lens's current auto-apply behavior. This enables them to save on resources associated with rendering a complex or large visualization.
Screen.Recording.2022-02-15.at.4.10.50.PM.mov
With full-screen datasource
![Screen Shot 2022-02-16 at 10 31 56 AM](https://user-images.githubusercontent.com/315764/154312529-5d067894-f7b7-4cc5-bc5e-475d96ec5a61.png)
Resolves #74490
Filters and suggestions are still applied automatically. Open for feedback here.