-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
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.
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.
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.
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} = {}): { |
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.
Simplified this hook a bit. It now gets the tasks list directly.
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.
Moved most of this into content.tsx
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()