ref(onboarding): Decouple SCM step components from OnboardingContext#112948
Draft
ref(onboarding): Decouple SCM step components from OnboardingContext#112948
Conversation
Extract useOnboardingContext() calls from ScmConnect, ScmPlatformFeatures, ScmProjectDetails, and ScmRepoSelector so they accept all shared state via props. Adapter wrappers in onboarding.tsx read from context and pass props to the decoupled components. This enables reusing the SCM step components in the upcoming project creation flow, which will provide state from local wizard state instead of OnboardingContext. Refs VDY-72
Contributor
Sentry Snapshot Testing
|
Un-export OnboardingSessionState (no longer imported externally). Add @public JSDoc tags to SCM prop interfaces so knip recognizes them as intentionally exported for the project creation flow. Fix renderComponent type in scmPlatformFeatures.spec.tsx. ref(onboarding): Un-export SCM prop interfaces until needed No external consumers yet. Re-export when the project creation flow imports them.
dad5e27 to
39ea7d4
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Extract
useOnboardingContext()calls fromScmConnect,ScmPlatformFeatures,ScmProjectDetails, andScmRepoSelectorso they accept all shared state via props. Adapter wrappers inonboarding.tsxread from context and pass props to the decoupled components.This enables reusing the SCM step components in the upcoming project creation flow, which will provide state from local wizard state instead of
OnboardingContext.Changes
ScmRepoSelectorPropswithonRepositoryChange+selectedRepository.clearDerivedStateresponsibility moved to adapter.ScmConnectPropswith integration + repository state + callbacks.ScmPlatformFeaturesPropswith all platform/features state + callbacks.ScmProjectDetailsPropswithonProjectCreatedreplacingsetCreatedProjectSlug.ScmConnectAdapter,ScmPlatformFeaturesAdapter,ScmProjectDetailsAdapter) that read from context and pass props.OnboardingContextProvider.Refs VDY-72