-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: master to develop
- Loading branch information
Showing
275 changed files
with
3,348 additions
and
987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...anager-react-components/src/components/navigation/menus/changelog/changelog.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import { ODS_BUTTON_SIZE, ODS_BUTTON_VARIANT } from '@ovhcloud/ods-components'; | ||
import { OdsPopover, OdsButton } from '@ovhcloud/ods-components/react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { useOvhTracking } from '@ovh-ux/manager-react-shell-client'; | ||
import { Links, LinkType } from '../../../typography'; | ||
import '../translations/translation'; | ||
|
||
export interface ChangelogLinks { | ||
changelog: string; | ||
roadmap: string; | ||
'feature-request': string; | ||
} | ||
|
||
export interface ChangelogButtonProps { | ||
links: ChangelogLinks; | ||
chapters?: string[]; | ||
} | ||
|
||
export const CHANGELOG_PREFIXES = ['tile-changelog-roadmap', 'external-link']; | ||
const GO_TO = (link: string) => `go-to-${link}`; | ||
|
||
export const ChangelogButton: React.FC<ChangelogButtonProps> = ({ | ||
links, | ||
chapters = [], | ||
}) => { | ||
const { t } = useTranslation('buttons'); | ||
const { trackClick } = useOvhTracking(); | ||
return ( | ||
<> | ||
<div id="navigation-menu-changelog-trigger"> | ||
<OdsButton | ||
slot="menu-title" | ||
variant={ODS_BUTTON_VARIANT.ghost} | ||
size={ODS_BUTTON_SIZE.sm} | ||
label={t('mrc_changelog_header')} | ||
className="whitespace-nowrap" | ||
></OdsButton> | ||
</div> | ||
|
||
<OdsPopover | ||
triggerId="navigation-menu-changelog-trigger" | ||
with-arrow="true" | ||
> | ||
{Object.entries(links).map(([key, value]) => ( | ||
<div key={key}> | ||
<Links | ||
href={value} | ||
target="_blank" | ||
type={LinkType.external} | ||
rel={LinkType.external} | ||
label={t(`mrc_changelog_${key}`)} | ||
onClickReturn={() => | ||
trackClick({ | ||
actionType: 'navigation', | ||
actions: [...chapters, ...CHANGELOG_PREFIXES, GO_TO(key)], | ||
}) | ||
} | ||
/> | ||
</div> | ||
))} | ||
</OdsPopover> | ||
</> | ||
); | ||
}; | ||
|
||
export default ChangelogButton; |
32 changes: 32 additions & 0 deletions
32
.../manager-react-components/src/components/navigation/menus/changelog/changelog.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import { Meta } from '@storybook/react'; | ||
import { | ||
ChangelogButton, | ||
ChangelogLinks, | ||
ChangelogButtonProps, | ||
} from './changelog.component'; | ||
|
||
const changelogChapters: string[] = ['baremetal', 'server', 'dedicated']; | ||
const changelogLinks: ChangelogLinks = { | ||
roadmap: | ||
'https://github.com/orgs/ovh/projects/16/views/1?pane=info&sliceBy%5Bvalue%5D=Baremetal', | ||
changelog: | ||
'https://github.com/orgs/ovh/projects/16/views/1?pane=info&sliceBy%5Bvalue%5D=Baremetal', | ||
'feature-request': | ||
'https://github.com/orgs/ovh/projects/16/views/1?pane=info&sliceBy%5Bvalue%5D=Baremetal', | ||
}; | ||
|
||
export const changelogButton: ChangelogButtonProps = { | ||
links: changelogLinks, | ||
chapters: changelogChapters, | ||
}; | ||
|
||
const meta: Meta<ChangelogButtonProps> = { | ||
title: 'Navigation/Menus', | ||
decorators: [(story) => <div>{story()}</div>], | ||
component: ChangelogButton, | ||
argTypes: {}, | ||
args: changelogButton, | ||
}; | ||
|
||
export default meta; |
1 change: 1 addition & 0 deletions
1
packages/manager-react-components/src/components/navigation/menus/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './action/action.component'; | ||
export * from './guide/guide.component'; | ||
export * from './changelog/changelog.component'; |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_de_DE.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Aktionen", | ||
"user_account_guides_header": "Anleitungen" | ||
"user_account_guides_header": "Anleitungen", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature Request" | ||
} |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_en_GB.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Actions", | ||
"user_account_guides_header": "Guides" | ||
"user_account_guides_header": "Guides", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature request" | ||
} |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_es_ES.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Acciones", | ||
"user_account_guides_header": "Guías" | ||
"user_account_guides_header": "Guías", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature request" | ||
} |
9 changes: 8 additions & 1 deletion
9
...manager-react-components/src/components/navigation/menus/translations/Messages_fr_CA.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
{ "common_actions": "Actions", "user_account_guides_header": "Guides" } | ||
{ | ||
"common_actions": "Actions", | ||
"user_account_guides_header": "Guides", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature request" | ||
} |
9 changes: 8 additions & 1 deletion
9
...manager-react-components/src/components/navigation/menus/translations/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
{ "common_actions": "Actions", "user_account_guides_header": "Guides" } | ||
{ | ||
"common_actions": "Actions", | ||
"user_account_guides_header": "Guides", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature request" | ||
} |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_it_IT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Azioni", | ||
"user_account_guides_header": "Guide" | ||
"user_account_guides_header": "Guide", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature Request" | ||
} |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_pl_PL.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Operacje", | ||
"user_account_guides_header": "Przewodniki" | ||
"user_account_guides_header": "Przewodniki", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmapa", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Propozycja wdrożenia nowej funkcji" | ||
} |
6 changes: 5 additions & 1 deletion
6
...manager-react-components/src/components/navigation/menus/translations/Messages_pt_PT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"common_actions": "Ações", | ||
"user_account_guides_header": "Manuais" | ||
"user_account_guides_header": "Manuais", | ||
"mrc_changelog_header": "Roadmap & Changelog", | ||
"mrc_changelog_roadmap": "Roadmap", | ||
"mrc_changelog_changelog": "Changelog", | ||
"mrc_changelog_feature-request": "Feature request" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...manager/apps/dedicated/client/app/components/dedicated-cloud/dedicatedCloud.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.