OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[VisBuilder] When creating wizard from visualization page, provide additional options to add to new/existing dashboard, or add to library
Is your feature request related to a problem? Please describe. When user creates a wizard:
- User can go to the dashboard page, choose a dashboard and create wizard there by clicking
EditandCreate newhttps://github.com/opensearch-project/OpenSearch-Dashboards/pull/2384 - User can go to the visualization page, and create wizard; however, if user wants to add the wizard to a specific dashboard, they would need to go to the dashboard page and choose the dashboard and click
Add
Describe the solution you'd like When user takes the second route to create wizard from the visualization page, we can provide an option for user to add the wizard directly to the dashboard. Here is the UI mockup: @btzeng
- User can add the wizard to an existing dashboard
- User can add the wizard to a new dashboard
- User can add the wizard to the library(save as a saved object, not related to any dashboard)

@abbyhu2000 thanks for posting this. Let's prioritize number 1 and 3 for now. Add to a new dashboard requires another flow to create a new dash. Will put more thought on this one.
[Planning]
@btzeng do you have insight for a new dashboard?
As I work on this issue, some questions arise and i want more opinions:
- Visualizations in OpenSearch Dashboards has a 1 to many relationship with dashboards so that means we allow the same visualization to be added to multiple dashboards. However, by adding this dropdown to add to a single dashboard when creating the visualization, it seems to imply to the end user that visualizations have a 1 to 1 relationship with dashboards. (it is a little confusing so i don’t know if we should allow adding to multiple dashboards option here)
- Currently we have two options: ‘Add to saved objects’ and ‘Add to dashboard’, and by having these two options here seem to imply that it’s either adding to dashboard or adding to saved objects. But it’s not true because we always store visualization in the saved object no matter which option the end user chooses. So i think maybe it makes more sense to make ‘Add to dashboard’ a toggle other than a radio group?
- Since we need to display a list of dashboards in the dropdown for this feature, and i am wondering if it is a good idea to make the dashboard plugin and wizard plugin too tightly coupled. Will there ever be a scenario that user disable the dashboard plugin and only use the visualization or the wizard plugin? I remember there are previous chats about a long term design idea that we should be able to rip out any plugin within the repo and just have users install them -> https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2065#issuecomment-1217242671
- Is there permission control on creating visualization and editing dashboard? Will we have scenario that end user is only allowed to create visualization but is not allowed to edit a dashboard?
@ashwin-pc @joshuarrrr @kavilla @btzeng @KrooshalUX @kgcreative
- Visualizations in OpenSearch Dashboards has a 1 to many relationship with dashboards so that means we allow the same visualization to be added to multiple dashboards. However, by adding this dropdown to add to a single dashboard when creating the visualization, it seems to imply to the end user that visualizations have a 1 to 1 relationship with dashboards. (it is a little confusing so i don’t know if we should allow adding to multiple dashboards option here)
We can use OuiComboBox here to multi-select dashboards and keep the same 1:many relationship.
2. Currently we have two options: ‘Add to saved objects’ and ‘Add to dashboard’, and by having these two options here seem to imply that it’s either adding to dashboard or adding to saved objects. But it’s not true because we always store visualization in the saved object no matter which option the end user chooses. So i think maybe it makes more sense to make ‘Add to dashboard’ a toggle other than a radio group?
We can remove `Add to saved objects. By Saving, it automatically adds to saved objects, and there is no case where a saved object is added to a dashboard, but NOT added to saved objects, so this will simplify the flow.
3. Since we need to display a list of dashboards in the dropdown for this feature, and i am wondering if it is a good idea to make the dashboard plugin and wizard plugin too tightly coupled. Will there ever be a scenario that user disable the dashboard plugin and only use the visualization or the wizard plugin? I remember there are previous chats about a long term design idea that we should be able to rip out any plugin within the repo and just have users install them -> [DISCUSS] What constitutes a new plugin being a core plugin #2065 (comment)
I think it makes sense to add this conditionally (if dashboards exist, then display the add to dashboard link, otherwise don't) -- this will help this be more extensible in the future
cc: @btzeng
Blocking for now: until @abbyhu2000 @btzeng @opensearch-project/opensearch-ux work out the finer details.
@abbyhu2000 great callouts. @kgcreative @btzeng This makes me think if we can actually make the save and navigation logic a lot simpler and sensible for the user?
My proposal:
- Consolidate all save buttons into one. (Saves as, Save and Return, etc) to a simple "Save" button. This is only responsible for saving a visualization (Either as a new saved object, or save as, or overwrite depending on the usecase). No redirection.
- Add a new "Dashboards" button that opens up a modal in which you can manage how the visualization is linked to a dashboard
The Dashboard manager (i.e. the popup that opens when you click the button) should do the following:
- Show all Dashbaords that the visualization is already linked to
- Have the ability to link the visualization to existing dashboards from a picker of sorts
- The ability to navigate to any dashboard by clicking on it
- The ability to create a dashboard and link the visualization to it
- The "Dashboard" button should only be available once the visualization has been saved atleast one
Here is a similar UX that does just this:
@ashwin-pc @kgcreative @btzeng Although I think it is a useful flow to allow user add visualization directly to dashboard, there are currently some implementation blockers. First of all, we do not have existing flow that let user to add any visualization directly to a dashboard outside of the dashboard app. The current flow is that user go to the dashboard and add the visualization from the add panel or they can create new. The visualization will show up on the dashboard, but the relationship is not actually saved. It only gets saved when user clicks the save button on the dashboard. This save action requires a lot of information from the dashboard app like the dashboard container information, dashboardStateManager, and the grid data and layout of the current list of visualization panels on the dashboard (shown below). All the relationship between dashboard and visualization is managed and stored by dashboard saved object, so only dashboard knows how to add and manage this visualization/dashboard relationship. And dashboard plugin does not currently expose any apis to let another plugin to obtain those information or to give them ability to manage that relationship. There are some potential solutions to solve this:
- Change the user flow: after user chooses a dashboard and click save on the save modal, it takes them to the dashboard page where they can then click save button on that dashboard to actual link the visualization to the dashboard. If we do it this way, feels like we are defeating the purpose of this new user flow and it wont be working if we are adding viz to multiple dashboards at the same time.
- Add an api in the dashboard plugin to let others have the ability to add visualization/dashboard relationship. I am not sure if this is a good idea as this will need in depth research of current dashboard plugin architecture and the complexity of the design might be intentional.
- It makes me wonder if we need this new user flow and if it’s an actual pain point for our users.
{
"embeddableConfig": {
"mapZoom": 2,
"mapCenter": [
28.304380682962783,
-22.148437500000004
]
},
"gridData": {
"x": 0,
"y": 39,
"w": 24,
"h": 15,
"i": "11"
},
"panelIndex": "11",
"version": "7.0.0-alpha1",
"panelRefName": "panel_10"
}
I would be aligned with de-scoping "Add to dashboard" from 2.4 and consider it an incremental feature for all visualizations
It makes me wonder if we need this new user flow and if it’s an actual pain point for our users.
This is definitely a pain for users, especially newer users. But i'm aligned with @kgcreative here. The complexity here is not trivial and needs more research.
If I recall correctly, notebooks can also embed visualizations, so another requirement may be to add to other type of saved objects. If in the future we have multiple dashboard types, we should be able to add a visualization to any type of container object.