-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(js): Use split layout in browser JS quick start guide #17101
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
Open
inventarSarah
wants to merge
1
commit into
master
Choose a base branch
from
smi/quick-start/split-layout-js
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+155
−19
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,17 @@ | ||
| We recommend installing Sentry via a package manager. If that isn't an option for you, you can use the [Loader Script](/platforms/javascript/install/loader/) or a CDN bundle. | ||
|
|
||
| <SplitLayout> | ||
|
|
||
| <SplitSection> | ||
|
|
||
| <SplitSectionText> | ||
| #### Option 1: Package Manager (Recommended) | ||
|
|
||
| Run the command for your preferred package manager to add the Sentry SDK to your application: | ||
|
|
||
| </SplitSectionText> | ||
| <SplitSectionCode> | ||
|
|
||
| ```bash {tabTitle:npm} | ||
| npm install @sentry/browser --save | ||
| ``` | ||
|
|
@@ -16,6 +24,12 @@ yarn add @sentry/browser | |
| pnpm add @sentry/browser | ||
| ``` | ||
|
|
||
| </SplitSectionCode> | ||
|
|
||
| </SplitSection> | ||
|
|
||
| </SplitLayout> | ||
|
|
||
| #### Option 2: Loader Script | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we move the other 2 options into the split layout? It looks better to me this way |
||
|
|
||
| In Sentry, go to | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Bug: A shared include file,
getting-started-config/javascript.mdx, was wrapped in a<SplitLayout>, which will break the layout for non-browser guides like Node.js that use it.Severity: MEDIUM
Suggested Fix
Instead of modifying the shared include file directly, wrap the
<SplitLayout>component within the file with a<PlatformSection platform="javascript.browser">. This will ensure the split layout only renders for browser-based guides and does not affect Node.js or other server-side framework documentation.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.
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 didn't find any other guide that uses this file so it should be fine.
We could inline the content just to be safe