-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Adding visible field to visualization saved object #59134
Conversation
7958a7a
to
7a96094
Compare
8fc447d
to
71aaf69
Compare
Jenkins, test this |
Pinging @elastic/kibana-app (Team:KibanaApp) |
Jenkins, test this |
Looking at this feature, I'm curious why we don't want visualizations created from within a dashboard to be available elsewhere. @AlonaNadler For example, what happens if I accidentally remove the visualization and then wish to re-add it? What will happen when I clone a dashboard? etc. Should automatically generated visualizations (beats dashboard for example) also have this property turned on? |
@lizozom the current way of adding visualizations to the dashboard is very cumbersome. the users need to create the visualization, name it, save it and then add it to the dashboard. we'd like to remove the last two steps from the end user. from user's point of view, they will be create the visualization for the dashboard and that's it. we will still save it in the background with some autogenerated title (for now), but as far as the end user is concerned, this doesn't exist outside of the dashboard. if they delete it, yes, they'll need to recreate it. existing visualizations shouldn't be affected, no need to hide them. |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Perhaps we could do something like show a modal confirmation to confirm the deletion with an alternative action being to add it to the Visualization library for future use. So the modal might read: With button actions like: I can mock this up later if we like this route. |
Just to be clear: This PR does not include any integration with the dashboard yet. All visualizations will be marked as visible and stored/saved as usual. It is an important thing to discuss, but could we move this discussion to a separate issue? |
Moved discussion to original issue: #51318 (comment) |
why do we show the hidden visualizations in the saved object? Hiding visualization is the technical short term and fastest solution for removing the hundreds of visualizations users need to manage constantly . In a perfect world, a dashboard will be one object. having every visualization as a separate object in visualize is only useful when users use a single visualization in multiple dashboards.A use case that we know exists but not as common as using visualization in only single dashboard. |
For example, what happens if I accidentally remove the visualization and then wish to re-add it? What will happen when I clone a dashboard? etc.
Ideally yes, that can have a separate timeline. As an example, Metricbeat alone adds 200 visualizations. That doesn't make sense and a bad experience. The experience will improve if these will be part of a dashboard and hidden |
Changing the saved object client to allow for the ES query that would need to be put in place to support this would be a massive overhaul and something platform team is not keen on doing. Additonally, when exporting saved objects, they would still be visible in the export. So two main arguments:
Detailed convo with the platform team about this is in the linked issue. Also, there is an initiative that the inspect view could go away soon: #59588 |
I'm pretty sure this was discussed, but I couldn't find a reference anywhere. Why aren't we using a |
I'm gonna close this PR as this is not the approach we're going to take. |
Summary
Context
When adding a visualization to the dashboard, we'd like to hide this visualization from the end user. From the end user perspective, this visualization doesn't exist in the Visualize app, but only in the context of the dashboard. However, embedding visualization directly to the dashboard is still in PoC phase (see this PR and this PR). In the meantime, we will add a
visible
flag to the visualization saved object. All visualizations will have this set totrue
, except the ones created by a dashboard. If the flag is set tofalse
, the visualization won't be shown in the visualize editor.Changes
This PR includes changes to:
visible
flag to the visualize saved objectThis PR doesn't include changes to Lens saved object, it will be done in the subsequent PR.
Example of a hidden visualization:
Limitations
The visualization will still be shown in the saved objects management console. (See more details in this issue). I've made the
visible
checkbox in the saved object overview as non-editable, so that we at least don't allow customer to tamper with what is basically a system setting. Any concerns around this?Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser- [ ] This was checked for cross-browser compatibility, including a check against IE11For maintainers