docs(js): Use split layout in browser JS quick start guide#17101
docs(js): Use split layout in browser JS quick start guide#17101inventarSarah wants to merge 1 commit intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
||
| </SplitLayout> | ||
|
|
||
| #### Option 2: Loader Script |
There was a problem hiding this comment.
Should we move the other 2 options into the split layout?
It looks better to me this way
| <SplitLayout> | ||
|
|
||
| <SplitSection> | ||
|
|
There was a problem hiding this comment.
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
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: platform-includes/getting-started-config/javascript.mdx#L1-L4
Potential issue: The shared include file
`platform-includes/getting-started-config/javascript.mdx` has been entirely wrapped in a
`<SplitLayout>` component. This file is used by various JavaScript guides, including
those for Node.js and other server-side frameworks. These non-browser guides do not use
the necessary parent layout components that `<SplitLayout>` requires. As a result, when
these guides include the modified file, the layout will render incorrectly, leading to a
broken visual presentation for users viewing the Node.js or server-side framework quick
start documentation.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
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
DESCRIBE YOUR PR
This is the first in a series of PRs to update all JS quick start guides to the new split layout.
I'm starting with a single guide to validate the approach with @sergical before proceeding.
Note:
I had to inline some includes temporarily since the include files are shared across multiple guides. I will update and use them again once all guides are updated.
Closes: #16903
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES