From cd18fd07629f6dbf40822b53a7f254bc3e2cfc4b Mon Sep 17 00:00:00 2001
From: Aaysha <109507451+aayshasura@users.noreply.github.com>
Date: Wed, 15 Mar 2023 01:39:25 +0530
Subject: [PATCH] console: improving cloud onboarding for non-PG users
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8276
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 2d4d9f8d0b4d905e59be4b58586cb7968f217f62
---
.../components/NeonOnboarding.tsx | 22 ++++---
.../components/OnboardingAnimation.tsx | 4 +-
.../NeonConnectBanner/NeonBanner.tsx | 65 +++++++++++++++----
.../ConnectDBRedesign/SelectDatabase.tsx | 3 +-
.../SelectDatabase/SelectDatabase.tsx | 3 +-
5 files changed, 71 insertions(+), 26 deletions(-)
diff --git a/frontend/libs/console/legacy-ce/src/lib/features/CloudOnboarding/OnboardingWizard/components/ConnectDBScreen/components/NeonOnboarding.tsx b/frontend/libs/console/legacy-ce/src/lib/features/CloudOnboarding/OnboardingWizard/components/ConnectDBScreen/components/NeonOnboarding.tsx
index b38b63469c9..d96d4a866ba 100644
--- a/frontend/libs/console/legacy-ce/src/lib/features/CloudOnboarding/OnboardingWizard/components/ConnectDBScreen/components/NeonOnboarding.tsx
+++ b/frontend/libs/console/legacy-ce/src/lib/features/CloudOnboarding/OnboardingWizard/components/ConnectDBScreen/components/NeonOnboarding.tsx
@@ -78,10 +78,10 @@ export function NeonOnboarding(props: {
useEmitOnboardingEvents(neonIntegrationStatus, installingTemplate);
// allow skipping only when an action is not in-progress
- const allowSkipping =
- neonIntegrationStatus.status === 'idle' ||
- neonIntegrationStatus.status === 'authentication-error' ||
- neonIntegrationStatus.status === 'neon-database-creation-error';
+ const isActionInProgress =
+ neonIntegrationStatus.status !== 'idle' &&
+ neonIntegrationStatus.status !== 'authentication-error' &&
+ neonIntegrationStatus.status !== 'neon-database-creation-error';
const neonBannerProps = transformNeonIntegrationStatusToNeonBannerProps(
neonIntegrationStatus
@@ -95,17 +95,23 @@ export function NeonOnboarding(props: {
return (
@@ -43,19 +64,39 @@ export function NeonBanner(props: Props) {
-
- Need a new database? We've partnered with{' '}
-
- Neon
- {' '}
- to help you get started.
+
+
+ Need a new database? We've partnered with Neon to help you
+ get started with a free Postgres database.
+
+
diff --git a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/SelectDatabase.tsx b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/SelectDatabase.tsx
index 82dcf16a854..8a795b7de2b 100644
--- a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/SelectDatabase.tsx
+++ b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/SelectDatabase.tsx
@@ -1,4 +1,4 @@
-import { NeonBanner } from '../CloudOnboarding/OnboardingWizard/components/NeonConnectBanner/NeonBanner';
+import { NeonBanner } from '../../components/Services/Data/DataSources/CreateDataSource/Neon/components/Neon/NeonBanner';
import { DatabaseKind } from './types';
import { Button } from '../../new-components/Button';
import React from 'react';
@@ -34,7 +34,6 @@ export const SelectDatabase: React.VFC = () => {
}
status={{ status: 'default' }}
buttonText="Create a Neon Database"
- setStepperIndex={() => {}}
/>
)}
diff --git a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/SelectDatabase/SelectDatabase.tsx b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/SelectDatabase/SelectDatabase.tsx
index c11d42e5b2b..904aec9a107 100644
--- a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/SelectDatabase/SelectDatabase.tsx
+++ b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/SelectDatabase/SelectDatabase.tsx
@@ -1,4 +1,4 @@
-import { NeonBanner } from '../../../CloudOnboarding/OnboardingWizard/components/NeonConnectBanner/NeonBanner';
+import { NeonBanner } from '../../../../components/Services/Data/DataSources/CreateDataSource/Neon/components/Neon/NeonBanner';
import Globals from '../../../../Globals';
import { Button } from '../../../../new-components/Button';
import React from 'react';
@@ -60,7 +60,6 @@ export const SelectDatabase = ({
}
status={{ status: 'default' }}
buttonText="Create a Neon Database"
- setStepperIndex={() => {}}
/>
)}