Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release #13213

Merged
merged 23 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b3c3659
fix(i18n): add missing translations [CDS 3323]
anooparveti Sep 23, 2024
cf0c4b9
fix: remove unused translations [CDS]
anooparveti Sep 24, 2024
27b0169
build(deps): bump dompurify from 2.5.0 to 2.5.4 (#13127)
dependabot[bot] Sep 24, 2024
6e835fb
feat(onboarding): improve onboarding template component (#13134)
tibs245 Sep 24, 2024
167ccde
fix(manager-components): fix DashboardLayoutGrid (#13169)
chipp972 Sep 25, 2024
289c29d
fix(manager-components): fix useOvhIam hook (#13175)
chipp972 Sep 25, 2024
7fa4b69
feat(manager-components): add error handling to RedirectionGuard (#13…
chipp972 Sep 25, 2024
430457d
feat(manager-component): add button variant prop to ActionMenu (#13203)
chipp972 Sep 25, 2024
5685a67
fix(manager-react-components): update title and heading in Dashboard …
anooparveti Sep 25, 2024
b155253
fix(manager-react-components): update header color in datagrid (#13248)
anooparveti Sep 25, 2024
5c1fa65
test(manager-react-components): add testid props to Clipboard (#13247)
anooparveti Sep 25, 2024
fd77747
fix(manager-react-components): make data-testid optional on clipboard
anooparveti Sep 25, 2024
ba689bd
feat(manager-react-components): build and publish library
aboungnaseng-ovhcloud Aug 22, 2024
830c6dc
ci(github): update manager react components folder
aboungnaseng-ovhcloud Sep 26, 2024
099bd82
feat(manager-react-components): delete private package json
aboungnaseng-ovhcloud Sep 26, 2024
234edc4
feat(pci.project): display correctly the new MUM location (#12966)
selm3n Sep 26, 2024
f35f486
refactor(container): fix use-effect and use-memo uses (#13216)
tibs245 Sep 26, 2024
4ee1e7d
feat(config): add method to siwtch default language (#13255)
JacquesLarique Sep 26, 2024
f470ab3
build(*): bump ui-kit to 6.10.5 (#13060)
MaximeBajeux Sep 26, 2024
f8ba0ad
sync: master to develop
anooparveti Sep 26, 2024
338d4bb
Merge pull request #13297 from ovh/sync/master-develop
anooparveti Sep 26, 2024
6e4395e
feat(config): updated user auth interface to include latest updates (…
JacquesLarique Sep 26, 2024
096fd08
build(manager-react-components): publish package
anooparveti Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ packages/manager/modules/ @ovh/team-manager-dev-angularjs
*.tsx @ovh/team-manager-dev-reactjs @ovh/su-digital-tools-core-stack
/playwright-helpers/ @ovh/team-manager-dev-reactjs

# Manager-components
/packages/manager-components @ovh/team-manager-control-tower
# Manager-React-Components
/packages/manager-react-components @ovh/team-manager-control-tower

# Continuous Integration and scripts
.github/workflows @ovh/su-digital-tools-core-service-delivery
Expand Down
26 changes: 13 additions & 13 deletions .github/ISSUE_TEMPLATE/manager_components_bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Bug Report on Manager Components (Internal)
description: File a bug report on Manager components
title: '[manager-components]: <TITLE>'
labels: ['manager-components', 'bug']
projects: ["ovh/22"]
title: '[manager-react-components]: <TITLE>'
labels: ['manager-react-components', 'bug']
projects: ['ovh/22']
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -32,19 +32,19 @@ body:
description: The browser(s) this issue occurred with.
validations:
required: false
- type: "checkboxes"
id: "operating-system"
- type: 'checkboxes'
id: 'operating-system'
attributes:
label: "Operating System"
description: "The operating system(s) this issue occurred with."
label: 'Operating System'
description: 'The operating system(s) this issue occurred with.'
options:
- label: "macOS"
- label: "Windows"
- label: "Linux"
- type: "textarea"
id: "additional-information"
- label: 'macOS'
- label: 'Windows'
- label: 'Linux'
- type: 'textarea'
id: 'additional-information'
attributes:
label: "Additional Information"
label: 'Additional Information'
description: |
Use this section to provide any additional information you might have
like screenshots, notes, or links to ideas.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/manager_components_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: New Feature Request for Manager Components (Internal)
description: Request for new component/hook/util
title: '[manager-components]: <TITLE>'
labels: ['manager-components', 'feature']
projects: ["ovh/22"]
title: '[manager-react-components]: <TITLE>'
labels: ['manager-react-components', 'feature']
projects: ['ovh/22']
body:
- type: markdown
attributes:
Expand All @@ -12,8 +12,8 @@ body:
value: Please make sure to check if similar component already exists.
- type: checkboxes
attributes:
label: Have you already checked if a similar item is present on manager-components?
description: Before to open a request on our GitHub repository, did you already check if the similar item is present on the manager-components storybook?
label: Have you already checked if a similar item is present on manager-react-components?
description: Before to open a request on our GitHub repository, did you already check if the similar item is present on the manager-react-components storybook?
options:
- label: Yes, I have already checked the existing components/hooks/utils.
required: false
Expand Down
6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ enabler:
- packages/manager/apps/carbon-calculator/**
- packages/manager/apps/iam/**
- packages/manager/apps/key-management-service/**
manager-components:
- packages/manager-components/src/**
manager-react-components:
- packages/manager-react-components/src/**
common:
- packages/components/**
- packages/manager/core/**
Expand Down Expand Up @@ -104,6 +104,6 @@ common:
- packages/manager/modules/trusted-nic/**
- packages/manager/modules/web-universe-components/**
- packages/manager/tools/**
- packages/manager-components/**
- packages/manager-react-components/**
- playwright-helpers/**
- scripts/**
2 changes: 1 addition & 1 deletion .github/workflows/run-bdd-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build BDD covered packages and dependencies
run: |
yarn exec turbo -- run build --filter="./packages/manager/core/*" --concurrency=5
yarn exec turbo -- run build --filter="./packages/manager/manager-components/*" --concurrency=5
yarn exec turbo -- run build --filter="./packages/manager-react-components" --concurrency=5
yarn exec turbo -- run build --filter="./packages/manager/modules/order" --concurrency=5
# This task is for running the jest tests outside microApps
- name: Run tests Jest
Expand Down
2 changes: 1 addition & 1 deletion packages/components/ng-ovh-mondial-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"set-value": "^2.0.1"
},
"dependencies": {
"@ovh-ux/ui-kit": "^6.10.4",
"@ovh-ux/ui-kit": "^6.10.5",
"bootstrap": "~3.4.1",
"lodash": "^4.17.15",
"ovh-ui-kit-bs": "^4.2.0"
Expand Down
42 changes: 21 additions & 21 deletions packages/manager-react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "@ovh-ux/manager-react-components",
"private": true,
"version": "1.31.0",
"main": "src/lib.ts",
"license": "BSD-3-Clause",
"author": "OVH SAS",
"types": "dist/types/packages/manager-react-components/src/index.d.ts",
"main": "dist/manager-react-components-lib.es.ts",
"browser": "dist/manager-react-components-lib.es.ts",
"homepage": "https://github.com/ovh/manager/blob/master/packages/manager-react-components/README.md",
"bugs": {
"url": "https://github.com/ovh/manager/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ovh/manager.git",
Expand All @@ -12,9 +19,10 @@
"dist"
],
"scripts": {
"build": "echo build",
"build": "vite build && tsc",
"dev": "vite build && tsc",
"build:storybook": "storybook build",
"dev": "tsc",
"prepare": "vite build && tsc",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
"start": "storybook dev -p 6006",
"test": "jest --coverage -u",
Expand All @@ -28,7 +36,6 @@
]
},
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-react-shell-client": "^0.7.0",
"@ovhcloud/ods-common-core": "17.2.2",
Expand All @@ -39,18 +46,24 @@
"@tanstack/react-table": "^8.20.1",
"@types/lodash.isdate": "^4.0.9",
"@types/lodash.isequal": "^4.5.0",
"babel-preset-react-app": "^10.0.1",
"clsx": "^2.1.1",
"i18next": "^23.8.2",
"lodash.isdate": "^4.0.1",
"lodash.isequal": "^4.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^11.18.1",
"react-router-dom": "^6.3.0",
"react-use": "^17.5.0",
"sass": "1.71.0",
"tailwindcss": "^3.4.4",
"uuid": "^9.0.1"
"uuid": "^9.0.1",
"zustand": "^4.5.0"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"babel-preset-react-app": "^10.0.1",
"@mdx-js/react": "^3.0.1",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
"@ovh-ux/manager-vite-config": "^0.8.0",
Expand Down Expand Up @@ -93,26 +106,13 @@
"postcss": "8.4.31",
"prettier": "3.0.1",
"prop-types": "15.8.1",
"react-dom": "18.2.0",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.3.0",
"react-use": "^17.5.0",
"storybook": "7.5.3",
"storybook-addon-react-router-v6": "^2.0.10",
"ts-jest": "^29.1.1",
"typescript": "^4.3.2",
"undici": "5.28.4",
"vite": "^5.2.13",
"vite-plugin-dts": "3.5.1",
"vitest": "^1.2.0",
"zustand": "^4.5.0"
},
"optionalDependencies": {
"i18next": "^23.8.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^11.18.1",
"react-router-dom": "^6.3.0",
"zustand": "^4.5.0"
"vitest": "^1.2.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const renderComponent = (props: ManagerButtonProps) => {
return render(<ManagerButton {...props} />);
};

const mockedHook = useAuthorizationIam as jest.Mock<IamAuthorizationResponse>;
const mockedHook =
useAuthorizationIam as unknown as jest.Mock<IamAuthorizationResponse>;

describe('ManagerButton tests', () => {
afterEach(() => {
Expand All @@ -26,8 +27,7 @@ describe('ManagerButton tests', () => {
isFetched: true,
});
renderComponent({
urn:
'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
urn: 'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
iamActions: [
'manager-react-components:apiovh:manager-react-components/attach-action',
],
Expand All @@ -43,8 +43,7 @@ describe('ManagerButton tests', () => {
isFetched: true,
});
renderComponent({
urn:
'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
urn: 'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
iamActions: [
'manager-react-components:apiovh:manager-react-components/attach',
],
Expand All @@ -65,8 +64,7 @@ describe('ManagerButton tests', () => {
isFetched: true,
});
renderComponent({
urn:
'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
urn: 'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
iamActions: [
'manager-react-components:apiovh:manager-react-components/attach-action',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,22 @@ export const ManagerButton = ({
const { t } = useTranslation('iam');
const { isAuthorized } = useAuthorizationIam(iamActions, urn, isIamTrigger);

if (!isAuthorized) {
if (!displayTooltip) {
return (
<OsdsButton {...restProps} disabled onClick={null}>
{children}
</OsdsButton>
);
}
return (
<OsdsTooltip>
<OsdsButton {...restProps} disabled onClick={null}>
{children}
</OsdsButton>
<OsdsTooltipContent slot="tooltip-content">
<div>{t('common_iam_actions_message')}</div>
</OsdsTooltipContent>
</OsdsTooltip>
);
if (isAuthorized) {
return <OsdsButton {...restProps}>{children}</OsdsButton>;
}
return <OsdsButton {...restProps}>{children}</OsdsButton>;

return !displayTooltip ? (
<OsdsButton {...restProps} disabled onClick={null}>
{children}
</OsdsButton>
) : (
<OsdsTooltip>
<OsdsButton {...restProps} disabled onClick={null}>
{children}
</OsdsButton>
<OsdsTooltipContent slot="tooltip-content">
<div>{t('common_iam_actions_message')}</div>
</OsdsTooltipContent>
</OsdsTooltip>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jest.mock('../../hooks/iam');
const renderComponent = (props: ManagerTextProps) => {
return render(<ManagerText {...props} />);
};
const mockedHook = useAuthorizationIam as jest.Mock<IamAuthorizationResponse>;
const mockedHook =
useAuthorizationIam as unknown as jest.Mock<IamAuthorizationResponse>;

describe('ManagerText tests', () => {
afterEach(() => {
Expand All @@ -25,8 +26,7 @@ describe('ManagerText tests', () => {
isFetched: true,
});
renderComponent({
urn:
'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
urn: 'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
iamActions: [
'manager-react-components:apiovh:manager-react-components/get-display',
],
Expand All @@ -43,8 +43,7 @@ describe('ManagerText tests', () => {
isFetched: true,
});
renderComponent({
urn:
'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
urn: 'urn:v9:eu:resource:manager-react-components:vrz-a878-dsflkds-fdsfsd',
iamActions: [
'manager-react-components:apiovh:manager-react-components/get-display',
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pci_free_local_zones_banner_text": "Lassen Sie sich unser EinfΓΌhrungsangebot nicht entgehen: Alle Ihre Local Zones Dienste sind bis zum 31.Β August kostenlos!",
"pci_free_local_zones_banner_text_confirm": "Mit unserem EinfΓΌhrungsangebot fΓΌr Local Zones sind alle Ihre Local Zones Dienste bis zumΒ 31.Β August<b>Β </b>kostenlos!",
"pci_free_local_zones_banner_text": "Lassen Sie sich unser EinfΓΌhrungsangebot nicht entgehen: Alle Ihre Local Zones Dienste sind bis zum 31. August kostenlos!",
"pci_free_local_zones_banner_text_confirm": "Mit unserem EinfΓΌhrungsangebot fΓΌr Local Zones sind alle Ihre Local Zones Dienste bis zum 31. August<b> </b>kostenlos!",
"pci_free_local_zones_banner_link": "Mehr erfahren"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,30 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import './translations';

export const Clipboard: React.FC<OdsClipboardAttribute> = (props) => {
interface IClipboardAttibutes extends OdsClipboardAttribute {
'data-testid'?: string;
}

export const Clipboard: React.FC<IClipboardAttibutes> = ({
'data-testid': testId = 'clipboard',
...props
}) => {
const { t } = useTranslation('clipboard');

return (
<OsdsClipboard {...props} data-testid="clipboard">
<OsdsClipboard {...props} data-testid={testId}>
<span slot="success-message">
<OsdsText
color={ODS_THEME_COLOR_INTENT.success}
data-testid="clipboard-success"
data-testid={`${testId}-success`}
>
{t('clipboard_copy_success')}
</OsdsText>
</span>
<span slot="error-message">
<OsdsText
color={ODS_THEME_COLOR_INTENT.error}
data-testid="clipboard-error"
data-testid={`${testId}-error`}
>
{t('clipboard_copy_error')}
</OsdsText>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import { ODS_TEXT_LEVEL, ODS_TEXT_SIZE } from '@ovhcloud/ods-components';
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
import {
ODS_THEME_COLOR_INTENT,
ODS_THEME_COLOR_HUE,
} from '@ovhcloud/ods-common-theming';
import {
OsdsDivider,
OsdsText,
Expand All @@ -23,14 +26,15 @@ export const DashboardTile: React.FC<DashboardTileProps> = ({
title,
items,
}) => (
<OsdsTile className="w-full h-full flex-col" inline rounded>
<OsdsTile className="w-full flex-col" inline rounded>
<div className="flex flex-col w-full">
{title && (
<>
<OsdsText
size={ODS_TEXT_SIZE._400}
level={ODS_TEXT_LEVEL.heading}
color={ODS_THEME_COLOR_INTENT.text}
color={ODS_THEME_COLOR_INTENT.primary}
hue={ODS_THEME_COLOR_HUE._800}
>
{title}
</OsdsText>
Expand Down
Loading
Loading