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] parent API should implement unified search interface with react embeddables #183766

Closed
nreese opened this issue May 17, 2024 · 1 comment · Fixed by #183772
Closed

[canvas] parent API should implement unified search interface with react embeddables #183766

nreese opened this issue May 17, 2024 · 1 comment · Fixed by #183772
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience impact:critical This issue should be addressed immediately due to a critical level of impact on the product. project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nreese
Copy link
Contributor

nreese commented May 17, 2024

Canvas currently passes filters and timeRange to embeddables via input. This is not the correct pattern for react embeddables. Instead, parentApi (used for rendering react embeddables) should implement unified search interface and pass filters and time range via that interface.

How it should work

  1. install sample web logs
  2. create new canvas work pad
  3. Click "Add element" -> "Filter" -> "Dropdown select"
  4. Select "data" tab and configure filter to pull from logs sample data and machine.os.keyword field.
    Screenshot 2024-05-17 at 10 47 32 AM
  5. Select "display" tab and "Value column" and "Filter column" to machine.os.keyword.
    Screenshot 2024-05-17 at 10 51 13 AM
  6. Click "Add from library" and select map that ships with logs sample data
  7. Click "Expression editor" button in lower right corner to open the expression editor for the map and prefix the expression with kibana | selectFilter | embeddable
    Screenshot 2024-05-17 at 10 53 36 AM
  8. Interact with filter and notice how map updates to filter changes
@nreese nreese added bug Fixes for quality problems that affect the customer experience blocker Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas impact:critical This issue should be addressed immediately due to a critical level of impact on the product. project:embeddableRebuild labels May 17, 2024
@elasticmachine
Copy link
Contributor

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

@nreese nreese self-assigned this May 17, 2024
nreese added a commit that referenced this issue May 22, 2024
…h react embeddables (#183772)

Closes #183766

### test instructions
1. start kibana with `yarn start --run-examples`
2. install sample web logs data set
3. create new canvas work pad
4. Click "Add element" -> "Filter" -> "Dropdown select"
5. Select "data" tab and configure filter to pull from logs sample data
and `machine.os.keyword` field.
6. Select "display" tab and "Value column" and "Filter column" to
`machine.os.keyword`.
7. Click "Add element" -> "Filter" -> "Time filter"
9. Click "Select type" -> "Search example"
10. Click panel context menu -> "Settings" and turn off custom time
range
11. Click "Expression editor" button in lower right corner to open the
expression editor for the map and prefix the expression with `kibana |
selectFilter | embeddable`
<img width="500" alt="Screenshot 2024-05-17 at 11 50 42 AM"
src="https://github.com/elastic/kibana/assets/373691/453096d5-c254-4f43-a09c-386586aa05a1">
12. Interact with drop down filter and time range filter. Verify Search
react embeddable updates as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience impact:critical This issue should be addressed immediately due to a critical level of impact on the product. project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
2 participants