Skip to content

Commit 502de96

Browse files
feat(*): replace name of manager components react lib
ref: MANAGER-14822 Signed-off-by: Alex Boungnaseng <alex.boungnaseng.ext@corp.ovh.com>
1 parent ae271a5 commit 502de96

File tree

232 files changed

+854
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+854
-338
lines changed

docs/docs/guide/manager-components.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We use a library of super components in our react applications.
44

55
## The package is accessible on the monorepo
66

7-
- [@ovhcloud/manager-components](https://github.com/ovh/manager/blob/develop/packages/manager-components/README.md)
7+
- [@ovhcloud/manager-react-components](https://github.com/ovh/manager/blob/develop/packages/manager-components/README.md)
88

99
## The storybook :
1010

@@ -14,7 +14,7 @@ The storybook is accessible on
1414
## How to start the application?
1515

1616
```sh
17-
$ yarn workspace @ovhcloud/manager-components run start
17+
$ yarn workspace @ovhcloud/manager-react-components run start
1818
```
1919

2020
Go to `<http://localhost:6006>`
@@ -26,4 +26,4 @@ Go to `<http://localhost:6006>`
2626
## Importation of a component on your react code application :
2727

2828
The component is not builded so you can import directly the component named `Card` from the workspace like this :
29-
`import Card from '@ovhcloud/manager-components'`
29+
`import Card from '@ovhcloud/manager-react-components'`

packages/manager-components/.storybook/main.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { StorybookConfig } from '@storybook/react-vite';
22
const config: StorybookConfig = {
3-
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)', '../src/docs/*.mdx'],
3+
stories: [
4+
'../src/**/*.stories.@(js|jsx|ts|tsx|mdx)',
5+
'../src/docs/*.mdx',
6+
'../src/docs/whatsnew/migration-guide/*.mdx',
7+
],
48
addons: [
59
'@storybook/addon-links',
610
'@storybook/addon-essentials',
711
'@storybook/addon-interactions',
812
'@storybook/addon-styling',
13+
'@storybook/addon-doc',
914
],
1015
framework: {
1116
name: '@storybook/react-vite',

packages/manager-components/.storybook/preview.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ const preview: Preview = {
2929
date: /Date$/,
3030
},
3131
},
32+
options: {
33+
storySort: {
34+
order: [
35+
'Manager React Components',
36+
['Introduction', "What's new?", ['Changelog']],
37+
'*',
38+
],
39+
},
40+
showPanel: true,
41+
},
3242
},
3343
};
3444

packages/manager-components/CHANGELOG.md

+40-40
Large diffs are not rendered by default.

packages/manager-components/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Keep it as simple as possible
1414
## Import component to another project
1515

1616
The component is not builded so you can import directly the component named `Card` from the workspace like this :
17-
`import Card from '@ovhcloud/manager-components'`
17+
`import Card from '@ovhcloud/manager-react-components'`
1818

1919
## Main Scripts
2020

packages/manager-components/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@ovhcloud/manager-components",
2+
"name": "@ovhcloud/manager-react-components",
33
"private": true,
44
"version": "1.26.0",
55
"main": "src/lib.ts",
@@ -51,8 +51,10 @@
5151
},
5252
"devDependencies": {
5353
"@babel/core": "7.22.10",
54+
"@mdx-js/react": "^3.0.1",
5455
"@ovh-ux/manager-tailwind-config": "^0.2.0",
5556
"@ovh-ux/manager-vite-config": "^0.8.0",
57+
"@storybook/addon-docs": "^7.5.3",
5658
"@storybook/addon-essentials": "7.5.3",
5759
"@storybook/addon-interactions": "7.5.3",
5860
"@storybook/addon-links": "7.5.3",
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
import { Meta } from '@storybook/addon-docs/blocks';
2+
import { OsdsLink, OsdsIcon } from '@ovhcloud/ods-components/react';
3+
import { Links, LinkType } from '../../';
24

3-
<Meta title="Introduction" />
5+
<Meta title="Manager React Components/Introduction" />
46

57
# Welcome to the Manager Component Storybook!
68

7-
This page presents the new features of each release.
9+
<Links
10+
type={LinkType.external}
11+
label="Follow on Github"
12+
href="https://github.com/ovh/manager/tree/master/packages/manager-components"
13+
target="_blank"
14+
/>
815

9-
## Release Notes
10-
11-
> ### Version 1.25.0
12-
>
13-
> > #### What's news ?
14-
> >
15-
> > - **BaseLayout** : Integration of a brand new component template for better visual consistency in the manager
16-
>
17-
> > #### Feature updates:
18-
> >
19-
> > - **Onboarding** : Update of this existing component with the new specification of design team
20-
>
21-
> > #### Bugfixes
22-
> >
23-
> > - ...
24-
>
25-
> > #### Deprecated
26-
> >
27-
> > - **Dashboard** : Dashboard template componet is deprecated replace by the new BaseLayout component
16+
<img
17+
src="https://th.bing.com/th/id/R.173e08cbab5c318ff60d0e2445c8aafd?rik=WDLPHDEItBd4Bw&pid=ImgRaw&r=0"
18+
alt="welcome"
19+
/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Meta } from '@storybook/addon-docs/blocks';
2+
3+
<Meta title="Manager React Components/What's news ?/Changelog" />
4+
5+
# Changelog
6+
7+
## Release Notes
8+
9+
> ### Version 1.26.0
10+
>
11+
> > #### What's news ?
12+
> >
13+
> > - **@manager-react-components** : Update a new package name for npm registry
14+
15+
> ### Version 1.25.0
16+
>
17+
> > #### What's news ?
18+
> >
19+
> > - **BaseLayout** : Integration of a brand new component template for better visual consistency in the manager
20+
>
21+
> > #### Feature updates:
22+
> >
23+
> > - **Onboarding** : Update of this existing component with the new specification of design team
24+
>
25+
> > #### Bugfixes
26+
> >
27+
> > - ...
28+
>
29+
> > #### Deprecated
30+
> >
31+
> > - **Dashboard** : Dashboard template componet is deprecated replace by the new BaseLayout component
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { Meta } from '@storybook/addon-docs/blocks';
2+
import { OsdsLink, OsdsIcon } from '@ovhcloud/ods-components/react';
3+
import { Links, LinkType } from '../../../';
4+
5+
<Meta title="Manager React Components/What's news/migration guide/1.25.0 to 1.26.0" />
6+
7+
# Migration from 1.25.0 to 1.26.0
8+
9+
<br />
10+
## Few steps to follow
11+
12+
<br />
13+
1. Replace your dependancies in your **package.json**
14+
15+
<div>
16+
<strike>"@ovhcloud/manager-components": "^1.26.0"</strike>
17+
</div>
18+
<div>"@ovhcloud/manager-react-components": "^1.26.0"</div>
19+
<br />
20+
21+
2. Replace your components **import**
22+
23+
<div>
24+
<strike>import \{card\} from "@ovhcloud/manager-components"</strike>
25+
</div>
26+
<div>import \{card\} from "@ovhcloud/manager-react-components"</div>
27+
<br />
28+
29+
> Next release **1.27.0**, we will publish the manager react component in the npm registry

packages/manager/apps/catalog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@ovh-ux/manager-react-core-application": "^0.10.0",
2828
"@ovh-ux/manager-react-shell-client": "^0.7.0",
2929
"@ovh-ux/shell": "^3.7.0",
30-
"@ovhcloud/manager-components": "^1.26.0",
30+
"@ovhcloud/manager-react-components": "^1.26.0",
3131
"@ovhcloud/ods-common-core": "17.2.2",
3232
"@ovhcloud/ods-common-theming": "17.2.2",
3333
"@ovhcloud/ods-components": "17.2.2",

packages/manager/apps/catalog/src/components/Error/Errors.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useLocation, useNavigate } from 'react-router-dom';
33
import { AxiosError } from 'axios';
4-
import { ErrorBanner, ErrorMessage } from '@ovhcloud/manager-components';
4+
import { ErrorBanner, ErrorMessage } from '@ovhcloud/manager-react-components';
55
import { useSendErrorTracking } from '@/utils/trackingError';
66

77
export interface ErrorObject {

packages/manager/apps/catalog/src/pages/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
22
import { useTranslation } from 'react-i18next';
33
import { useSearchParams } from 'react-router-dom';
44

5-
import { Card } from '@ovhcloud/manager-components';
5+
import { Card } from '@ovhcloud/manager-react-components';
66
import { OsdsText, OsdsDivider } from '@ovhcloud/ods-components/react';
77
import {
88
ODS_THEME_COLOR_INTENT,

packages/manager/apps/catalog/src/utils/trackingError.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React from 'react';
22
import { ShellContext } from '@ovh-ux/manager-react-shell-client';
33
import { useLocation } from 'react-router-dom';
4-
import { ErrorMessage, TRACKING_LABELS } from '@ovhcloud/manager-components';
4+
import {
5+
ErrorMessage,
6+
TRACKING_LABELS,
7+
} from '@ovhcloud/manager-react-components';
58
import { ErrorObject } from '@/components/Error/Errors';
69

710
export function getTypology(error: ErrorMessage) {

packages/manager/apps/catalog/tailwind.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
content: [
66
'./src/**/*.{js,jsx,ts,tsx}',
77
path.join(
8-
path.dirname(require.resolve('@ovhcloud/manager-components')),
8+
path.dirname(require.resolve('@ovhcloud/manager-react-components')),
99
'**/*.{js,jsx,ts,tsx}',
1010
),
1111
],

packages/manager/apps/container/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@ovh-ux/request-tagger": "^0.3.0",
3737
"@ovh-ux/shell": "^3.7.0",
3838
"@ovh-ux/ui-kit": "^6.10.0",
39-
"@ovhcloud/manager-components": "^1.26.0",
39+
"@ovhcloud/manager-react-components": "^1.26.0",
4040
"@ovhcloud/ods-common-core": "17.2.2",
4141
"@ovhcloud/ods-common-theming": "17.2.2",
4242
"@ovhcloud/ods-components": "17.2.2",
@@ -93,4 +93,4 @@
9393
"EU",
9494
"US"
9595
]
96-
}
96+
}

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/AccountSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import dedicatedShopConfig from '../order/shop-config/dedicated';
99
import OrderTrigger from '../order/OrderTrigger';
1010
import { ShopItem } from '../order/OrderPopupContent';
1111
import { features } from './DedicatedSidebar';
12-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
12+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
1313
import constants from '../../account-sidebar/UsefulLinks/constants';
1414

1515
const kycIndiaFeature = 'identity-documents';

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/DedicatedSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import getIcon from './GetIcon';
1111
import { OsdsIcon } from '@ovhcloud/ods-components/react';
1212
import { ODS_ICON_NAME, ODS_ICON_SIZE } from '@ovhcloud/ods-components';
1313
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
14-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
14+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
1515

1616
export const features = [
1717
'dedicated-server',

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/HostedPrivateCloudSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import getIcon from './GetIcon';
1111
import { OsdsIcon } from '@ovhcloud/ods-components/react';
1212
import { ODS_ICON_NAME, ODS_ICON_SIZE } from '@ovhcloud/ods-components';
1313
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
14-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
14+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
1515

1616
const features = [
1717
'dedicated-cloud',

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/TelecomSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import telecomShopConfig from '../order/shop-config/telecom';
1212
import OrderTrigger from '../order/OrderTrigger';
1313
import { ShopItem } from '../order/OrderPopupContent';
1414
import getIcon from './GetIcon';
15-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
15+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
1616

1717

1818

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/WebSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import OrderTrigger from '../order/OrderTrigger';
88
import webShopConfig from '../order/shop-config/web';
99
import { ShopItem } from '../order/OrderPopupContent';
1010
import getIcon from './GetIcon';
11-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
11+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
1212

1313
export const webFeatures = [
1414
'web:domains',

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/public-cloud/PublicCloudSidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback, useEffect, useMemo, useState } from 'react';
22
import { useLocation } from 'react-router-dom';
33
import { useTranslation } from 'react-i18next';
4-
import { useFeatureAvailability } from '@ovhcloud/manager-components';
4+
import { useFeatureAvailability } from '@ovhcloud/manager-react-components';
55
import { useLegacyContainer } from '@/container/legacy/context';
66
import { useShell } from '@/context';
77
import useProjects from './useProjects';

packages/manager/apps/container/src/container/mfa-enrollment/MfaEnrollment.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
ODS_ICON_SIZE,
1818
} from '@ovhcloud/ods-components';
1919
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
20-
import { Subtitle } from '@ovhcloud/manager-components';
20+
import { Subtitle } from '@ovhcloud/manager-react-components';
2121

2222
type MfaEnrollmentProps = {
2323
forced?: boolean;

packages/manager/apps/container/src/container/nav-reshuffle/header/user-account-menu/Content.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useShell } from '@/context';
99
import useProductNavReshuffle from '@/core/product-nav-reshuffle';
1010
import { OsdsChip } from '@ovhcloud/ods-components/react';
1111
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
12-
import { fetchFeatureAvailabilityData } from '@ovhcloud/manager-components';
12+
import { fetchFeatureAvailabilityData } from '@ovhcloud/manager-react-components';
1313

1414
import { useReket } from '@ovh-ux/ovh-reket';
1515
import { UserLink } from './UserLink';

packages/manager/apps/container/src/container/nav-reshuffle/sidebar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
} from './utils';
2525
import { Node } from './navigation-tree/node';
2626
import useProductNavReshuffle from '@/core/product-nav-reshuffle';
27-
import { fetchFeatureAvailabilityData } from '@ovhcloud/manager-components';
27+
import { fetchFeatureAvailabilityData } from '@ovhcloud/manager-react-components';
2828

2929
interface ServicesCountError {
3030
url: string;

packages/manager/apps/container/src/cookie-policy/CookiePolicy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { User } from '@ovh-ux/manager-config';
66
import ovhCloudLogo from './assets/logo-ovhcloud.png';
77
import links from './links';
88
import { useApplication } from '@/context';
9-
import { Subtitle, Links, LinksProps } from '@ovhcloud/manager-components';
9+
import { Subtitle, Links, LinksProps } from '@ovhcloud/manager-react-components';
1010
import {
1111
OsdsButton,
1212
OsdsModal,

packages/manager/apps/container/src/core/container/ContainerProvider.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useState } from 'react';
22
import { useReket } from '@ovh-ux/ovh-reket';
33
import { Application } from '@ovh-ux/manager-config';
4-
import {fetchFeatureAvailabilityData} from '@ovhcloud/manager-components'
4+
import {fetchFeatureAvailabilityData} from '@ovhcloud/manager-react-components'
55
import {
66
getBetaAvailabilityFromLocalStorage,
77
setBetaAvailabilityToLocalStorage,

packages/manager/apps/container/src/sso-auth-modal/SSOAuthModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
ODS_CHIP_SIZE,
2525
} from '@ovhcloud/ods-components';
2626
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
27-
import { Subtitle } from '@ovhcloud/manager-components';
27+
import { Subtitle } from '@ovhcloud/manager-react-components';
2828
import {
2929
connectedToDisconnected,
3030
connectedToOther,

packages/manager/apps/key-management-service/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@ovh-ux/manager-react-core-application": "^0.10.0",
2929
"@ovh-ux/manager-react-shell-client": "^0.7.0",
3030
"@ovh-ux/manager-tailwind-config": "*",
31-
"@ovhcloud/manager-components": "^1.26.0",
31+
"@ovhcloud/manager-react-components": "^1.26.0",
3232
"@ovhcloud/ods-common-core": "17.2.2",
3333
"@ovhcloud/ods-common-theming": "17.2.2",
3434
"@ovhcloud/ods-components": "17.2.2",

packages/manager/apps/key-management-service/src/components/Error/Error.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { useShell } from '@ovh-ux/manager-react-shell-client';
44
import {
55
ErrorMessage,
66
TRACKING_LABELS,
7-
} from '@ovhcloud/manager-components/src/components/';
8-
import { ErrorBanner } from '@ovhcloud/manager-components';
7+
} from '@ovhcloud/manager-react-components/src/components/';
8+
import { ErrorBanner } from '@ovhcloud/manager-react-components';
99

1010
interface ErrorObject {
1111
[key: string]: any;

packages/manager/apps/key-management-service/src/components/Guide/KmsGuidesHeader.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useTranslation } from 'react-i18next';
33
import { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
4-
import { GuideButton } from '@ovhcloud/manager-components';
4+
import { GuideButton } from '@ovhcloud/manager-react-components';
55
import useGuideUtils from '@/hooks/guide/useGuideUtils';
66

77
export default function KmsGuidesHeader() {

packages/manager/apps/key-management-service/src/components/Listing/ListingCells.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
DataGridClipboardCell,
44
DataGridTextCell,
55
useNotifications,
6-
} from '@ovhcloud/manager-components';
6+
} from '@ovhcloud/manager-react-components';
77
import { OsdsLink } from '@ovhcloud/ods-components/react';
88
import { ODS_TEXT_COLOR_INTENT } from '@ovhcloud/ods-components';
99
import { useNavigate } from 'react-router-dom';

0 commit comments

Comments
 (0)