taskgenius_taskgenius-plugin/src/components/features/onboarding/steps/FluentProjectSectionStep.ts
Boninall 1814877969 refactor(onboarding): decompose fluent onboarding into progressive steps
Breaking down the Fluent UI onboarding process into smaller, focused steps
for better user guidance and comprehension:

- Split monolithic Fluent components step into 6 progressive steps
- Add individual step components for each UI section (Overview, Workspace
  Selector, Main Navigation, Projects, Other Views, Top Navigation)
- Enhance preview components with interactive selection and focus/dim modes
- Improve visual hierarchy with targeted highlighting for each step
- Add keyboard support and accessibility attributes to preview components
- Fix transition timing to show config check only at appropriate steps

This change provides a more guided and digestible onboarding experience
by presenting UI concepts progressively rather than all at once.
2025-10-03 22:58:28 +08:00

49 lines
1.7 KiB
TypeScript

import { t } from "@/translations/helper";
import { OnboardingController } from "../OnboardingController";
import { ComponentPreviewFactory } from "../previews/ComponentPreviewFactory";
import "@/styles/onboarding-components.css";
export class FluentProjectSectionStep {
static render(
headerEl: HTMLElement,
contentEl: HTMLElement,
controller: OnboardingController
) {
headerEl.empty();
contentEl.empty();
headerEl.createEl("h1", { text: t("Projects Section") });
headerEl.createEl("p", {
text: t("Organize your work with projects and hierarchies"),
cls: "onboarding-subtitle",
});
const showcase = contentEl.createDiv({ cls: "component-showcase" });
const preview = showcase.createDiv({ cls: "component-showcase-preview focus-mode" });
const desc = showcase.createDiv({ cls: "component-showcase-description" });
ComponentPreviewFactory.createSidebarPreview(preview);
const projects = preview.querySelector<HTMLElement>(".v2-sidebar-section-projects");
projects?.classList.add("is-focused");
const dimTargets = preview.querySelectorAll<HTMLElement>(
".v2-sidebar-section-primary, .v2-sidebar-section-other"
);
dimTargets.forEach((el) => el.classList.add("is-dimmed"));
desc.createEl("h3", { text: t("Project organization") });
desc.createEl("p", {
text: t(
"Group related tasks under projects. Build nested hierarchies and get quick stats."
),
});
const ul = desc.createEl("ul", { cls: "component-feature-list" });
[
t("Color-coded projects with counts"),
t("Supports nested structures for complex work"),
t("Quick actions via project popover (preview)"),
].forEach((txt) => ul.createEl("li", { text: txt }));
}
}