[Feature Request] Modifying the cloned dashboard should not affect the original dashboard
Describe the bug Whenever I modify the visualization in cloned dashboard its updating the original dashboard as well
To Reproduce Steps to reproduce the behavior: 1.) Create a dashboard 2.) Add visualizations to it 3.) Clone the dashboard and provide it a new name 4.) Edit the visualization in cloned dashboard and save it 5.) The original dashboard visualizations are modified based on the changes made to cloned dashboard visualization.
Expected behavior The cloned dashboard changes doesn't impact the original dashboard
OpenSearch Version Please list the version of OpenSearch being used.
Dashboards Version Please list the version of OpenSearch Dashboards being used.
Plugins
Please list all plugins currently enabled.
Screenshots
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/70038446/2fd60866-abe7-47f0-9765-323374e08ede
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Browser and version [e.g. 22]
Additional context
Add any other context about the problem here.
Dashboards are simply containers to show a bunch of visualizations together. When you create a Dashboard, you link a visualization to it. When you clone a Dashboard, it clones that relationship; it does not clone the visualizations in them.
For your desired behavior, you would want to clone the visualizations as well.
@bbarani This is a good issue to bring up and would like to know from product/UX how we should handle something like this. what Bharani describes is a behavior that a user might want, but from what @AMoo-Miki describes is not what the clone button is meant to do. Having some sort of toggle when a user clones a dashboard to also clone the visualizations is one way i can see this being addressed.
cc: @dagneyb @KrooshalUX @kgcreative
Rephrasing this to be an enhancement instead of a bug though since the current behavior as Miki mentioned is expected
Overall, we need to improve upon communicating to the end user the relationship between visualizations and dashboards. For example - given the recent exploration on color selection of visualizations, it has become clear - that its not clear - what modifications a user can make on a dashboard to a visualization actually change the visualization vs just within the dashboard. Ex: changing colors via the legend (dashboard) doesn't change the base visualization - and can be different between dashboards. This sounds like a good thing - having customization per dashboard vs modifying the visualization, allowing everyone to do what they need at the dashboard level - unless - the user that made those customization and expected them to appear across dashboards.
Correcting the patterns for this can take place across a few projects -the ones that come to mind that we might want to expand scope on to improve this are in the Data Explorer project as well as Projects in #4298 .
For some short term fixes, we may want to add some confirmation modals to edit mode in Dashboard, and the various editing interfaces of visualizations (including vis builder). I can run an inventory on the experiences and provide followup thoughts in this issue. Primarily want to be conscious of adding the right level of friction.
One more note: Cloning visualization creates a copy and cloning of dashboards creates sym link. The term 'clone' is very confusing here.
Cx use case: Copy/Mirror/Clone dashboard and change the index pattern
- https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4445 Copies dashboards with visualisations.
- https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3709 Changes index pattern within visualization.
We should take a page from import/export, and introduce an [ ] Also duplicate related objects flag for this. This would not just duplicate the dashboard, but also duplicate the visualizations. We could also introduce a way to prefix or suffix all related saved object names in order to make it easier to find those objects. cc: @BionIT + @ashwin-pc
cc: @AMoo-Miki Since you are taking a stab at Dashboards improvements