Skip to content

Commit 548a5fc

Browse files
committed
feat: Drop success and danger Alert levels
We do not use success at all, and danger only in few places, where we can also use `warning` instead.
1 parent f5946d2 commit 548a5fc

File tree

8 files changed

+9
-22
lines changed

8 files changed

+9
-22
lines changed

docs/contributing/pages/components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is an alert
2525
Attributes:
2626

2727
- `title` (string)
28-
- `level` (string: `'info' | 'warning' | 'danger' | 'success'`)
28+
- `level` (string: `'info' | 'warning'`)
2929

3030
Use this for these types of content:
3131

docs/platforms/javascript/common/best-practices/shared-environments.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ These best practices are relevant for you if you set up Sentry in one of the fol
3939
- Libraries
4040
- Any other scenario where you might have multiple Sentry instances running in the same environment
4141

42-
<Alert level="danger">
42+
<Alert level="warning">
4343

4444
When setting up Sentry in a shared environment where multiple Sentry instances may run, you should **not use `Sentry.init()`**, as this will pollute the global state. If your browser extension uses `Sentry.init()`, and a website also uses Sentry, the extension may send events to the website's Sentry project, or vice versa.
4545

@@ -121,7 +121,7 @@ Sentry.init({
121121
});
122122
```
123123

124-
<Alert level="danger">
124+
<Alert level="warning">
125125

126126
You shouldn't use this option if you're in fact using the SDK in a browser extension or another shared environment.
127127
Initializing the SDK via `Sentry.init` has no advantages over manually setting up the client and scope as described on this page.

docs/platforms/javascript/common/session-replay/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ description: "Learn how to enable Session Replay in your app if it is not alread
2727
By default, our Session Replay SDK masks all DOM text content, images, and user input, giving you heightened confidence that no sensitive data will leave the browser. To learn more, see <PlatformLink to="/session-replay/privacy">Session Replay Privacy</PlatformLink>.
2828

2929
<PlatformSection supported={["javascript.angular"]}>
30-
<Alert level="danger">
30+
<Alert level="warning">
3131
Angular's <a target="_blank" rel="noopener noreferrer" href="https://angular.dev/api/core/ChangeDetectionStrategy#Default">default "Change Detection" strategy</a> monkeypatches browser globals and can break or cause performance regressions in your application when using Session Replay. To avoid this, we recommend you use the `OnPush` strategy when using Angular.
3232
</Alert>
3333
</PlatformSection>

docs/platforms/javascript/common/sourcemaps/uploading/esbuild.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This guide assumes you're using a Sentry **SDK version `7.47.0` or higher**. If
2121
"javascript.cordova",
2222
]}>
2323

24-
<Alert level="danger">
24+
<Alert level="warning">
2525

2626
The Sentry esbuild plugin doesn't fully support esbuild configurations with `splitting: true`.
2727
If you rely on code splitting, use the esbuild plugin with <PlatformLink to="/sourcemaps/troubleshooting_js/legacy-uploading-methods/#uploading-using-sentry-bundler-plugins-on-version-2x">legacy source maps upload</PlatformLink>

docs/platforms/javascript/guides/nextjs/manual-setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ module.exports = withSentryConfig(nextConfig, {
442442

443443
Alternatively, you can set the `SENTRY_AUTH_TOKEN` environment variable:
444444

445-
<Alert level="danger">
445+
<Alert level="warning">
446446

447447
Do not commit your auth token to version control.
448448

includes/metrics-api-change.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<Alert level="danger" title="The Metrics beta has ended on October 7th">
1+
<Alert level="warning" title="The Metrics beta has ended on October 7th">
22
Thank you for participating in our Metrics beta program. After careful consideration, we have ended the beta program and retired the current Metrics solution. We're actively developing a new solution that will make tracking and debugging any issues in your application easier. [Learn more](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Upcoming-API-Changes-to-Metrics).
33
</Alert>

src/components/alert/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import './styles.scss';
66

77
type AlertProps = {
88
children?: ReactNode;
9-
level?: 'info' | 'warning' | 'danger' | 'success' | '';
9+
level?: 'info' | 'warning';
1010
title?: string;
1111
};
1212

src/components/alert/styles.scss

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.alert,
2-
.note {
1+
.alert {
32
background: var(--accent-2);
43
border-color: var(--accent-12);
54
border-left: 3px solid var(--accent-12);
@@ -52,15 +51,3 @@
5251
border-color: var(--amber-10);
5352
color: var(--amber-12);
5453
}
55-
56-
.alert-danger {
57-
background: var(--red-2);
58-
border-color: var(--red-10);
59-
color: var(--red-12);
60-
}
61-
62-
.alert-success {
63-
background: var(--green-2);
64-
border-color: var(--green-10);
65-
color: var(--green-12);
66-
}

0 commit comments

Comments
 (0)