Skip to content

Remove onboarding #485

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

Merged
merged 6 commits into from
Apr 7, 2025
Merged

Conversation

jcapona
Copy link
Contributor

@jcapona jcapona commented Mar 28, 2025

Status Ticket/Issue
Ready/Hold Ticket

Main changes

Summary
  • On first boot, pi-top[4] opens landing app and legacy devices open onboarding in a window.
  • Replaced final page of onboarding with a 'finish' page that on completion takes user to landing.
Detailed changes

Backend:

  • / route now doesn't check if the device is onboarded or not. It used to do this to redirect users to onboarding when not complete.
  • Miniscreen onboarding will not start anymore if device is not onboarded. The app files are still in the repo since they might be useful in the future.
  • Updated pt_os_web_portal/app_window/__main__.py, used to start our apps in the devices.
    • Updated so that when called without an argument, it will open the 'landing' if the device running the script is a pi-top[4] or 'os-setup' (onboarding) on legacy devices.
    • Updated onboarding app so that it opens in a window (class OnboardingAppWindow). Check attached screenshots.
  • On first boot, we use a .desktop file to open the onboarding or landing page.
    • Added pt-first-boot-app.desktop which will open the onboarding or landing depending on the device type.
    • Removed pt-os-setup.desktop.
    • Removed pt-os-landing.desktop
  • Add /close-first-boot-app-window route that closes the 'first time boot' app window in the desktop.
  • Updated backend routes and methods that would handle these .desktop files.
    • Removed /disable-landing route and disable_landing method since they will not be used anymore.
    • Removed /disable-onboarding route, not used anymore.
    • Removed /configure-landing route and configure_landing method since they will not be used anymore.
    • Don't remove pt-os-setup.desktop file in deprioritise_openbox_session functon.
    • Added /stop-first-boot-app-autostart route to handle removing pt-first-boot-app.desktop.

Frontend:

  • Updated services according to changes in routes to focus on 'first boot app' instead of on 'landing' and 'onboarding'
  • Removed restartPage component.
  • Added finalOnboardingPage (Check attached screenshot).
  • When finished, the onboarding now redirects to landing page.
  • Created closeButton component, extracted from the landing page. It's now used in the onboarding & landing when running the app in the device.

Screenshots (feature, test output, profiling, dev tools etc)

new 'final' page:

image

onboarding on legacy devices:

image

Other notes (e.g. implementation quirks, edge cases, questions / issues)

Manual testing tips

Tag anyone who definitely needs to review or help

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 57.33333% with 32 lines in your changes missing coverage. Please review.

Project coverage is 75.39%. Comparing base (c436601) to head (b8dab67).

Files with missing lines Patch % Lines
frontend/src/pages/landingPage/LandingPage.tsx 0.00% 7 Missing ⚠️
pt_os_web_portal/app_window/__main__.py 0.00% 7 Missing ⚠️
frontend/src/msw/handlers.ts 0.00% 3 Missing ⚠️
pt_os_web_portal/backend/helpers/landing.py 62.50% 3 Missing ⚠️
frontend/src/components/onboarding_app/App.tsx 85.71% 2 Missing ⚠️
frontend/src/services/closeFirstBootAppWindow.ts 0.00% 2 Missing ⚠️
frontend/src/services/closeOnboardingWindow.ts 0.00% 2 Missing ⚠️
frontend/src/services/stopFirstBootAppAutostart.ts 0.00% 2 Missing ⚠️
pt_os_web_portal/backend/routes.py 80.00% 2 Missing ⚠️
...onents/landingPageTemplate/LandingPageTemplate.tsx 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
- Coverage   76.08%   75.39%   -0.69%     
==========================================
  Files         179      178       -1     
  Lines        3910     3776     -134     
  Branches      427      389      -38     
==========================================
- Hits         2975     2847     -128     
+ Misses        934      928       -6     
  Partials        1        1              
Flag Coverage Δ
js-tests 82.28% <51.28%> (-1.95%) ⬇️
python-tests 71.28% <63.88%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jcapona jcapona force-pushed the SWE-381-os-build-without-onboarding-app branch 4 times, most recently from c602ec4 to 92b997e Compare April 3, 2025 18:59
@jcapona jcapona force-pushed the SWE-381-os-build-without-onboarding-app branch from 92b997e to b4afed0 Compare April 3, 2025 19:04
@jcapona jcapona marked this pull request as ready for review April 4, 2025 14:01
return (
<MaskedDiv
className={cx(styles.closeButtonDiv, className)}
mask={`url(${closeButtonImage})`}
Copy link
Contributor

Choose a reason for hiding this comment

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

if there is a circle background on this we can make visible i think that would look better. not super important by maybe it's here and transparent

@jcapona jcapona force-pushed the SWE-381-os-build-without-onboarding-app branch 2 times, most recently from 9ffee68 to 1e3ae26 Compare April 4, 2025 18:25
- Replaced `stopOnboardingAutostart` with `stopFirstBootAppAutostart` across multiple components and services.
- Updated close window functionality to use `closeFirstBootAppWindow` instead of `closePtOsLandingWindow`.
- Removed deprecated services related to onboarding and landing.
- Adjusted API routes to reflect new service names for stopping autostart and closing windows.
@jcapona jcapona force-pushed the SWE-381-os-build-without-onboarding-app branch from 1e3ae26 to b8dab67 Compare April 4, 2025 18:32
@jcapona jcapona merged commit 6fa6386 into master Apr 7, 2025
8 checks passed
@jcapona jcapona deleted the SWE-381-os-build-without-onboarding-app branch April 7, 2025 13:25
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.

3 participants