-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: Refactor onboarding options for unique titles #14231
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
chore: Refactor onboarding options for unique titles #14231
Conversation
Co-authored-by: burak.kaya <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Pull Request Overview
This PR refactors the onboarding flow to support sequential, uniquely numbered steps by introducing an OnboardingSteps container and an isStep flag on each OnboardingOption.
- Exported and wired up a new
OnboardingStepscomponent in MDX render pipeline - Added
isStepprop & CSS class logic toOnboardingOptionand createdOnboardingStepsin the onboarding component - Wrapped existing MDX guides in
OnboardingStepsand updated global CSS counters to render step numbers
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mdxComponents.ts | Imported and exposed OnboardingSteps |
| src/components/onboarding/index.tsx | Added isStep prop, className logic, and OnboardingSteps export |
| docs/platforms/javascript/guides/svelte/index.mdx | Wrapped Svelte guide steps in OnboardingSteps with isStep |
| docs/platforms/javascript/guides/react/index.mdx | Updated React guide to use OnboardingSteps and isStep |
| app/globals.css | Defined CSS counters and styles for .onboarding-step numbering |
Comments suppressed due to low confidence (3)
src/components/onboarding/index.tsx:149
- The type
ReactNodeis referenced but not imported; addimport { ReactNode } from 'react'(orimport React, { ReactNode } from 'react') at the top of this file to prevent a compile error.
children: ReactNode;
src/components/onboarding/index.tsx:173
ReactNodeis used again here without importing it; ensure you import it from 'react' to avoid undefined type errors.
export function OnboardingSteps({children}: {children: ReactNode}) {
docs/platforms/javascript/guides/svelte/index.mdx:183
- The closing
</OnboardingOption>for the "Verify Your Setup" step comes before the content; move this closing tag below the accompanying text so the content is correctly scoped to that step.
</OnboardingOption>
|
@sentry review |
|
On it! We are reviewing the PR and will provide feedback shortly. |
PR DescriptionThis pull request introduces a new visual structure for onboarding steps in the documentation. The goal is to provide a clearer, more guided experience for users setting up Sentry in their applications. It replaces the previous approach of using headings with explicit step numbers with a more structured component-based approach. Click to see moreKey Technical ChangesThe key technical changes include: 1) Introduction of a new Architecture DecisionsThe architectural decision was to encapsulate the step numbering logic within React components ( Dependencies and InteractionsThis change primarily affects the documentation pages that use the Risk ConsiderationsPotential risks include: 1) CSS conflicts with existing styles on the documentation pages. 2) Accessibility issues if the step numbering is not properly conveyed to screen readers. 3) Incorrect step numbering if the Notable Implementation DetailsA notable implementation detail is the use of CSS counters to automatically generate the step numbers. The |
Bundle ReportChanges will decrease total bundle size by 3.71kB (-0.02%) ⬇️. 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
App Routes Affected:
|
Co-authored-by: seer-by-sentry[bot] <157164994+seer-by-sentry[bot]@users.noreply.github.com>
Co-authored-by: seer-by-sentry[bot] <157164994+seer-by-sentry[bot]@users.noreply.github.com>
chargome
left a comment
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 don't think this works as expected:
e.g. the steps in https://sentry-docs-git-cursor-refactor-onboarding-options-for-u-4ebbf6.sentry.dev/platforms/javascript/guides/react/ are not correctly numbered anymore
|
@chargome we should be good now. Ideally this whole |
chargome
left a comment
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.
Agree that we should unify this across the guides, otherwise the isStep approach becomes confusing.
Another thing I just noticed is that the TOC on the right side does not include the steps anymore (e.g. compared to nextjs) but I don't think this is a blocker.
Thanks for looking into this!
I actually noticed that too but decided that it is a fix rather than a bug. This also "fixes" the anchor links as they used to have the If we want them back, we may look into a way to get the full text content of the header. |
Fixes #14221.