Something went wrong while fetching comments. Please try again.
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/22233
This PR adds add/remove insight to the dashboard feature. Currently, this PR contains changes for UI (add/remove insight to the dashboard modal) and a new sharing level system for insights and dashboards. Let's take a bit closer to these two subjects.
At the moment dashboards and insights are working via user settings and settings cascade. So we have to take into account some tech limitations and details. Naturally, dashboards like settings cascade have sharing levels (you can see that on the screenshot below)
The creation UI has this setting (visibility of insight) when you create or edit your insight.
Important note This PR doesn't implement the Global level. That will be done in the next PR.
For the UI part of this functionality, this PR adds a modal window with some form for adding/removing insights from the dashboard (see screenshot below)
Lists of insights that might be included in a dashboard calculated according to logic that we described above about sharing levels. Org dashboards only can have insights from the global levels, personal/user dashboards can have insights from all available orgs and personal insights themselves.