Skip to content
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

ref(onboarding): Refactor onboarding components for rendering in drawer #85400

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

malwilley
Copy link
Member

Ref #84018

For the new navigation, we want to move away from the old SidebarPanel and render elements in useDrawer() instead.

This refactor should have no behavioral changes. It simply extracts the onboarding content into a separate component that is consumed by both the legacy sidebar component as well as the new useOnboardingWizardDrawer()

@malwilley malwilley requested review from priscilawebdev and a team February 18, 2025 21:07
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 18, 2025
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed sidebar.spec.tsx to this so that it directly tests the content.

Had to change some tests now that it uses the hook directly. Now it tests the actual tasks you'd see in prod which I think is better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly the same as what was in sidebar.tsx. Extracting so that it can be used in both the old sidebar panel and the new drawer hook.

enabled: boolean;
supportedTasks: OnboardingTask[];
}): {
export function useOnboardingTasks({disabled = false}: {disabled?: boolean} = {}): {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified this hook a bit. It now gets the tasks list directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved most of this into content.tsx

@malwilley malwilley merged commit 7cff846 into master Feb 19, 2025
42 checks passed
@malwilley malwilley deleted the malwilley/feat/nav-onboard-wizard branch February 19, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants