MM-52910 - remove boards product tour code (#24223)
* remove boards product tour code * remove another constant * i18n-extract * remove boards from onboarding flow * remove unused import * i19n-extract
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4ef9384d74
Коммит
5b48a712d1
@@ -14,7 +14,7 @@ import {getInt} from 'mattermost-redux/selectors/entities/preferences';
|
|||||||
|
|
||||||
import Menu from 'components/widgets/menu/menu';
|
import Menu from 'components/widgets/menu/menu';
|
||||||
import MenuWrapper from 'components/widgets/menu/menu_wrapper';
|
import MenuWrapper from 'components/widgets/menu/menu_wrapper';
|
||||||
import {BoardsTourTip, PlaybooksTourTip} from 'components/tours/onboarding_explore_tools_tour';
|
import {PlaybooksTourTip} from 'components/tours/onboarding_explore_tools_tour';
|
||||||
import {FINISHED, TutorialTourName} from 'components/tours';
|
import {FINISHED, TutorialTourName} from 'components/tours';
|
||||||
|
|
||||||
import {isSwitcherOpen} from 'selectors/views/product_menu';
|
import {isSwitcherOpen} from 'selectors/views/product_menu';
|
||||||
@@ -81,9 +81,8 @@ const ProductMenu = (): JSX.Element => {
|
|||||||
const triggerStep = useSelector((state: GlobalState) => getInt(state, OnboardingTaskCategory, OnboardingTasksName.EXPLORE_OTHER_TOOLS, FINISHED));
|
const triggerStep = useSelector((state: GlobalState) => getInt(state, OnboardingTaskCategory, OnboardingTasksName.EXPLORE_OTHER_TOOLS, FINISHED));
|
||||||
const exploreToolsTourTriggered = triggerStep === GenericTaskSteps.STARTED;
|
const exploreToolsTourTriggered = triggerStep === GenericTaskSteps.STARTED;
|
||||||
|
|
||||||
const {boardsPlugin, playbooksPlugin} = useGetPluginsActivationState();
|
const {playbooksPlugin} = useGetPluginsActivationState();
|
||||||
|
|
||||||
const showBoardsTour = enableTutorial && tutorialStep === ExploreOtherToolsTourSteps.BOARDS_TOUR && exploreToolsTourTriggered && boardsPlugin;
|
|
||||||
const showPlaybooksTour = enableTutorial && tutorialStep === ExploreOtherToolsTourSteps.PLAYBOOKS_TOUR && exploreToolsTourTriggered && playbooksPlugin;
|
const showPlaybooksTour = enableTutorial && tutorialStep === ExploreOtherToolsTourSteps.PLAYBOOKS_TOUR && exploreToolsTourTriggered && playbooksPlugin;
|
||||||
|
|
||||||
const handleClick = () => dispatch(setProductMenuSwitcherOpen(!switcherOpen));
|
const handleClick = () => dispatch(setProductMenuSwitcherOpen(!switcherOpen));
|
||||||
@@ -107,14 +106,9 @@ const ProductMenu = (): JSX.Element => {
|
|||||||
const productItems = products?.map((product) => {
|
const productItems = products?.map((product) => {
|
||||||
let tourTip;
|
let tourTip;
|
||||||
|
|
||||||
// focalboard
|
|
||||||
if (boardsPlugin && showBoardsTour) {
|
|
||||||
tourTip = (<BoardsTourTip singleTip={!playbooksPlugin}/>);
|
|
||||||
}
|
|
||||||
|
|
||||||
// playbooks
|
// playbooks
|
||||||
if (product.pluginId === suitePluginIds.playbooks && showPlaybooksTour) {
|
if (product.pluginId === suitePluginIds.playbooks && showPlaybooksTour) {
|
||||||
tourTip = (<PlaybooksTourTip singleTip={!boardsPlugin}/>);
|
tourTip = (<PlaybooksTourTip singleTip={true}/>);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ export const OnboardingTaskCategory = 'onboarding_task_list';
|
|||||||
// Whole task list is based on these
|
// Whole task list is based on these
|
||||||
export const OnboardingTasksName = {
|
export const OnboardingTasksName = {
|
||||||
CHANNELS_TOUR: 'channels_tour',
|
CHANNELS_TOUR: 'channels_tour',
|
||||||
BOARDS_TOUR: 'boards_tour',
|
|
||||||
PLAYBOOKS_TOUR: 'playbooks_tour',
|
PLAYBOOKS_TOUR: 'playbooks_tour',
|
||||||
INVITE_PEOPLE: 'invite_people',
|
INVITE_PEOPLE: 'invite_people',
|
||||||
DOWNLOAD_APP: 'download_app',
|
DOWNLOAD_APP: 'download_app',
|
||||||
@@ -34,7 +33,6 @@ export const GenericTaskSteps = {
|
|||||||
|
|
||||||
export const TaskNameMapToSteps = {
|
export const TaskNameMapToSteps = {
|
||||||
[OnboardingTasksName.CHANNELS_TOUR]: GenericTaskSteps,
|
[OnboardingTasksName.CHANNELS_TOUR]: GenericTaskSteps,
|
||||||
[OnboardingTasksName.BOARDS_TOUR]: GenericTaskSteps,
|
|
||||||
[OnboardingTasksName.PLAYBOOKS_TOUR]: GenericTaskSteps,
|
[OnboardingTasksName.PLAYBOOKS_TOUR]: GenericTaskSteps,
|
||||||
[OnboardingTasksName.COMPLETE_YOUR_PROFILE]: GenericTaskSteps,
|
[OnboardingTasksName.COMPLETE_YOUR_PROFILE]: GenericTaskSteps,
|
||||||
[OnboardingTasksName.EXPLORE_OTHER_TOOLS]: GenericTaskSteps,
|
[OnboardingTasksName.EXPLORE_OTHER_TOOLS]: GenericTaskSteps,
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ import {
|
|||||||
|
|
||||||
import {ModalIdentifiers, TELEMETRY_CATEGORIES, ExploreOtherToolsTourSteps} from 'utils/constants';
|
import {ModalIdentifiers, TELEMETRY_CATEGORIES, ExploreOtherToolsTourSteps} from 'utils/constants';
|
||||||
|
|
||||||
import BullsEye from 'components/common/svg_images_components/bulls_eye_svg';
|
|
||||||
import Channels from 'components/common/svg_images_components/channels_svg';
|
import Channels from 'components/common/svg_images_components/channels_svg';
|
||||||
import Clipboard from 'components/common/svg_images_components/clipboard_svg';
|
import Clipboard from 'components/common/svg_images_components/clipboard_svg';
|
||||||
import Gears from 'components/common/svg_images_components/gears_svg';
|
import Gears from 'components/common/svg_images_components/gears_svg';
|
||||||
@@ -62,14 +61,6 @@ const useGetTaskDetails = () => {
|
|||||||
defaultMessage: 'Take a tour of Channels.',
|
defaultMessage: 'Take a tour of Channels.',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
[OnboardingTasksName.BOARDS_TOUR]: {
|
|
||||||
id: 'task_plan_sprint_with_kanban_style_boards',
|
|
||||||
svg: BullsEye,
|
|
||||||
message: formatMessage({
|
|
||||||
id: 'onboardingTask.checklist.task_plan_sprint_with_kanban_style_boards',
|
|
||||||
defaultMessage: 'Manage tasks with your first board.',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
[OnboardingTasksName.PLAYBOOKS_TOUR]: {
|
[OnboardingTasksName.PLAYBOOKS_TOUR]: {
|
||||||
id: 'task_resolve_incidents_faster_with_playbooks',
|
id: 'task_resolve_incidents_faster_with_playbooks',
|
||||||
svg: Clipboard,
|
svg: Clipboard,
|
||||||
@@ -156,9 +147,6 @@ export const useTasksList = () => {
|
|||||||
const showStartTrialTask = selfHostedTrialCondition || cloudTrialCondition;
|
const showStartTrialTask = selfHostedTrialCondition || cloudTrialCondition;
|
||||||
|
|
||||||
const list: Record<string, string> = {...OnboardingTasksName};
|
const list: Record<string, string> = {...OnboardingTasksName};
|
||||||
if (!pluginsList.focalboard || !isUserFirstAdmin) {
|
|
||||||
delete list.BOARDS_TOUR;
|
|
||||||
}
|
|
||||||
if (!pluginsList.playbooks || !isUserFirstAdmin) {
|
if (!pluginsList.playbooks || !isUserFirstAdmin) {
|
||||||
delete list.PLAYBOOKS_TOUR;
|
delete list.PLAYBOOKS_TOUR;
|
||||||
}
|
}
|
||||||
@@ -253,8 +241,6 @@ export const useHandleOnBoardingTaskTrigger = () => {
|
|||||||
const isGuestUser = useSelector((state: GlobalState) => isCurrentUserGuestUser(state));
|
const isGuestUser = useSelector((state: GlobalState) => isCurrentUserGuestUser(state));
|
||||||
const inAdminConsole = matchPath(pathname, {path: '/admin_console'}) != null;
|
const inAdminConsole = matchPath(pathname, {path: '/admin_console'}) != null;
|
||||||
const inChannels = matchPath(pathname, {path: '/:team/channels/:chanelId'}) != null;
|
const inChannels = matchPath(pathname, {path: '/:team/channels/:chanelId'}) != null;
|
||||||
const pluginsList = useSelector((state: GlobalState) => state.plugins.plugins);
|
|
||||||
const boards = pluginsList.focalboard;
|
|
||||||
|
|
||||||
return (taskName: string) => {
|
return (taskName: string) => {
|
||||||
switch (taskName) {
|
switch (taskName) {
|
||||||
@@ -283,12 +269,6 @@ export const useHandleOnBoardingTaskTrigger = () => {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OnboardingTasksName.BOARDS_TOUR: {
|
|
||||||
history.push('/boards');
|
|
||||||
localStorage.setItem(OnboardingTaskCategory, 'true');
|
|
||||||
handleSaveData(taskName, TaskNameMapToSteps[taskName].FINISHED, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case OnboardingTasksName.PLAYBOOKS_TOUR: {
|
case OnboardingTasksName.PLAYBOOKS_TOUR: {
|
||||||
history.push('/playbooks/start');
|
history.push('/playbooks/start');
|
||||||
localStorage.setItem(OnboardingTaskCategory, 'true');
|
localStorage.setItem(OnboardingTaskCategory, 'true');
|
||||||
@@ -313,7 +293,7 @@ export const useHandleOnBoardingTaskTrigger = () => {
|
|||||||
user_id: currentUserId,
|
user_id: currentUserId,
|
||||||
category: tourCategory,
|
category: tourCategory,
|
||||||
name: currentUserId,
|
name: currentUserId,
|
||||||
value: boards ? ExploreOtherToolsTourSteps.BOARDS_TOUR.toString() : ExploreOtherToolsTourSteps.PLAYBOOKS_TOUR.toString(),
|
value: ExploreOtherToolsTourSteps.PLAYBOOKS_TOUR.toString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
user_id: currentUserId,
|
user_id: currentUserId,
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export const OnboardingTourStepsForGuestUsers = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const ExploreOtherToolsTourSteps = {
|
export const ExploreOtherToolsTourSteps = {
|
||||||
BOARDS_TOUR: 0,
|
|
||||||
PLAYBOOKS_TOUR: 1,
|
PLAYBOOKS_TOUR: 1,
|
||||||
FINISHED,
|
FINISHED,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const useGetTourSteps = (tourCategory: string) => {
|
|||||||
|
|
||||||
let tourSteps: Record<string, number> = TTNameMapToTourSteps[tourCategory];
|
let tourSteps: Record<string, number> = TTNameMapToTourSteps[tourCategory];
|
||||||
|
|
||||||
const {playbooksPlugin, playbooksProductEnabled, boardsPlugin} = useGetPluginsActivationState();
|
const {playbooksPlugin, playbooksProductEnabled} = useGetPluginsActivationState();
|
||||||
|
|
||||||
if (tourCategory === TutorialTourName.EXPLORE_OTHER_TOOLS) {
|
if (tourCategory === TutorialTourName.EXPLORE_OTHER_TOOLS) {
|
||||||
const steps: Record<string, number> = tourSteps as typeof ExploreOtherToolsTourSteps;
|
const steps: Record<string, number> = tourSteps as typeof ExploreOtherToolsTourSteps;
|
||||||
@@ -42,9 +42,6 @@ export const useGetTourSteps = (tourCategory: string) => {
|
|||||||
delete steps.PLAYBOOKS_TOUR;
|
delete steps.PLAYBOOKS_TOUR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!boardsPlugin) {
|
|
||||||
delete steps.BOARDS_TOUR;
|
|
||||||
}
|
|
||||||
tourSteps = steps;
|
tourSteps = steps;
|
||||||
} else if (tourCategory === TutorialTourName.ONBOARDING_TUTORIAL_STEP && isGuestUser) {
|
} else if (tourCategory === TutorialTourName.ONBOARDING_TUTORIAL_STEP && isGuestUser) {
|
||||||
// restrict the 'learn more about messaging' tour when user is guest (townSquare, channel creation and user invite are restricted to guests)
|
// restrict the 'learn more about messaging' tour when user is guest (townSquare, channel creation and user invite are restricted to guests)
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
||||||
// See LICENSE.txt for license information.
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
|
||||||
|
|
||||||
import BoardsImg from 'images/boards_tour_tip.svg';
|
|
||||||
|
|
||||||
import {useMeasurePunchouts} from '@mattermost/components';
|
|
||||||
|
|
||||||
import OnboardingExploreToolsTourTip from './onboarding_explore_tools_tour_tip';
|
|
||||||
|
|
||||||
interface BoardsTourTipProps {
|
|
||||||
singleTip: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const BoardsTourTip = ({singleTip}: BoardsTourTipProps) => {
|
|
||||||
const title = (
|
|
||||||
<FormattedMessage
|
|
||||||
id='onboardingTour.BoardsTourTip.title'
|
|
||||||
defaultMessage={'Manage tasks with Boards'}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
const screen = (
|
|
||||||
<p>
|
|
||||||
<FormattedMessage
|
|
||||||
id='onboardingTour.BoardsTourTip.Boards'
|
|
||||||
defaultMessage={'Keep every project organized with kanban-style boards that integrate tightly with channel-based collaboration.'}
|
|
||||||
/>
|
|
||||||
</p>
|
|
||||||
);
|
|
||||||
|
|
||||||
const overlayPunchOut = useMeasurePunchouts(['product-menu-item-boards'], []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<OnboardingExploreToolsTourTip
|
|
||||||
title={title}
|
|
||||||
screen={screen}
|
|
||||||
overlayPunchOut={overlayPunchOut}
|
|
||||||
singleTip={singleTip}
|
|
||||||
imageURL={BoardsImg}
|
|
||||||
placement='right-start'
|
|
||||||
pulsatingDotPlacement='right'
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -2,4 +2,3 @@
|
|||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
export * from './playbooks_tour_tip';
|
export * from './playbooks_tour_tip';
|
||||||
export * from './boards_tour_tip';
|
|
||||||
|
|||||||
@@ -4191,7 +4191,6 @@
|
|||||||
"onboardingTask.checklist.task_explore_other_tools_in_platform": "Explore other tools in the platform.",
|
"onboardingTask.checklist.task_explore_other_tools_in_platform": "Explore other tools in the platform.",
|
||||||
"onboardingTask.checklist.task_invite_team_members": "Invite team members to the workspace.",
|
"onboardingTask.checklist.task_invite_team_members": "Invite team members to the workspace.",
|
||||||
"onboardingTask.checklist.task_learn_more_about_messaging": "Take a tour of Channels.",
|
"onboardingTask.checklist.task_learn_more_about_messaging": "Take a tour of Channels.",
|
||||||
"onboardingTask.checklist.task_plan_sprint_with_kanban_style_boards": "Manage tasks with your first board.",
|
|
||||||
"onboardingTask.checklist.task_resolve_incidents_faster_with_playbooks": "Explore workflows with your first playbook.",
|
"onboardingTask.checklist.task_resolve_incidents_faster_with_playbooks": "Explore workflows with your first playbook.",
|
||||||
"onboardingTask.checklist.task_start_enterprise_trial": "Learn more about Enterprise-level high-security features.",
|
"onboardingTask.checklist.task_start_enterprise_trial": "Learn more about Enterprise-level high-security features.",
|
||||||
"onboardingTask.checklist.task_visit_system_console": "Visit the System Console to configure your workspace.",
|
"onboardingTask.checklist.task_visit_system_console": "Visit the System Console to configure your workspace.",
|
||||||
@@ -4200,8 +4199,6 @@
|
|||||||
"onboardingTask.completeYourProfileTour.title": "Edit your profile",
|
"onboardingTask.completeYourProfileTour.title": "Edit your profile",
|
||||||
"onboardingTask.visitSystemConsole.Description": "More detailed configuration settings for your workspace can be accessed here.",
|
"onboardingTask.visitSystemConsole.Description": "More detailed configuration settings for your workspace can be accessed here.",
|
||||||
"onboardingTask.visitSystemConsole.title": "Visit the System Console",
|
"onboardingTask.visitSystemConsole.title": "Visit the System Console",
|
||||||
"onboardingTour.BoardsTourTip.Boards": "Keep every project organized with kanban-style boards that integrate tightly with channel-based collaboration.",
|
|
||||||
"onboardingTour.BoardsTourTip.title": "Manage tasks with Boards",
|
|
||||||
"onboardingTour.ChannelsAndDirectMessagesTour.channels": "Channels are where you can communicate with your team about a topic or project.",
|
"onboardingTour.ChannelsAndDirectMessagesTour.channels": "Channels are where you can communicate with your team about a topic or project.",
|
||||||
"onboardingTour.ChannelsAndDirectMessagesTour.directMessages": "<b>Direct messages</b> are for private conversations between individuals or small groups.",
|
"onboardingTour.ChannelsAndDirectMessagesTour.directMessages": "<b>Direct messages</b> are for private conversations between individuals or small groups.",
|
||||||
"onboardingTour.ChannelsAndDirectMessagesTour.firstChannel": "Hey look, there’s your **{firstChannelName}** channel! ",
|
"onboardingTour.ChannelsAndDirectMessagesTour.firstChannel": "Hey look, there’s your **{firstChannelName}** channel! ",
|
||||||
|
|||||||
@@ -661,7 +661,6 @@ export const CrtTutorialSteps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const ExploreOtherToolsTourSteps = {
|
export const ExploreOtherToolsTourSteps = {
|
||||||
BOARDS_TOUR: 0,
|
|
||||||
PLAYBOOKS_TOUR: 1,
|
PLAYBOOKS_TOUR: 1,
|
||||||
FINISHED: 999,
|
FINISHED: 999,
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user