Skip to content

[drilldowns] do not add ON_APPLY_FILTER to embeddable supported triggers#261018

Merged
nreese merged 4 commits intoelastic:mainfrom
nreese:remove_nested_triggers
Apr 9, 2026
Merged

[drilldowns] do not add ON_APPLY_FILTER to embeddable supported triggers#261018
nreese merged 4 commits intoelastic:mainfrom
nreese:remove_nested_triggers

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Apr 2, 2026

Follow up to #259637

Before this PR, drilldown UI code added ON_APPLY_FILTER to an embeddable's supported triggers. This auto-magically allowed embeddables that implemented HasSupportedTriggers interface to support drilldowns that used ON_APPLY_FILTER trigger.

This auto-magic could cause problems with "as code" schemas. Embeddables register supported triggers on server during schema generation. Embeddables could not list ON_APPLY_FILTER in their supported triggers, allowing the UI to create drilldowns with triggers that are not contained in the schema. In practice this did not happen, but we want to avoid the possibility for such a mistake.

This PR resolves the issue by removing the magic. Drilldown UI code no longer adds ON_APPLY_FILTER
to an embeddable's supported triggers. Instead, embeddables must explicitly includeON_APPLY_FILTER in supported triggers list.

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 2, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 8, 2026

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 8, 2026

/ci

@nreese nreese marked this pull request as ready for review April 8, 2026 19:25
@nreese nreese requested review from a team as code owners April 8, 2026 19:25
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// backport:version Backport to applied version labels Project:Dashboards API v9.4.0 v9.5.0 release_note:skip Skip the PR/issue when compiling release notes labels Apr 8, 2026
@botelastic botelastic bot added Feature:Drilldowns Embeddable panel Drilldowns Feature:Embedding Embedding content via iFrame labels Apr 8, 2026
* or ON_SELECT_RANGE is supported.
* @param triggers
*/
function ensureNestedTriggers(triggers: string[]): string[] {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now lens specifically adds these triggers clientside? I'm not sure why we need to keep this function and move it into Lens rather than changing Lens to include the ON_APPLY_FILTER trigger

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lens defines triggers for each vis type in services.visualizationMap. I chatted with @nickofthyme about this, and we decided the cleanest implementation was to add ON_APPLY_FILTER to getSupportedTriggers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want you could create an issue for us to investigate why this was done in the first place and clean it up later.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A followup issue would be great yes

@nreese nreese requested a review from ThomThomson April 8, 2026 21:06
Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM! Code only review

@nreese nreese merged commit ce8d5d6 into elastic:main Apr 9, 2026
34 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.5

https://github.com/elastic/kibana/actions/runs/24204958404

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.5 The branch "9.5" does not exist

Manual backport

To create the backport manually run:

node scripts/backport --pr 261018

Questions ?

Please refer to the Backport tool documentation

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 9, 2026

Main is still tracking 9.4 so no backport needed

@nreese nreese added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels v9.5.0 labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Drilldowns Embeddable panel Drilldowns Feature:Embedding Embedding content via iFrame Project:Dashboards API release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants