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

[Lens] allow embeddable client to customize legend filter actions #169656

Closed
drewdaemon opened this issue Oct 24, 2023 · 5 comments
Closed

[Lens] allow embeddable client to customize legend filter actions #169656

drewdaemon opened this issue Oct 24, 2023 · 5 comments
Labels
enhancement New value added to drive a business result Feature:Lens impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@drewdaemon
Copy link
Contributor

Describe the feature:
As of #145708, embeddable consumers can supply custom legend actions. However, the default filtering actions are always present and there is no way to customize their behavior (defined in code).

Screenshot 2023-10-24 at 7 50 24 AM

Describe a specific use case for the feature:

The security team uses a custom query bar that doesn't integrate automatically with the default filtering behavior: #168199

@drewdaemon drewdaemon added Team:Visualizations Visualization editors, elastic-charts and infrastructure impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Oct 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@stratoula stratoula added enhancement New value added to drive a business result Feature:Lens labels Oct 24, 2023
@drewdaemon drewdaemon added 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 Oct 24, 2023
@drewdaemon
Copy link
Contributor Author

Adjusting impact to "high" because this is currently blocking an 8.11 bugfix for the security team (#168199).

@drewdaemon
Copy link
Contributor Author

drewdaemon commented Oct 26, 2023

Technical plan

  // This callback is called before displaying any legend actions in an XY chart
  // to check if they should be shown
  shouldShowLegendAction?: (id: string) => boolean;

angorayc added a commit that referenced this issue Oct 31, 2023
…ine (#170127)

## Summary

#168199
#169656


https://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5

---------

Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 31, 2023
…ine (elastic#170127)

## Summary

elastic#168199
elastic#169656

https://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5

---------

Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 8103a44)
kibanamachine added a commit that referenced this issue Nov 1, 2023
…n timeline (#170127) (#170269)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[SecuritySolution] Fix topN legend actions - filter in / out in
timeline (#170127)](#170127)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Angela
Chuang","email":"6295984+angorayc@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-10-31T17:30:08Z","message":"[SecuritySolution]
Fix topN legend actions - filter in / out in timeline (#170127)\n\n##
Summary\r\n\r\nhttps://github.com//issues/168199\r\nhttps://github.com//issues/169656\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5\r\n\r\n---------\r\n\r\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8103a445855f72dd1755a4fd4364e4573ec6a194","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ExpressionLanguage","Team:Threat
Hunting","Team: SecuritySolution","Team:Threat
Hunting:Explore","Feature:Lens
Charts","v8.11.0","v8.12.0","v8.11.1"],"number":170127,"url":"https://github.com/elastic/kibana/pull/170127","mergeCommit":{"message":"[SecuritySolution]
Fix topN legend actions - filter in / out in timeline (#170127)\n\n##
Summary\r\n\r\nhttps://github.com//issues/168199\r\nhttps://github.com//issues/169656\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5\r\n\r\n---------\r\n\r\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8103a445855f72dd1755a4fd4364e4573ec6a194"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170127","number":170127,"mergeCommit":{"message":"[SecuritySolution]
Fix topN legend actions - filter in / out in timeline (#170127)\n\n##
Summary\r\n\r\nhttps://github.com//issues/168199\r\nhttps://github.com//issues/169656\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5\r\n\r\n---------\r\n\r\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8103a445855f72dd1755a4fd4364e4573ec6a194"}}]}]
BACKPORT-->

Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
delanni pushed a commit to delanni/kibana that referenced this issue Nov 6, 2023
…ine (elastic#170127)

## Summary

elastic#168199
elastic#169656


https://github.com/elastic/kibana/assets/6295984/ff5cee55-6da5-4636-85f5-a697a302f8b5

---------

Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@angorayc
Copy link
Contributor

Follow up issue: #171284

One more suggestion for Drew about the long term plan to clean up the actions :
Please consider registering Lens default actions to ui actions and talk to ui-actions team about a request to add an new api, for example, replaceExistingAction to src/plugins/ui_actions/public/service/ui_actions_service.ts
In this case, consumers who need custom actions could use that api to replace the default actions with their custom actions. Thanks so much for the help!

@drewdaemon
Copy link
Contributor Author

@angorayc added this capability in #170127.

#169983 tracks a full inventory and improved design of how we allow consumers to customize visualization interactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants