Skip to content

Make onboarding optional, able to be ignored on desktop (take 2)#6628

Merged
pierremtb merged 39 commits intomainfrom
franknoirot/adhoc/optional-onboarding
May 2, 2025
Merged

Make onboarding optional, able to be ignored on desktop (take 2)#6628
pierremtb merged 39 commits intomainfrom
franknoirot/adhoc/optional-onboarding

Conversation

@franknoirot
Copy link
Contributor

Resurrection of #6564 after reverting in #6610. Fixes #6609 which was caused by silly path assembly error. Prevents it in the future by adding proper typing to that path construction, and failing the navigation to a new onboarding step that doesn't match the OnboardingStatus type, so the existing E2E test will fail noisily in this case.

Original PR description below:

Closes #6542. Makes onboarding tutorial optional on both desktop and web, removing all redirection behavior.

Both platforms

  1. Whenever the user dismisses the tutorial before, during, or after doing it, we show a toast telling them one place to find the replay button
  2. The same code path now occurs for replay workflows via native help menu, lower-right help menu, and settings

Desktop

  1. No toasts or dialogs are shown
  2. If the user has not yet begun the tutorial, a dismissible button appears in the home page sidebar
  3. Whenever the user begins, continues, or replays the tutorial, we create a new project on their behalf and navigate to it
  4. If the user is in the middle of the tutorial, the home page button says "continue" instead of "start"
Screenshare.-.2025-04-29.9_46_32.AM-compressed.mp4

Browser

  1. If the user has not yet begun or completed the tutorial, a toast appears to begin or dismiss
  2. If the user's code is not the web tutorial's code, a warning toast is shown after the first acceptance
Screenshare.-.2025-04-29.9_49_57.AM-compressed.mp4

Tests

I consolidated all tests within onboarding-tests.spec.ts into one longer test. Several of those tests—like the "avatar text" tests—checked behavior that will become irrelevant this week when we update the onboarding to no longer mention all the menus and UI. Some of them were redundant, each checking that the code reset and the model was loaded. This test checks that, clicks through all onboarding steps and back, and verifies the "always create a new project" behavior on desktop in several ways. I left a TODO comment in that test that another test will need to be written for the divergent web onboarding behavior when we support browser E2E tests again.

Other

This PR removes one of our circular dependencies.

franknoirot and others added 30 commits April 29, 2025 14:07
and update it to not use pixel color checks, and use fixtures.
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
…ttyCAD/modeling-app into franknoirot/adhoc/optional-onboarding
@qa-wolf
Copy link

qa-wolf bot commented May 1, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@vercel
Copy link

vercel bot commented May 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 11:01pm

Copy link
Contributor Author

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

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

Alright this is ready

Comment on lines +94 to +98
if (!isOnboardingSubPath(newStatus)) {
return new Error(
`Failed to navigate to invalid onboarding status ${newStatus}`
)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what will cause the E2E test to fail if a bad onboarding path is ever constructed. This is the only place in the code base that the onboarding status setting is set to something dynamic. If somehow the user sees this error state they will still be able to use the app by dismissing the onboarding.


const previousOnboardingStatus: OnboardingStatus =
previousStep ?? ONBOARDING_SUBPATHS.INDEX
const nextOnboardingStatus: OnboardingStatus = nextStep ?? 'completed'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In #6564 this line was

  const nextOnboardingStatus: OnboardingStatus = nextStep + ONBOARDING_SUBPATHS.INDEX

For some inexplicable reason. The OnboardingStatus type def added provides red squiggles in development, in addition to the runtime error handling mentioned elsewhere.

@franknoirot franknoirot changed the title Franknoirot/adhoc/optional onboarding Make onboarding optional, able to be ignored on desktop (take 2) May 1, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 1, 2025

CodSpeed Instrumentation Performance Report

Merging #6628 will not alter performance

Comparing franknoirot/adhoc/optional-onboarding (1ee345a) with main (89bae66)

Summary

✅ 54 untouched benchmarks

Copy link
Contributor

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

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

@pierremtb pierremtb merged commit 86a83ca into main May 2, 2025
68 checks passed
@pierremtb pierremtb deleted the franknoirot/adhoc/optional-onboarding branch May 2, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weird state after updating to post new onboarding commit Make onboarding tutorial optional

3 participants