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

[canvas][map] Canvas can not render Map with query or filter in 8.15 #199318

Closed
nreese opened this issue Nov 7, 2024 · 2 comments
Closed

[canvas][map] Canvas can not render Map with query or filter in 8.15 #199318

nreese opened this issue Nov 7, 2024 · 2 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience project:embeddableRebuild regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.15.0 v8.15.1 v8.15.2 v8.15.3

Comments

@nreese
Copy link
Contributor

nreese commented Nov 7, 2024

Steps

  1. install sample web logs
  2. create new canvas work pad
  3. Click "Add from library" and add "[Logs] Total Requests and Bytes" map to workpad
  4. Click panel actions button and select "Edit map"
  5. Add query "bytes > 5000" to map and click "Save and return".
  6. notice how the map is no longer rendered.
    Image

Problem

Filter notification action opens a popover to show filters and queries applied to the panel.
Image

Filter popover retrieves data views with the following code snippet from https://github.com/elastic/kibana/blob/8.15/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx#L59

const dataViews = useMemo(() => api.parentApi?.getAllDataViews(), [api]);

parentApi is undefined for legacy embeddables so dataViews is set to undefined. For new react embeddables, parentApi is defined by the results of useCanvasApi. parentApi does not implement getAllDataViews, resulting in the failure.

In 8.15, map embeddable was converted to the new embeddable system causing the regresion.

@nreese nreese added bug Fixes for quality problems that affect the customer experience regression v8.15.0 v8.15.1 v8.15.2 v8.15.3 labels Nov 7, 2024
@nreese nreese self-assigned this Nov 7, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 7, 2024
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas project:embeddableRebuild labels Nov 7, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 7, 2024
@nreese nreese changed the title [canvas][map] Map with query or filter can not render in 8.15 [canvas][map] Canvas can not render Map with query or filter in 8.15 Nov 7, 2024
nreese added a commit that referenced this issue Nov 8, 2024
Resolves #199318. Issue only
exists in 8.15 branch.

### Test steps
1) install sample web logs
2) create new canvas work pad
3) Click "Add from library" and add "[Logs] Total Requests and Bytes"
map to workpad
4) Click panel actions button and select "Edit map"
5) Add query "bytes > 5000" to map and click "Save and return".
6) Ensure map panel is rendered with filter notification popover

![Image](https://github.com/user-attachments/assets/2689bbb5-c22b-4c28-9e86-2eeef48f2676)

Co-authored-by: Elastic Machine <[email protected]>
@nreese
Copy link
Contributor Author

nreese commented Nov 8, 2024

Closed by #199339

@nreese nreese closed this as completed Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience project:embeddableRebuild regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.15.0 v8.15.1 v8.15.2 v8.15.3
Projects
None yet
Development

No branches or pull requests

2 participants