Skip to content

A platform for community discussion. Free, open, simple.

UX: move InviteCollaborators onboarding step to be the first (#37764)

Gabriel Grubbaa5f00f08abf1
diff --git a/frontend/discourse/app/components/admin-onboarding/banner.gjs b/frontend/discourse/app/components/admin-onboarding/banner.gjs
index 2af518a2ad7..860d8695b7a 100644
--- a/frontend/discourse/app/components/admin-onboarding/banner.gjs
+++ b/frontend/discourse/app/components/admin-onboarding/banner.gjs
@@ -13,6 +13,31 @@ import { clipboardCopy, defaultHomepage } from "discourse/lib/utilities";
import { i18n } from "discourse-i18n";
const STEPS = [
+ class InviteCollaborators extends OnboardingStep {
+ static name = "invite_collaborators";
+
+ @service modal;
+ @service appEvents;
+
+ icon = "paper-plane";
+
+ constructor() {
+ super(...arguments);
+ this.appEvents.on("create-invite:saved", this, this.markAsCompleted);
+ }
+
+ willDestroy() {
+ super.willDestroy(...arguments);
+ this.appEvents.off("create-invite:saved", this, this.markAsCompleted);
+ }
+
+ @action
+ performAction() {
+ this.modal.show(CreateInvite, {
+ model: { invites: new TrackedArray() },
+ });
+ }
+ },
class StartPosting extends OnboardingStep {
static name = "start_posting";
@@ -58,32 +83,6 @@ const STEPS = [
});
}
},
- class InviteCollaborators extends OnboardingStep {
- static name = "invite_collaborators";
-
- @service modal;
- @service appEvents;
-
- step = this.name;
- icon = "paper-plane";
-
- constructor() {
- super(...arguments);
- this.appEvents.on("create-invite:saved", this, this.markAsCompleted);
- }
-
- willDestroy() {
- super.willDestroy(...arguments);
- this.appEvents.off("create-invite:saved", this, this.markAsCompleted);
- }
-
- @action
- performAction() {
- this.modal.show(CreateInvite, {
- model: { invites: new TrackedArray() },
- });
- }
- },
class SpreadTheWord extends OnboardingStep {
static name = "spread_the_word";
@service toasts;