Removed unused Ember onboarding checklist#27768
Removed unused Ember onboarding checklist#27768kevinansfield wants to merge 1 commit intoTryGhost:mainfrom
Conversation
no issue The onboarding checklist now lives in React, so the old Ember components, helpers, dashboard styles, and checklist-specific tests no longer need to ship in the admin bundle.
WalkthroughThis pull request removes the Ember-based onboarding checklist UI from the dashboard and simplifies the onboarding service to coordinate with a React-based onboarding implementation. The change deletes seven Ember components and helpers, refactors the OnboardingService to remove public getters and action methods while retaining startChecklist to initialize onboarding state, updates stylesheet imports to replace dashboard.css with billing/post-history/post-preview layouts, removes onboarding and attribution box styling rules, and refactors acceptance tests to validate service state initialization and React redirect behavior for owner and non-owner users. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ghost/admin/app/services/onboarding.js (1)
6-17: 💤 Low valueConsider guarding against overwriting existing onboarding state.
startChecklist()unconditionally overwrites any existinguserSettings.onboardingdata. If called more than once (e.g., user revisits/setup/done), this would reset progress likecompletedStepsandstartedAt.If the route already guards against re-entry for users with existing onboarding state, this is fine. Otherwise, a simple guard would prevent accidental resets:
🛡️ Optional guard to preserve existing onboarding state
async startChecklist() { const userSettings = JSON.parse(this.session.user.accessibility || '{}'); + if (userSettings.onboarding) { + return; // Already initialized + } + userSettings.onboarding = { completedSteps: [], checklistState: 'started', startedAt: new Date().toISOString() }; this.session.user.accessibility = JSON.stringify(userSettings); await this.session.user.save(); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ghost/admin/app/services/onboarding.js` around lines 6 - 17, startChecklist currently unconditionally replaces session.user.accessibility.userSettings.onboarding and will reset progress; modify startChecklist to first parse this.session.user.accessibility into userSettings and check if userSettings.onboarding already exists and is an object—if it does, do not overwrite existing completedSteps/checklistState/startedAt (or only set missing fields like checklistState='started' when absent); if onboarding is absent, initialize it as now; after merging/preserving existing fields, stringify back to this.session.user.accessibility and call await this.session.user.save(). Use the function name startChecklist and properties this.session.user.accessibility, userSettings.onboarding, and this.session.user.save to locate the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ghost/admin/app/services/onboarding.js`:
- Around line 6-17: startChecklist currently unconditionally replaces
session.user.accessibility.userSettings.onboarding and will reset progress;
modify startChecklist to first parse this.session.user.accessibility into
userSettings and check if userSettings.onboarding already exists and is an
object—if it does, do not overwrite existing
completedSteps/checklistState/startedAt (or only set missing fields like
checklistState='started' when absent); if onboarding is absent, initialize it as
now; after merging/preserving existing fields, stringify back to
this.session.user.accessibility and call await this.session.user.save(). Use the
function name startChecklist and properties this.session.user.accessibility,
userSettings.onboarding, and this.session.user.save to locate the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c4569e1b-f922-4bfd-9ffc-326c6dc453b6
📒 Files selected for processing (13)
ghost/admin/app/components/dashboard/onboarding-checklist.hbsghost/admin/app/components/dashboard/onboarding-checklist.jsghost/admin/app/components/dashboard/onboarding/share-modal.hbsghost/admin/app/components/dashboard/onboarding/share-modal.jsghost/admin/app/components/dashboard/onboarding/step.hbsghost/admin/app/helpers/is-onboarding-step-completed.jsghost/admin/app/helpers/onboarding-step-class.jsghost/admin/app/services/onboarding.jsghost/admin/app/styles/app-dark.cssghost/admin/app/styles/app.cssghost/admin/app/styles/layouts/content.cssghost/admin/app/styles/layouts/dashboard.cssghost/admin/tests/acceptance/onboarding-test.js
💤 Files with no reviewable changes (10)
- ghost/admin/app/styles/app.css
- ghost/admin/app/components/dashboard/onboarding/step.hbs
- ghost/admin/app/helpers/is-onboarding-step-completed.js
- ghost/admin/app/components/dashboard/onboarding-checklist.hbs
- ghost/admin/app/helpers/onboarding-step-class.js
- ghost/admin/app/components/dashboard/onboarding/share-modal.js
- ghost/admin/app/components/dashboard/onboarding-checklist.js
- ghost/admin/app/components/dashboard/onboarding/share-modal.hbs
- ghost/admin/app/styles/app-dark.css
- ghost/admin/app/styles/layouts/content.css
What changed
Why
The onboarding checklist now lives in React, so the old Ember implementation and its dashboard-era styling were dead code still shipping in the admin bundle.