-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(Docs) Code block updates #15160
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
feat(Docs) Code block updates #15160
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will increase total bundle size by 2.82kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
Files in
view changes for bundle: sentry-docs-server-cjsAssets Changed:
Files in
Files in
App Routes Affected:
|
…f github.com:getsentry/sentry-docs into sergiydybskiy/devex-130-snippet-default-state-issues
…15230) <!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## Fix: Integrations wrapper incorrectly hidden when no onboarding options present ### Problem Regression from #15160 - `integrations: [...]` wrapper was always hidden by default in code blocks, even when the integrations inside should always be visible (e.g., `integrations: [Sentry.captureConsoleIntegration()]`). The wrapper was only restored to visible by `updateElementsVisibilityForOptions`, which never runs on pages without onboarding option buttons. ### Root Cause In `src/rehype-onboarding-lines.js`, the integrations wrapper was unconditionally hidden at build time, relying on client-side JavaScript to show it when appropriate. Pages without `<OnboardingOptionButtons />` never executed the restore logic. ### Solution Updated the build-time logic to only hide the integrations wrapper when **ALL** content inside is conditional (wrapped in `___PRODUCT_OPTION_START/END___` markers). If any integration is always-visible (no onboarding option), the wrapper remains visible by default. ### Scenarios Now Handled Correctly - ✅ Always-visible integrations only → wrapper always shown - ✅ All conditional integrations → wrapper hidden/shown based on option selection - ✅ Mixed (some always-visible + some conditional) → wrapper always shown, conditional lines toggle independently - ✅ Empty inline arrays `integrations: []` → unaffected (not matched by regex) ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [x] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] 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 <!-- Sentry employees and contractors can delete or ignore this section. --> 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/)
DESCRIBE YOUR PR
integrations
if none are selected from configuration optionsIS 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:
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