Extend `createAlert` utility to easily support links in the message
What does this MR do and why?
Extends the createAlert
utility function to allow passing an optional links
object as a parameter. This is then be used with gl-sprintf
and gl-link
to render links as part of the given message. Also support passing a props object for the GlLink instead of a URL string, so that things like target="_blank"
can be set.
This utility function is then used within the Analytics Dashboard component, replacing the inline alert component.
Note that product analytics is an experimental feature behind a default-off feature flag.
Screenshots or screen recordings
No visual difference.
How to set up and validate locally
- Follow these instructions to setup Product Analytics in GDK.
- Onboard
Product Analytics
by setting up the feature at Project > Analytics > Analytics dashboards. - View the dashboard listing at Project > Analytics > Analytics dashboards.
- Disable your network within devtools to simulate a network error
- Click on a dashboard in the list to load it
- Verify that the dashboard displays a new top level error message
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #425228 (closed)
Edited by Elwyn Benson