Skip to content

Commit c567448

Browse files
sergicalcursoragentgetsantry[bot]
authored
Consolidate version requirement with beta banner (#14639)
## DESCRIBE YOUR PR Features that are outside of latest stable release should highlight version requirements more prominently. EG: Latest RN SDK is `6.19.0` - skimming the docs, I assumed `enableLogs` would work, but I missed the fact that it's only on `7.0.0-beta.2` which requires a manual install. | Before | After | |--------|--------| | <img width="1510" height="2248" alt="CleanShot 2025-08-12 at 20 10 00@2x" src="https://github.com/user-attachments/assets/f1038bf4-8e12-4933-9371-042e7fff6b55" /> | <img width="1518" height="2246" alt="CleanShot 2025-08-12 at 20 17 18@2x" src="https://github.com/user-attachments/assets/5bf11041-895d-4679-8ae2-e28086ee4d95" /> | This PR makes the React Native SDK version requirement for Logs more prominent by consolidating it into the "Now in Beta" banner at the top of the React Native Logs documentation page. This addresses user feedback that the requirement was easily missed. The existing "Requirements" section has also been clarified to reinforce the need for the correct SDK version. Resolves: [Slack thread](https://getsentry.slack.com/archives/C016B495808/p1723409354153099) ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [X] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --- [Slack Thread](https://sentry.slack.com/archives/C8H0BQRDJ/p1755022154977009?thread_ts=1755022154.977009&cid=C8H0BQRDJ) <a href="https://cursor.com/background-agent?bcId=bc-e8ed4677-e599-45a6-a343-46c6deb53666"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"> <img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"> </picture> </a> <a href="https://cursor.com/agents?id=bc-e8ed4677-e599-45a6-a343-46c6deb53666"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"> <img alt="Open in Web" src="https://cursor.com/open-in-web.svg"> </picture> </a> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 17e30ba commit c567448

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Logs for React Native are supported in Sentry React Native SDK version `7.0.0-beta.1` and above.
1+
<VersionRequirement product="Logs for React Native" sdk="Sentry React Native SDK" minVersion="7.0.0-beta.1" />
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import {ReactNode} from 'react';
2+
3+
import {Alert} from './alert';
4+
5+
export type VersionRequirementProps = {
6+
// e.g., "Sentry React Native SDK"
7+
minVersion: string;
8+
product: string;
9+
// e.g., "Logs for React Native"
10+
sdk: string;
11+
children?: ReactNode;
12+
// e.g., "7.0.0-beta.1"
13+
level?: 'info' | 'warning' | 'success'; // additional details, upgrade notes, links
14+
};
15+
16+
/**
17+
* VersionRequirement renders a prominent callout stating the minimum SDK version
18+
* required for a given feature. It composes the shared Alert/Callout styles and
19+
* can be reused by any product area (not limited to Logs).
20+
*/
21+
export function VersionRequirement({
22+
product,
23+
sdk,
24+
minVersion,
25+
level = 'warning',
26+
children,
27+
}: VersionRequirementProps) {
28+
return (
29+
<Alert title="Version requirement" level={level}>
30+
<p>
31+
{product} requires {sdk} version <code>{minVersion}</code> or newer.
32+
</p>
33+
{children ? <div className="mt-2">{children}</div> : null}
34+
</Alert>
35+
);
36+
}

src/mdxComponents.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {SdkOption} from './components/sdkOption';
4343
import {SignInNote} from './components/signInNote';
4444
import {SmartLink} from './components/smartLink';
4545
import {TableOfContents} from './components/tableOfContents';
46+
import {VersionRequirement} from './components/version-requirement';
4647
import {VimeoEmbed} from './components/video';
4748

4849
export function mdxComponents(
@@ -93,6 +94,7 @@ export function mdxComponents(
9394
SandboxLink,
9495
SignInNote,
9596
VimeoEmbed,
97+
VersionRequirement,
9698
a: SmartLink,
9799
img: DocImage,
98100
...dynamicComponents,

0 commit comments

Comments
 (0)