-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Drilldowns] Trigger picker #74751
[Drilldowns] Trigger picker #74751
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
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.
did a quick look over the code, LGTM
src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
Outdated
Show resolved
Hide resolved
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.
Checked on Chrome, LGTM. I would try to use string[]
type instead of SupportedTriggers
to simplify types. Also see next comment about popup title.
"Apply filter" popup title now appears (popup should be without title):
When creating a "Say hello only for range select" drilldown for the first time saw the message below, not sure if that is expected.
Then created that type of drilldown two times and both succeeded.
Maybe in the future when a drilldown supports multiple triggers we could show the trigger picker:
x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_definition.ts
Show resolved
Hide resolved
x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_definition.ts
Show resolved
Hide resolved
@streamich, regarding error probably you this wasn't a clean es run? so some older Drilldowns data was there? |
…icker # Conflicts: # src/plugins/ui_actions/public/service/ui_actions_execution_service.ts # x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx # x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_definition.ts
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.
Reviewed on chrome. Changing triggers works correctly, and actions with only one trigger don't show the trigger picker as expected.
One small thing I noticed, is some inconsistencies in the mapping between supported triggers on embeddables, and the supported triggers on actions. For instance:
- A vislib bar chart where the x-axis uses a terms aggregation. In this case, the embeddable doesn't allow brushing, but still allows the 'range select' drilldowns to be added. When you add a drilldown in this state, it is impossible to trigger it.
I see that the embeddable is configured to support the brushing action, due to the date histogram functionality. I am wondering if it's even possible to get this level of granularity, where an embeddable's triggers change based on its configuration.
Overall, this issue shouldn't get in the way of merging this PR! LGTM
@elasticmachine merge upstream |
@ThomThomson, good catch. Now supported triggers are static depending on a vis type: https://github.com/elastic/kibana/blob/master/src/plugins/vis_type_vislib/public/histogram.ts#L55 |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
Drilldowns now support trigger picker. It allows to create a drilldown and specify which trigger it should be attached to. Co-authored-by: Elastic Machine <[email protected]>
Drilldowns now support trigger picker. It allows to create a drilldown and specify which trigger it should be attached to. Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Closes: #59569
Latest designs: #59569 (comment)
Part of: #42845
Needed for URL drilldown
Feature description
Please note, until we introduce new drilldowns (URL drilldown), user won't see any of those changes.
To play with it using example drilldowns start kibana with
--run-examples
flagFrom dev perspective
When defining a drilldown now developer also has to specify list of triggers the drilldown supports.
Drilldown's execution context should match trigger's context, otherwise typescript will fail.
Example of hello world drilldown which works only for
SELECT_RANGE_TRIGGER
:SELECT_RANGE_TRIGGER
is required to be repeated in 2 different places:supportedTriggers
. This will actually be used in runtime.From user perspective
Triggers listed on a drilldown and triggers supported by embeddable type now properly work with each other:
Consider following scenarios:
With trigger picker:
No trigger picker (trigger auto picked because only 1 was available):
Please note: Dashboard-to-dashboard drilldown user experience didn't change
Even-though dashboard to dashboard drilldown can be trigged both by bursting over chart or clicking on a point in a chart, user doesn't have to specify what interaction wants to attach a dashboard drilldown to.
This is because dashboard drilldown uses different high-level trigger (APPLY_FILTER_TRIGGER)
TODO: