-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Dashboards: Add alert and panel icon for dashboards that use Angular plugins #70951
Conversation
Feedback from UX included a suggestion to keep the deprecation warning messaging consistent, but also to ensure it was appropriate for the target audience and best advertised appropriate action. In terms of consistency, we have introduced:
Current "long" message for the dashboard notification:
Current "short" message in panel warning:
We likely need to explicitly reference Angular, and definitely need provide a link to the deprecation notice, wdyt about: Dashboard Notification: Description: Read our deprecation notice and migration advice. Panel Warning: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this becomes a bit noisy but I don't have any better suggestions so 👍🏻 from me! Great work on this!
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderTitleItems.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about showing the dashboard banner to all users and linking the dismissed state to uid and every user (local storage). Means a heck of a lot of showings & dismiss actions
|
||
export function AngularDeprecationNotice({ dashboardUid }: Props) { | ||
return ( | ||
<LocalStorageValueProvider<boolean> storageKey={localStorageKey(dashboardUid)} defaultValue={false}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having the storage key include uid means it could show up on all dashboards potentially and have to be dismissed A LOT by every user.
@@ -387,6 +388,9 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> { | |||
<SubMenu dashboard={dashboard} annotations={dashboard.annotations.list} links={dashboard.links} /> | |||
</section> | |||
)} | |||
{config.featureToggles.angularDeprecationUI && dashboard.hasAngularPlugins() && dashboard.uid !== null && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a check here that this is only shown to dashboard users who have edit permissions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could but then it makes it difficult for a viewer to discover that a dashboard they rely on has this issue
11e7108
to
e41d759
Compare
We would like to merge this PR in the current state. It is also behind a feature flag, so it won't be visible by default for now. Our plan is to slowly roll this out to HG and see the impact/feedback on it, and refine if necessary. @mckn please can you review the few changes I made after your PR review so we can merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…plugins (grafana#70951) * Add angularDeprecationUI feature toggle * Add angular notice in angular panel header * Show angular notice for angular datasources * Show angular notice at the top of the dashboard * Changed Angular deprecation messages * Fix angular deprecation alert displayed for new dashboards * re-generate feature flags * Removed unnecessary changes * Add angular deprecation dashboard notice tests * Add test for angular deprecation panel icon * Update test suite name * Moved isAngularDatasourcePlugin to app/features/plugins/angularDeprecation * Add hasAngularPlugins to DashboardModel * re-generate feature toggles * Fix tests * Fix data source spelling * Fix typing issues * Extract plugin type into a separate function * re-generate feature flags * reportInteraction on angular dashboard notice dismiss * re-generate feature flags * Re-generate feature flags * lint
…plugins (#70951) * Add angularDeprecationUI feature toggle * Add angular notice in angular panel header * Show angular notice for angular datasources * Show angular notice at the top of the dashboard * Changed Angular deprecation messages * Fix angular deprecation alert displayed for new dashboards * re-generate feature flags * Removed unnecessary changes * Add angular deprecation dashboard notice tests * Add test for angular deprecation panel icon * Update test suite name * Moved isAngularDatasourcePlugin to app/features/plugins/angularDeprecation * Add hasAngularPlugins to DashboardModel * re-generate feature toggles * Fix tests * Fix data source spelling * Fix typing issues * Extract plugin type into a separate function * re-generate feature flags * reportInteraction on angular dashboard notice dismiss * re-generate feature flags * Re-generate feature flags * lint
What is this feature?
angularDeprecationUI
which enables the UI changes described belowAngular panel/datasource icon
Tooltip on hover
Angular panels:
![image](https://private-user-images.githubusercontent.com/16373015/254216782-515caaad-9a27-4690-a67f-c0af7953ce48.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxODIyNjUsIm5iZiI6MTcyMjE4MTk2NSwicGF0aCI6Ii8xNjM3MzAxNS8yNTQyMTY3ODItNTE1Y2FhYWQtOWEyNy00NjkwLWE2N2YtYzBhZjc5NTNjZTQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDE1NTI0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjOTYyOGM1Mjg2YTUwNmRhYjBkZjAxOWFlMWI3ZGRjYjJlN2RhNTBkOThmZDNlNDdmNzkyNGMwODE0NDcxNDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.h_CLSA5GmwzlWJMlaeWWjVKXK5d7p2KNMGfi6mqADi4)
Angular datasources:
![image](https://private-user-images.githubusercontent.com/16373015/254216986-ee249bbd-e706-42d6-9748-51fec508d4b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxODIyNjUsIm5iZiI6MTcyMjE4MTk2NSwicGF0aCI6Ii8xNjM3MzAxNS8yNTQyMTY5ODYtZWUyNDliYmQtZTcwNi00MmQ2LTk3NDgtNTFmZWM1MDhkNGIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDE1NTI0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyN2Y2NDE3YzE0YjUzNTlkNDYxNTFhYWQxNjlmZGVhNzlkNzVkMjQ5NTVjY2EwMDY2ZWYyNmM1NzA1ZjdjYWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.40Nq0-c8CXlWtKTmBBncAzCTBxK2f8SaKbIAWu48nR0)
Dashboard alert (complete example)
Why do we need this feature?
To notify users about Angular panels and Angular datasources in their dashboards
Who is this feature for?
Grafana users who rely on Angular panels and datasources
Which issue(s) does this PR fix?:
Related to #68974
Special notes for your reviewer:
Please check that: