From b18697bb22ad6e94804bc07064e18f8a78ceab27 Mon Sep 17 00:00:00 2001 From: Keith Chong Date: Tue, 7 Apr 2026 17:05:53 -0400 Subject: [PATCH] Use Tech Preview Badge with Tooltip (#9219) Signed-off-by: Keith Chong --- locales/en/plugin__gitops-plugin.json | 3 +++ locales/ja/plugin__gitops-plugin.json | 3 +++ locales/ko/plugin__gitops-plugin.json | 3 +++ locales/zh/plugin__gitops-plugin.json | 3 +++ .../import/badges/TechPreviewBadge.tsx | 16 ++++++++++++---- .../sidebar/DeploymentSideBarDetails.tsx | 6 ++++-- .../topology/sidebar/resource-sections.tsx | 7 +++++-- src/gitops/components/project/ProjectList.tsx | 10 ++++++++-- src/gitops/components/rollout/RolloutList.tsx | 10 ++++++++-- src/gitops/components/shared/ApplicationList.tsx | 10 ++++++++-- .../components/shared/ApplicationSetList.tsx | 10 ++++++++-- .../DetailsPageHeader/DetailsPageHeader.tsx | 8 ++++++-- 12 files changed, 71 insertions(+), 18 deletions(-) diff --git a/locales/en/plugin__gitops-plugin.json b/locales/en/plugin__gitops-plugin.json index 419ad090a..2e1090283 100644 --- a/locales/en/plugin__gitops-plugin.json +++ b/locales/en/plugin__gitops-plugin.json @@ -48,6 +48,7 @@ "by name": "by name", "ConsoleLink": "ConsoleLink", "ConsoleLinks": "ConsoleLinks", + "Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview", "No GitOps manifest URLs found": "No GitOps manifest URLs found", "Error cannot retrieve applications": "Cannot retrieve applications. Ensure the Argo CD applications are available and check the log for the 'cluster' pod created by the GitOps Operator.", "No Application groups found": "No Application groups found", @@ -213,6 +214,7 @@ "Unable to load data": "Unable to load data", "There was an error retrieving App Projects. Check your connection and reload the page.": "There was an error retrieving App Projects. Check your connection and reload the page.", "AppProjects": "ArgoCD AppProjects", + "This list page is under tech preview, but not necessarily the resources it represents": "This list page is under tech preview, but not necessarily the resources it represents", "Create AppProject": "Create AppProject", "Search by name...": "Search by name...", "Labels": "Labels", @@ -335,6 +337,7 @@ "Created at": "Created at", "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.": "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.", "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.": "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.", + "This details page is under tech preview, but not necessarily the resource it represents": "This details page is under tech preview, but not necessarily the resource it represents", "Sync": "Sync", "Stop": "Stop", "Refresh": "Refresh", diff --git a/locales/ja/plugin__gitops-plugin.json b/locales/ja/plugin__gitops-plugin.json index 98c5f74fe..ba4a09539 100644 --- a/locales/ja/plugin__gitops-plugin.json +++ b/locales/ja/plugin__gitops-plugin.json @@ -48,6 +48,7 @@ "by name": "名前別", "ConsoleLink": "ConsoleLink", "ConsoleLinks": "ConsoleLinks", + "Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview", "No GitOps manifest URLs found": "GitOps マニフェスト URL が見つかりません", "Error cannot retrieve applications": "エラー、アプリケーションを取得できません", "No Application groups found": "アプリケーショングループが見つかりません", @@ -213,6 +214,7 @@ "Unable to load data": "Unable to load data", "There was an error retrieving App Projects. Check your connection and reload the page.": "There was an error retrieving App Projects. Check your connection and reload the page.", "AppProjects": "AppProjects", + "This list page is under tech preview, but not necessarily the resources it represents": "This list page is under tech preview, but not necessarily the resources it represents", "Create AppProject": "Create AppProject", "Search by name...": "Search by name...", "Labels": "Labels", @@ -335,6 +337,7 @@ "Created at": "Created at", "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.": "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.", "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.": "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.", + "This details page is under tech preview, but not necessarily the resource it represents": "This details page is under tech preview, but not necessarily the resource it represents", "Sync": "Sync", "Stop": "Stop", "Refresh": "Refresh", diff --git a/locales/ko/plugin__gitops-plugin.json b/locales/ko/plugin__gitops-plugin.json index 531b2afb3..b9a275972 100644 --- a/locales/ko/plugin__gitops-plugin.json +++ b/locales/ko/plugin__gitops-plugin.json @@ -48,6 +48,7 @@ "by name": "이름 별", "ConsoleLink": "콘솔 링크", "ConsoleLinks": "콘솔 링크", + "Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview", "No GitOps manifest URLs found": "GitOps 매니페스트 URL을 찾을 수 없습니다", "Error cannot retrieve applications": "오류로 인해 애플리케이션을 검색할 수 없습니다", "No Application groups found": "애플리케이션 그룹을 찾을 수 없습니다", @@ -213,6 +214,7 @@ "Unable to load data": "Unable to load data", "There was an error retrieving App Projects. Check your connection and reload the page.": "There was an error retrieving App Projects. Check your connection and reload the page.", "AppProjects": "AppProjects", + "This list page is under tech preview, but not necessarily the resources it represents": "This list page is under tech preview, but not necessarily the resources it represents", "Create AppProject": "Create AppProject", "Search by name...": "Search by name...", "Labels": "Labels", @@ -335,6 +337,7 @@ "Created at": "Created at", "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.": "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.", "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.": "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.", + "This details page is under tech preview, but not necessarily the resource it represents": "This details page is under tech preview, but not necessarily the resource it represents", "Sync": "Sync", "Stop": "Stop", "Refresh": "Refresh", diff --git a/locales/zh/plugin__gitops-plugin.json b/locales/zh/plugin__gitops-plugin.json index 6ad69a2e7..1d8b344a1 100644 --- a/locales/zh/plugin__gitops-plugin.json +++ b/locales/zh/plugin__gitops-plugin.json @@ -48,6 +48,7 @@ "by name": "按名称", "ConsoleLink": "控制台链接", "ConsoleLinks": "控制台链接", + "Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview", "No GitOps manifest URLs found": "未找到 GitOps 清单 URL", "Error cannot retrieve applications": "错误,无法检索应用程序", "No Application groups found": "未找到应用程序组", @@ -213,6 +214,7 @@ "Unable to load data": "Unable to load data", "There was an error retrieving App Projects. Check your connection and reload the page.": "There was an error retrieving App Projects. Check your connection and reload the page.", "AppProjects": "AppProjects", + "This list page is under tech preview, but not necessarily the resources it represents": "This list page is under tech preview, but not necessarily the resources it represents", "Create AppProject": "Create AppProject", "Search by name...": "Search by name...", "Labels": "Labels", @@ -335,6 +337,7 @@ "Created at": "Created at", "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.": "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.", "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.": "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.", + "This details page is under tech preview, but not necessarily the resource it represents": "This details page is under tech preview, but not necessarily the resource it represents", "Sync": "Sync", "Stop": "Stop", "Refresh": "Refresh", diff --git a/src/components/import/badges/TechPreviewBadge.tsx b/src/components/import/badges/TechPreviewBadge.tsx index ef1e3f3c7..ee406eb59 100644 --- a/src/components/import/badges/TechPreviewBadge.tsx +++ b/src/components/import/badges/TechPreviewBadge.tsx @@ -1,12 +1,11 @@ import * as React from 'react'; -import { useTranslation } from 'react-i18next'; +import { TFunction, useTranslation } from 'react-i18next'; -import { Label } from '@patternfly/react-core'; +import { Label, Tooltip } from '@patternfly/react-core'; import './Badge.scss'; -const TechPreviewBadge: React.FC = () => { - const { t } = useTranslation('plugin__gitops-plugin'); +const getBadgeLabel = (t: TFunction) => { return (