From 90546ddaf01755172f386f46e1ed099313c756ec Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:10:49 +0000 Subject: [PATCH 01/23] deprecated: alert - transfer project (#31258) change to admonition Co-authored-by: Terry Sutton --- .../TransferProjectButton.tsx | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx index 436949a037f..393ff0948c1 100644 --- a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx +++ b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx @@ -11,7 +11,8 @@ import { useProjectTransferPreviewQuery } from 'data/projects/project-transfer-p import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProject } from 'hooks/misc/useSelectedProject' import { useFlag } from 'hooks/ui/useFlag' -import { Alert, Button, InfoIcon, Listbox, Loading, Modal } from 'ui' +import { Button, InfoIcon, Listbox, Loading, Modal } from 'ui' +import { Admonition } from 'ui-patterns' const TransferProjectButton = () => { const project = useSelectedProject() @@ -206,21 +207,16 @@ const TransferProjectButton = () => {
{transferPreviewData && transferPreviewData.warnings.length > 0 && ( - +
{transferPreviewData.warnings.map((warning) => (

{warning.message}

))}
-
+ )} {transferPreviewData && transferPreviewData.errors.length > 0 && ( - +
{transferPreviewData.errors.map((error) => (

{error.message}

@@ -248,17 +244,29 @@ const TransferProjectButton = () => {

)} -
+ )} {transferPreviewError && !transferError && ( - -

{transferPreviewError.message}

-
+ +

{transferPreviewError.message}

+ + } + /> )} {transferError && ( - -

{transferError.message}

-
+ +

{transferError.message}

+ + } + /> )}
From 89b3b91341c76abe84e9c3d96c0e3e663674b3a0 Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:09:30 +0000 Subject: [PATCH 02/23] deprecated: alert - ip restriction removal (#31257) * switch to admonition * removed deprecated closable prop --- .../NetworkRestrictions/RemoveRestrictionModal.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx index 46ad3225e8e..67bec6cbe47 100644 --- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx +++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx @@ -1,9 +1,10 @@ import { useParams } from 'common' import { toast } from 'sonner' -import { Alert, Button, Modal } from 'ui' +import { Button, Modal } from 'ui' import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query' import { useNetworkRestrictionsApplyMutation } from 'data/network-restrictions/network-retrictions-apply-mutation' +import { Admonition } from 'ui-patterns' interface RemoveRestrictionModalProps { visible: boolean @@ -59,7 +60,6 @@ const RemoveRestrictionModal = ({ return ( {isRemovingOnlyRestriction && ( - - Removing all network restrictions will default to your database being accessible from - all IP addresses. - + )} From 5935c2f3564a1a459e3173fd677c38c255f60f5e Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:37:58 +0000 Subject: [PATCH 03/23] deprecated: alert - jwt settings (#31145) changed to admonition --- .../components/interfaces/Settings/API/JWTSettings.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/API/JWTSettings.tsx b/apps/studio/components/interfaces/Settings/API/JWTSettings.tsx index b270feccc1d..e73f464d5f7 100644 --- a/apps/studio/components/interfaces/Settings/API/JWTSettings.tsx +++ b/apps/studio/components/interfaces/Settings/API/JWTSettings.tsx @@ -26,7 +26,6 @@ import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-co import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { uuidv4 } from 'lib/helpers' import { - Alert, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, @@ -45,6 +44,7 @@ import { JWT_SECRET_UPDATE_ERROR_MESSAGES, JWT_SECRET_UPDATE_PROGRESS_MESSAGES, } from './API.constants' +import { Admonition } from 'ui-patterns' const JWTSettings = () => { const { ref: projectRef } = useParams() @@ -192,12 +192,12 @@ const JWTSettings = () => { )} {isJwtSecretUpdateFailed ? ( - + Please try again. If the failures persist, please contact Supabase support with the following details:
Change tracking ID: {data?.changeTrackingId}
Error message: {jwtSecretUpdateErrorMessage} -
+
) : null} From 0b52e1038f20b7c8ba7990a084774a1d93d39521 Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:51:37 +0000 Subject: [PATCH 04/23] deprecated: alert - ipv4 settings (#31144) * change to use admonition * removed unused import --- .../Settings/Addons/IPv4SidePanel.tsx | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx b/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx index 252cabdfd02..5958fdb3060 100644 --- a/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx +++ b/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx @@ -13,8 +13,9 @@ import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' import { formatCurrency } from 'lib/helpers' import { useAddonsPagePanel } from 'state/addons-page' -import { Alert, AlertDescription_Shadcn_, Alert_Shadcn_, Button, Radio, SidePanel, cn } from 'ui' -import { ExternalLink, AlertTriangle } from 'lucide-react' +import { Button, Radio, SidePanel, cn } from 'ui' +import { ExternalLink } from 'lucide-react' +import { Admonition } from 'ui-patterns' const IPv4SidePanel = () => { const { ref: projectRef } = useParams() @@ -187,10 +188,12 @@ const IPv4SidePanel = () => { {hasChanges && ( <> - - There might be some downtime when enabling the add-on since some DNS clients might - have cached the old DNS entry. Generally, this should be less than a minute. - + {selectedOption !== 'ipv4_none' && (

By default, this is only applied to the Primary database for your project. If{' '} @@ -216,20 +219,14 @@ const IPv4SidePanel = () => { )} {isFreePlan && ( - - - View available plans - - - } - > - Upgrade your plan to enable a IPv4 address for your project - + +

Upgrade your plan to enable a IPv4 address for your project

+ +
)} From ccc2adb6a339063eeaf3ed9dc006afc4311f5023 Mon Sep 17 00:00:00 2001 From: hallidayo <22655069+Hallidayo@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:57:48 +0000 Subject: [PATCH 05/23] deprecated: alert - revoke app modal (#31143) switch to admonition --- .../Organization/OAuthApps/RevokeAppModal.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/RevokeAppModal.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/RevokeAppModal.tsx index ab655d88edd..8913dabe0d7 100644 --- a/apps/studio/components/interfaces/Organization/OAuthApps/RevokeAppModal.tsx +++ b/apps/studio/components/interfaces/Organization/OAuthApps/RevokeAppModal.tsx @@ -1,10 +1,11 @@ import { useParams } from 'common' import { Lock } from 'lucide-react' import { toast } from 'sonner' -import { Alert, Modal } from 'ui' +import { Modal } from 'ui' import { useAuthorizedAppRevokeMutation } from 'data/oauth/authorized-app-revoke-mutation' import type { AuthorizedApp } from 'data/oauth/authorized-apps-query' +import { Admonition } from 'ui-patterns' export interface RevokeAppModalProps { selectedApp?: AuthorizedApp @@ -37,10 +38,12 @@ const RevokeAppModal = ({ selectedApp, onClose }: RevokeAppModalProps) => { onConfirm={onConfirmDelete} > - - {selectedApp?.name} application will no longer have access to your organization's settings - and projects. - +