Make error alerts consistent
Created by: felixfbecker
Currently, every component has a different way to display error alerts. Some prefix with an icon, some with "Error:", many upper case the first letter of the error message, many don't, some render as (fixed) markdown, most don't.
This makes it consistent by using one shared ErrorAlert
component that takes an error object or string. It makes use of the best-effort markdown rendering that works well for external services, so that \n
newlines, links, bullet list (such as Go's multierror
) and inline code are rendered correctly. First letter is uppercased because Go errors are usually not, but in the UI they should be.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #6518 into master will decrease coverage by
<.01%
. The diff coverage is14.94%
.@@ Coverage Diff @@ ## master #6518 +/- ## ========================================== - Coverage 39.46% 39.45% -0.01% ========================================== Files 1213 1196 -17 Lines 61609 61596 -13 Branches 5855 5842 -13 ========================================== - Hits 24312 24302 -10 + Misses 35072 35068 -4 - Partials 2225 2226 +1
Impacted Files Coverage Δ web/src/site-admin/SiteAdminConfigurationPage.tsx 0% <ø> (ø)
web/src/components/FilteredConnection.tsx 0% <ø> (ø)
...ise/extensions/extension/RegistryExtensionForm.tsx 0% <0%> (ø)
...c/enterprise/user/settings/ExternalAccountNode.tsx 0% <0%> (ø)
...tions/UserSubscriptionsProductSubscriptionPage.tsx 0% <0%> (ø)
web/src/site-admin/SiteAdminOverviewPage.tsx 0% <0%> (ø)
web/src/org/invite/InviteForm.tsx 0% <0%> (ø)
...AdminGenerateProductLicenseForSubscriptionForm.tsx 0% <0%> (ø)
web/src/search/input/ScopePage.tsx 0% <0%> (ø)
...se/extensions/explore/ExtensionsExploreSection.tsx 0% <0%> (ø)
... and 143 more