Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add steps for the onboarding tour for the team planner

Henriette Dargeb1befea035e2
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 4370b569864..6a6c585b95c 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -555,6 +555,12 @@ en:
create_button: 'The <b>+ Create</b> button will add a new work package to your project.'
timeline_button: 'You can activate the <b>Gantt chart</b> view to create a timeline for your project.'
timeline: 'Here you can <b>edit your project plan</b>, create new work packages, such as tasks, milestones, phases, and more, as well as <b>add dependencies</b>. All team members can see and update the latest plan at any time.'
+ team_planner:
+ overview: 'The team planner lets you visually assign tasks to team members and get an overview of who is working on what.'
+ calendar: 'The weekly or biweekly planning board displays all work packages assigned to your team members.'
+ add_assignee: 'To get started, add assignees to the team planner.'
+ add_existing: 'Search for existing work packages and drag them to the team planner to instantly assign them to a team member and define start and end dates.'
+ card: 'Drag work packages horizontally to move them backwards or forwards in time, drag the edges to change start and end dates and even drag them vertically to a different row to assign them to another member.'
notifications:
title: "Notifications"
@@ -1266,7 +1272,7 @@ en:
load_error_message: 'There was an error loading the form'
validation_error_message: 'Please fix the errors present in the form'
advanced_settings: 'Advanced settings'
-
+
spot:
filter_chip:
remove: 'Remove'
diff --git a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts
index 725239bd6b0..9cfb2c37f49 100644
--- a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts
+++ b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts
@@ -14,6 +14,7 @@ import {
scrumBacklogsTourSteps,
scrumTaskBoardTourSteps,
} from 'core-app/core/setup/globals/onboarding/tours/backlogs_tour';
+import { teamPlannerTourSteps } from 'core-app/core/setup/globals/onboarding/tours/team_planners_tour';
require('core-vendor/enjoyhint');
@@ -68,23 +69,37 @@ function startTour(steps:OnboardingStep[]) {
window.onboardingTourInstance.run();
}
+function moduleVisible(name:string):boolean {
+ return document.getElementsByClassName(`.${name}-view-menu-item`).length > 0
+}
+
function mainTour() {
initializeTour('mainTourFinished');
const boardsDemoDataAvailable = jQuery('meta[name=boards_demo_data_available]').attr('content') === 'true';
+ // TODO
+ const teamPlannerDemoDataAvailable = true;
const eeTokenAvailable = !jQuery('body').hasClass('ee-banners-visible');
waitForElement('.work-package--results-tbody', '#content', () => {
- let steps:OnboardingStep[];
+ let steps:OnboardingStep[] = wpOnboardingTourSteps();
+
+ // Check for EE edition
+ if (eeTokenAvailable) {
+ // ... and available seed data of boards.
+ // Then add boards to the tour, otherwise skip it.
+ if (boardsDemoDataAvailable && moduleVisible('board')) {
+ steps = steps.concat(boardTourSteps());
+ }
- // Check for EE edition, and available seed data of boards.
- // Then add boards to the tour, otherwise skip it.
- if (eeTokenAvailable && boardsDemoDataAvailable) {
- steps = wpOnboardingTourSteps().concat(boardTourSteps()).concat(menuTourSteps());
- } else {
- steps = wpOnboardingTourSteps().concat(menuTourSteps());
+ // ... same for team planners
+ if (teamPlannerDemoDataAvailable && moduleVisible('team-planner')) {
+ steps = steps.concat(teamPlannerTourSteps());
+ }
}
+ steps = steps.concat(menuTourSteps());
+
startTour(steps);
});
}
diff --git a/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts b/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts
new file mode 100644
index 00000000000..05254a3f643
--- /dev/null
+++ b/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts
@@ -0,0 +1,52 @@
+import { waitForElement } from 'core-app/core/setup/globals/onboarding/helpers';
+import { OnboardingStep } from 'core-app/core/setup/globals/onboarding/onboarding_tour';
+
+export function teamPlannerTourSteps():OnboardingStep[] {
+ return [
+ {
+ 'next .team-planner-view-menu-item': I18n.t('js.onboarding.steps.team_planner.overview'),
+ showSkip: false,
+ nextButton: { text: I18n.t('js.onboarding.buttons.next') },
+ onNext() {
+ jQuery('.team-planner-view-menu-item ~ .toggler')[0].click();
+ waitForElement('.op-sidemenu--items', '#main-menu', () => {
+ jQuery(".op-sidemenu--item-action:contains('Team planner')")[0].click();
+ });
+ },
+ },
+ {
+ 'next [data-qa-selector="op-team-planner--calendar-pane"]': I18n.t('js.onboarding.steps.team_planner.calendar'),
+ showSkip: false,
+ nextButton: { text: I18n.t('js.onboarding.buttons.next') },
+ containerClass: '-dark -hidden-arrow',
+ timeout: () => new Promise((resolve) => {
+ waitForElement('.op-wp-single-card', '#content', () => {
+ resolve(undefined);
+ });
+ }),
+ },
+ {
+ 'next [data-qa-selector="tp-assignee-add-button"]': I18n.t('js.onboarding.steps.team_planner.add_assignee'),
+ showSkip: false,
+ nextButton: { text: I18n.t('js.onboarding.buttons.next') },
+ },
+ {
+ 'next [data-qa-selector="op-team-planner--add-existing-toggle"]': I18n.t('js.onboarding.steps.team_planner.add_existing'),
+ showSkip: false,
+ nextButton: { text: I18n.t('js.onboarding.buttons.next') },
+ },
+ {
+ 'next [data-qa-selector="op-wp-single-card"]': I18n.t('js.onboarding.steps.team_planner.card'),
+ showSkip: false,
+ nextButton: { text: I18n.t('js.onboarding.buttons.next') },
+ onNext() {
+ const backArrows = Array.from(document.getElementsByClassName('main-menu--arrow-left-to-project'));
+ const teamPlannerBackArrow = backArrows.find((backArrow) => (backArrow.nextElementSibling as HTMLElement).innerText === 'Team planners') as HTMLElement;
+
+ if (teamPlannerBackArrow) {
+ teamPlannerBackArrow.click();
+ }
+ },
+ },
+ ];
+}
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
index bfa56398cd3..37206cffd84 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
@@ -26,7 +26,10 @@
</op-add-existing-pane>
</ng-container>
- <div class="op-team-planner--calendar-pane">
+ <div
+ class="op-team-planner--calendar-pane"
+ data-qa-selector="op-team-planner--calendar-pane"
+ >
<ng-container
*ngIf="(calendarOptions$ | async) as calendarOptions"
>