Skip to content
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

[Controls] Highlight Invalid Suggestions instead of Deselecting them #164633

Closed
ThomThomson opened this issue Aug 23, 2023 · 1 comment · Fixed by #174201
Closed

[Controls] Highlight Invalid Suggestions instead of Deselecting them #164633

ThomThomson opened this issue Aug 23, 2023 · 1 comment · Fixed by #174201
Assignees
Labels
Feature:Input Control Input controls visualization impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Controls Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@ThomThomson
Copy link
Contributor

Current State

Currently, Options List Controls modify their own selections when those selections will result in no data. This acts as a set of training wheels to the Controls. With this setting on, it is impossible to use controls in a way that puts the dashboard into a no data state.

Unfortunately, this means that the query of each control can change the control’s output filters.
This results in a few drawbacks:

  • When a Dashboard loads, its panels cannot start loading until all controls have finished their load. In turn, each control loads in order, which can slow down Dashboard loading significantly.
  • If we were to allow multiple Control Groups on a Dashboard, we would need to ensure that each control group finishes its load before the rest of the dashboard panels can load.
  • It makes alternative chaining methods like bidirectional chaining more difficult to implement.

Potential Solution

If we modified this system to only highlight selections that will result in no data, we could speed up dashboard loading, allow for multiple control groups, and avoid building a system that forces controls to load first.

This change will make controls more efficient, more obvious, and more consistent.

@ThomThomson ThomThomson added Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Project:Controls impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Aug 23, 2023
@ThomThomson
Copy link
Contributor Author

ThomThomson commented Aug 23, 2023

This also has implications for the Dashboard Navigation project. Currently Controls need to load before the rest of the panels on the Dashboard. When used alongside the new Links, it can look like the destination Dashboard loads twice. Once for the Controls, once for the panels. Implementing this solution will make navigation between Dashboards with controls much more seamless.

@Heenawter @nickpeihl FYI

@Heenawter Heenawter self-assigned this Feb 20, 2024
Heenawter added a commit that referenced this issue Feb 23, 2024
Fixes #164633 

## Summary

Improves dashboard performance by not ignoring invalid Controls
selections.

This improves Dashboard performance as panels do not wait until Controls
selections are validated. Prior to this, the Controls would run
validations to find selections that would result in No Data. These
"invalid selections" would be ignored and not applied to the filters.

With this PR, all selections whether valid or invalid are applied to the
filters. This means all controls and panels can be loaded immediately
which improves the performance of the Dashboard.

Since this can be considered a breaking UI change, I've added a
suppressible toast warning users about the change.

The screenshots below show the same dashboard with invalid selections.
In the "Before" screenshot, the "Agent version" control selection is
validated before the rest of the panels are loaded. Once validated, the
invalid selection is ignored and the panels load based only on valid
selections.

In the "After" screenshot the "Agent version" control selection is
immediately applied to the filters and the rest of the dashboard is
loaded. The control selections are checked for validity only after the
filters are applied and highlighted. The warning popover notifies the
user that invalid selections are no longer ignored. Clicking the "Do not
show again" button updates the browser's localStorage so that future
warnings are suppressed.

Before:

![localhost_5601_wgf_app_home](https://github.com/elastic/kibana/assets/1638483/56f37376-7685-4225-b49a-65aa21f90f14)

 After: 
![localhost_5701_vbw_app_dashboards
(2)](https://github.com/elastic/kibana/assets/1638483/d0000b7e-8591-40ab-9302-6d1d5387b073)




@amyjtechwriter Can you please review the text in the warnings? We want
to make users aware of the change as it could abruptly change the data
in their dashboards.


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
semd pushed a commit to semd/kibana that referenced this issue Mar 4, 2024
Fixes elastic#164633 

## Summary

Improves dashboard performance by not ignoring invalid Controls
selections.

This improves Dashboard performance as panels do not wait until Controls
selections are validated. Prior to this, the Controls would run
validations to find selections that would result in No Data. These
"invalid selections" would be ignored and not applied to the filters.

With this PR, all selections whether valid or invalid are applied to the
filters. This means all controls and panels can be loaded immediately
which improves the performance of the Dashboard.

Since this can be considered a breaking UI change, I've added a
suppressible toast warning users about the change.

The screenshots below show the same dashboard with invalid selections.
In the "Before" screenshot, the "Agent version" control selection is
validated before the rest of the panels are loaded. Once validated, the
invalid selection is ignored and the panels load based only on valid
selections.

In the "After" screenshot the "Agent version" control selection is
immediately applied to the filters and the rest of the dashboard is
loaded. The control selections are checked for validity only after the
filters are applied and highlighted. The warning popover notifies the
user that invalid selections are no longer ignored. Clicking the "Do not
show again" button updates the browser's localStorage so that future
warnings are suppressed.

Before:

![localhost_5601_wgf_app_home](https://github.com/elastic/kibana/assets/1638483/56f37376-7685-4225-b49a-65aa21f90f14)

 After: 
![localhost_5701_vbw_app_dashboards
(2)](https://github.com/elastic/kibana/assets/1638483/d0000b7e-8591-40ab-9302-6d1d5387b073)




@amyjtechwriter Can you please review the text in the warnings? We want
to make users aware of the change as it could abruptly change the data
in their dashboards.


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
Fixes elastic#164633 

## Summary

Improves dashboard performance by not ignoring invalid Controls
selections.

This improves Dashboard performance as panels do not wait until Controls
selections are validated. Prior to this, the Controls would run
validations to find selections that would result in No Data. These
"invalid selections" would be ignored and not applied to the filters.

With this PR, all selections whether valid or invalid are applied to the
filters. This means all controls and panels can be loaded immediately
which improves the performance of the Dashboard.

Since this can be considered a breaking UI change, I've added a
suppressible toast warning users about the change.

The screenshots below show the same dashboard with invalid selections.
In the "Before" screenshot, the "Agent version" control selection is
validated before the rest of the panels are loaded. Once validated, the
invalid selection is ignored and the panels load based only on valid
selections.

In the "After" screenshot the "Agent version" control selection is
immediately applied to the filters and the rest of the dashboard is
loaded. The control selections are checked for validity only after the
filters are applied and highlighted. The warning popover notifies the
user that invalid selections are no longer ignored. Clicking the "Do not
show again" button updates the browser's localStorage so that future
warnings are suppressed.

Before:

![localhost_5601_wgf_app_home](https://github.com/elastic/kibana/assets/1638483/56f37376-7685-4225-b49a-65aa21f90f14)

 After: 
![localhost_5701_vbw_app_dashboards
(2)](https://github.com/elastic/kibana/assets/1638483/d0000b7e-8591-40ab-9302-6d1d5387b073)




@amyjtechwriter Can you please review the text in the warnings? We want
to make users aware of the change as it could abruptly change the data
in their dashboards.


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Input Control Input controls visualization impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Controls Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants