Skip to content

Commit

Permalink
fix(zimbra): change content and add guides on onboarding
Browse files Browse the repository at this point in the history
ref: MANAGER-14642

Signed-off-by: Guillaume Hyenne <[email protected]>
  • Loading branch information
ghyenne committed Jan 10, 2025
1 parent 072dcb9 commit 501fa94
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"title": "Zimbra",
"description": "L'offre email Zimbra sera bientôt disponible. Vous souhaitez rejoindre la Beta Zimbra ?",
"orderButtonLabel": "Rejoindre la beta"
"title": "Suite collaborative Zimbra",
"description": "Communiquer et collaborer en entreprise grâce à la suite Zimbra",
"orderButtonLabel": "Commander",
"moreInfoButtonLabel": "Découvrir la solution Zimbra",
"card_guide_category": "Tutoriel",
"card_guide_title_1": "Premiers pas avec l'offre Zimbra",
"card_guide_title_2": "Configurer son compte Zimbra",
"card_guide_title_3": "Maitriser le webmail Zimbra",
"card_guide_description_1": "Découvrez comment créer vos premières boites mail et administrer votre service",
"card_guide_description_2": "Apprenez à configurer et utiliser votre compre Zimbra sur un terminal externe (PC ou smartphone)",
"card_guide_description_3": "Découvrez les fonctionnalités de l'interface web Zimbra"
}
30 changes: 30 additions & 0 deletions packages/manager/apps/zimbra/src/guides.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,36 @@ export const ZIMBRA_ADMINISTRATOR_GUIDE: GuideLinks = {
SN: `${helpRoot}fr-zimbra-getting-started?id=kb_article_view&sysparm_article=KB0064591`,
};

export const ZIMBRA_HOW_TO_CONFIGURE_GUIDE: GuideLinks = {
FR: `${helpRoot}fr-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064901`,
GB: `${helpRoot}en-gb-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064928`,
DE: `${helpRoot}de-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064933`,
ES: `${helpRoot}es-es-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064934`,
IT: `${helpRoot}it-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064927`,
PL: `${helpRoot}pl-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064931`,
PT: `${helpRoot}pt-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064932`,
IE: `${helpRoot}en-ie-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064929`,
DEFAULT: `${helpRoot}en-ie-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064929`,
MA: `${helpRoot}fr-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064901`,
TN: `${helpRoot}fr-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064901`,
SN: `${helpRoot}fr-zimbra-mail-apps?id=kb_article_view&sysparm_article=KB0064901`,
};

export const ZIMBRA_WEBMAIL_GUIDE: GuideLinks = {
FR: `${helpRoot}fr-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062063`,
GB: `${helpRoot}en-gb-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062062`,
DE: `${helpRoot}de-mx-plan-zimbra-faq?id=kb_article_view&sysparm_article=KB0061403`,
ES: `${helpRoot}es-es-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062060`,
IT: `${helpRoot}it-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062058`,
PL: `${helpRoot}pl-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062061`,
PT: `${helpRoot}pt-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062056`,
IE: `${helpRoot}en-ie-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062057`,
DEFAULT: `${helpRoot}en-ie-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062057`,
MA: `${helpRoot}fr-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062063`,
TN: `${helpRoot}fr-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062063`,
SN: `${helpRoot}fr-mx-plan-zimbra?id=kb_article_view&sysparm_article=KB0062063`,
};

export const ZIMBRA_DNS_CONFIGURATION_GUIDE: GuideLinks = {
FR: `${helpRoot}`,
GB: `${helpRoot}`,
Expand Down
79 changes: 56 additions & 23 deletions packages/manager/apps/zimbra/src/pages/onboarding/index.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,76 @@
import React from 'react';
import React, { useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { OnboardingLayout } from '@ovh-ux/manager-react-components';
import {
ButtonType,
PageLocation,
useOvhTracking,
} from '@ovh-ux/manager-react-shell-client';
import { Card, OnboardingLayout } from '@ovh-ux/manager-react-components';
import { ShellContext } from '@ovh-ux/manager-react-shell-client';
import onboardingImgSrc from './onboarding-img.png';
import { JOIN_ZIMBRA_BETA } from '@/tracking.constant';
import {
ZIMBRA_ADMINISTRATOR_GUIDE,
ZIMBRA_HOW_TO_CONFIGURE_GUIDE,
ZIMBRA_WEBMAIL_GUIDE,
} from '@/guides.constants';

export default function Onboarding() {
const { t } = useTranslation('onboarding');

const title: string = t('title');
const description: string = t('description');
const { trackClick } = useOvhTracking();
const context = useContext(ShellContext);
const { ovhSubsidiary } = context.environment.getUser();

const onOrderButtonClick = () => {
trackClick({
location: PageLocation.page,
buttonType: ButtonType.button,
actionType: 'navigation',
actions: [JOIN_ZIMBRA_BETA],
});

window.open(
'https://labs.ovhcloud.com/en/zimbra-beta/',
'https://www.ovh.com/fr/order/webcloud/?zimbra#/webCloud/zimbra/select?selection=%7E(zimbra%7E(offer%7E%27zimbra-account-pp-starter%7Epricing%7E%27default%7Equantity%7E1))', // @todo: should be changed when we have all the URLs
'_blank',
'noopener',
);
};

const onboardingGuides = [
{
key: 1,
href: useMemo(() => {
return (
ZIMBRA_ADMINISTRATOR_GUIDE[ovhSubsidiary] ||
ZIMBRA_ADMINISTRATOR_GUIDE.DEFAULT
);
}, [ZIMBRA_ADMINISTRATOR_GUIDE, ovhSubsidiary]),
},
{
key: 2,
href: useMemo(() => {
return (
ZIMBRA_HOW_TO_CONFIGURE_GUIDE[ovhSubsidiary] ||
ZIMBRA_HOW_TO_CONFIGURE_GUIDE.DEFAULT
);
}, [ZIMBRA_HOW_TO_CONFIGURE_GUIDE, ovhSubsidiary]),
},
{
key: 3,
href: useMemo(() => {
return (
ZIMBRA_WEBMAIL_GUIDE[ovhSubsidiary] || ZIMBRA_WEBMAIL_GUIDE.DEFAULT
);
}, [ZIMBRA_WEBMAIL_GUIDE, ovhSubsidiary]),
},
];

return (
<OnboardingLayout
title={title}
title={t('title')}
img={{ src: onboardingImgSrc }}
description={description}
description={t('description')}
orderButtonLabel={t('orderButtonLabel')}
onOrderButtonClick={onOrderButtonClick}
></OnboardingLayout>
moreInfoButtonLabel={t('moreInfoButtonLabel')}
moreInfoHref="https://www.ovhcloud.com/fr/emails/zimbra-emails/" // @todo: should be changed when we have all the URLs
>
{onboardingGuides.map(({ href, key }) => (
<Card
href={href}
texts={{
category: t('card_guide_category'),
description: t(`card_guide_description_${key}`),
title: t(`card_guide_title_${key}`),
}}
/>
))}
</OnboardingLayout>
);
}
1 change: 0 additions & 1 deletion packages/manager/apps/zimbra/src/tracking.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const BACK_PREVIOUS_PAGE = 'back_previous-page';
export const TO_BE_DEFINED = 'to-be-defined';

export const ONBOARDING = 'onboarding';
export const JOIN_ZIMBRA_BETA = 'join_zimbra_beta';

export const GENERAL_INFORMATIONS = 'general-informations';

Expand Down

0 comments on commit 501fa94

Please sign in to comment.