From fb1cf3eb0206d7df64a86a0c387f0e71053c3cbe Mon Sep 17 00:00:00 2001 From: carlosmonastyrski Date: Fri, 6 Jun 2025 18:30:53 -0300 Subject: [PATCH] feat(PIT-revamp): minor UI improvements on snapshots deprecation messages --- .../components/PitDrawer/PitDrawer.tsx | 15 +++++ .../components/SnapshotView/SnapshotView.tsx | 66 ++++++++++--------- .../SecretSnapshotsLegacySection.tsx | 2 +- 3 files changed, 50 insertions(+), 33 deletions(-) diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/PitDrawer/PitDrawer.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/PitDrawer/PitDrawer.tsx index 37a1188ff..c3d2bbf66 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/PitDrawer/PitDrawer.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/PitDrawer/PitDrawer.tsx @@ -3,6 +3,7 @@ import { InfiniteData } from "@tanstack/react-query"; import { formatDistance } from "date-fns"; import { Button, Drawer, DrawerContent } from "@app/components/v2"; +import { NoticeBannerV2 } from "@app/components/v2/NoticeBannerV2/NoticeBannerV2"; import { TSecretSnapshot } from "@app/hooks/api/secretSnapshots/types"; type Props = { @@ -39,6 +40,20 @@ export const PitDrawer = ({ subTitle="Note: This will recover secrets for all environments in this project" >
+ +

+ Snapshots are being deprecated in favor of{" "} + + Commits + + . This feature will be officially removed in November 2025. +

+
{secretSnaphots?.pages?.map((group, i) => ( {group.map(({ id, createdAt }, index) => ( diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SnapshotView/SnapshotView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SnapshotView/SnapshotView.tsx index aefb18736..7e7a5f8c8 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SnapshotView/SnapshotView.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SnapshotView/SnapshotView.tsx @@ -5,14 +5,14 @@ import { faCodeCommit, faFolder, faMagnifyingGlass, - faUndo, - faWarning + faUndo } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { createNotification } from "@app/components/notifications"; import { ProjectPermissionCan } from "@app/components/permissions"; import { Button, ContentLoader, Input, Tag, Tooltip } from "@app/components/v2"; +import { NoticeBannerV2 } from "@app/components/v2/NoticeBannerV2/NoticeBannerV2"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; import { useGetSnapshotSecrets, usePerformSecretRollback } from "@app/hooks/api"; import { SecretV3RawSanitized, TSecretFolder } from "@app/hooks/api/types"; @@ -155,20 +155,24 @@ export const SnapshotView = ({ return ( <> -
- -
- Deprecation Notice -

- Snapshots are being deprecated in favor of Commits. They will be officially removed on - November 2025. -

-
-
Snapshot
{new Date(snapshotData?.createdAt || "").toLocaleString()}
+ +

+ Snapshots are being deprecated in favor of{" "} + + Commits + + . This feature will be officially removed in November 2025. +

+
- {isAllowedRollback && ( -
- - {(isAllowed) => ( - - )} - -
- )} +
+ + {(isAllowed) => ( + + )} + +
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/SecretSnapshotsLegacySection/SecretSnapshotsLegacySection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/SecretSnapshotsLegacySection/SecretSnapshotsLegacySection.tsx index 6bd5d76b6..5a2cda664 100644 --- a/frontend/src/pages/secret-manager/SettingsPage/components/SecretSnapshotsLegacySection/SecretSnapshotsLegacySection.tsx +++ b/frontend/src/pages/secret-manager/SettingsPage/components/SecretSnapshotsLegacySection/SecretSnapshotsLegacySection.tsx @@ -43,7 +43,7 @@ export const SecretSnapshotsLegacySection = () => { return (
-

Show Secret Snapshots Legacy

+

Show Secret Snapshots ( legacy )

{(isAllowed) => (