From 45c2f20dd431385ef03ec39edf38e61fe61ffd86 Mon Sep 17 00:00:00 2001 From: Edmundo Ruiz Ghanem <168664+edmundito@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:00:00 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=9F=20=F0=9F=A7=B9=20Reorganize=20conn?= =?UTF-8?q?ections=20pages=20(#20845)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reorganize connection pages Flatten structure Simplify names * Consolidate all the Connection routes to a single file * Extract job types and utilities to own files within JobItem Move JobsWithJobs to JobItem/utils * Move ConnectionName component to components/connection * Move StatusMainInfo components and rename to components/connection/ConnectionInfoCard * Move ConnectionBlock to components/connection * Clean up ConnectionPage structure * Update style import in ConnectionInfoCard test * Clean up ConnectionRoutePaths enum * Apply suggestions from code review - Update export default style Co-authored-by: Krishna (kc) Glick * Update ConnectionInfoCard test description name * Update test snapshots Co-authored-by: Krishna (kc) Glick --- .../src/components/ConnectionBlock/index.tsx | 3 - .../CreateConnectionForm.test.tsx.snap | 13 ++- .../components/ConnectionSettingsCell.tsx | 7 +- .../src/components/JobItem/JobItem.tsx | 21 ++--- .../components/JobItem/components/JobLogs.tsx | 2 +- .../JobItem/components/MainInfo.tsx | 4 +- .../src/components/JobItem/index.ts | 1 + .../src/components/JobItem/types.ts | 5 ++ .../src/components/JobItem/utils.ts | 22 ++++- .../ConnectionBlock.module.scss | 2 +- .../ConnectionBlock/ConnectionBlock.tsx | 4 +- .../ConnectionBlock/ConnectionBlockItem.tsx | 0 .../connection/ConnectionBlock/index.ts | 1 + .../ConnectionInfoCard.module.scss} | 0 .../ConnectionInfoCard.test.tsx} | 32 +++---- .../ConnectionInfoCard.tsx} | 10 +-- .../EnabledControl.module.scss | 0 .../ConnectionInfoCard}/EnabledControl.tsx | 0 .../SchemaChangesDetected.module.scss | 0 .../SchemaChangesDetected.test.tsx | 0 .../SchemaChangesDetected.tsx | 6 +- .../connection/ConnectionInfoCard/index.ts | 1 + .../ConnectionName.module.scss | 4 +- .../ConnectionName}/ConnectionName.tsx | 0 .../connection/ConnectionName/index.ts | 1 + .../connection/JobProgress/JobProgress.tsx | 4 +- .../src/packages/cloud/cloudRoutes.tsx | 8 +- .../pages/ConnectionPage/ConnectionPage.tsx | 30 ------- .../pages/AllConnectionsPage/index.tsx | 3 - .../ConnectionItemPage/ConnectionItemPage.tsx | 74 ---------------- .../ConnectionSettingsRoutes.tsx | 6 -- .../pages/CreationFormPage/index.tsx | 3 - .../src/pages/SourcesPage/SourcesPage.tsx | 4 +- .../AllConnectionsPage.module.scss | 0 .../AllConnectionsPage/AllConnectionsPage.tsx | 8 +- .../AllConnectionsPage}/ConnectionsTable.tsx | 0 .../connections/AllConnectionsPage/index.ts | 3 + .../ConnectionPage/ConnectionPage.tsx | 54 ++++++++++++ .../ConnectionPageTitle.module.scss | 0 .../ConnectionPage}/ConnectionPageTitle.tsx | 22 ++--- .../ConnectionPage/index.ts} | 0 .../ConnectionReplicationPage.module.scss} | 0 .../ConnectionReplicationPage.test.tsx} | 8 +- .../ConnectionReplicationPage.tsx} | 4 +- .../ResetWarningModal.tsx | 0 .../ConnectionReplicationPage.test.tsx.snap} | 15 ++-- .../ConnectionReplicationPage/index.ts | 1 + .../ConnectionSettingsPage.module.scss} | 0 .../ConnectionSettingsPage.test.tsx} | 8 +- .../ConnectionSettingsPage.tsx} | 13 ++- .../SchemaUpdateNotifications.module.scss | 0 .../SchemaUpdateNotifications.tsx | 0 .../ConnectionSettingsPage}/StateBlock.tsx | 0 .../ConnectionSettingsPage/index.ts | 1 + .../ConnectionStatusPage.module.scss} | 0 .../ConnectionStatusPage.tsx} | 4 +- .../ConnectionStatusPage}/JobsList.tsx | 5 +- .../connections/ConnectionStatusPage/index.ts | 1 + .../ConnectionTransformationPage.module.scss} | 0 .../ConnectionTransformationPage.tsx} | 80 ++---------------- .../CustomTransformationsCard.tsx | 50 +++++++++++ .../DbtCloudTransformationsCard.module.scss | 0 .../DbtCloudTransformationsCard.tsx | 0 .../NormalizationCard.tsx | 37 ++++++++ .../dbt-bit_tm.svg | 0 .../ConnectionTransformationPage/index.ts | 1 + .../octavia-worker.png | Bin .../pages/connections/ConnectionsRoutes.tsx | 33 ++++++++ .../ConnectionCreateDestinationForm.tsx | 0 .../ConnectionCreateSourceForm.tsx | 0 .../CreateConnectionPage.tsx} | 6 +- .../ExistingEntityForm.module.scss | 0 .../ExistingEntityForm.tsx | 0 .../connections/CreateConnectionPage/index.ts | 1 + airbyte-webapp/src/pages/connections/types.ts | 7 ++ airbyte-webapp/src/pages/routes.tsx | 8 +- 76 files changed, 336 insertions(+), 305 deletions(-) delete mode 100644 airbyte-webapp/src/components/ConnectionBlock/index.tsx create mode 100644 airbyte-webapp/src/components/JobItem/index.ts create mode 100644 airbyte-webapp/src/components/JobItem/types.ts rename airbyte-webapp/src/components/{ => connection}/ConnectionBlock/ConnectionBlock.module.scss (91%) rename airbyte-webapp/src/components/{ => connection}/ConnectionBlock/ConnectionBlock.tsx (90%) rename airbyte-webapp/src/components/{ => connection}/ConnectionBlock/ConnectionBlockItem.tsx (100%) create mode 100644 airbyte-webapp/src/components/connection/ConnectionBlock/index.ts rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage/StatusMainInfo.module.scss => components/connection/ConnectionInfoCard/ConnectionInfoCard.module.scss} (100%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage/StatusMainInfo.test.tsx => components/connection/ConnectionInfoCard/ConnectionInfoCard.test.tsx} (72%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage/StatusMainInfo.tsx => components/connection/ConnectionInfoCard/ConnectionInfoCard.tsx} (91%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionInfoCard}/EnabledControl.module.scss (100%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionInfoCard}/EnabledControl.tsx (100%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionInfoCard}/SchemaChangesDetected.module.scss (100%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionInfoCard}/SchemaChangesDetected.test.tsx (100%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionInfoCard}/SchemaChangesDetected.tsx (90%) create mode 100644 airbyte-webapp/src/components/connection/ConnectionInfoCard/index.ts rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionName}/ConnectionName.module.scss (95%) rename airbyte-webapp/src/{pages/ConnectionPage/pages/ConnectionItemPage => components/connection/ConnectionName}/ConnectionName.tsx (100%) create mode 100644 airbyte-webapp/src/components/connection/ConnectionName/index.ts delete mode 100644 airbyte-webapp/src/pages/ConnectionPage/ConnectionPage.tsx delete mode 100644 airbyte-webapp/src/pages/ConnectionPage/pages/AllConnectionsPage/index.tsx delete mode 100644 airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionItemPage.tsx delete mode 100644 airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionSettingsRoutes.tsx delete mode 100644 airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/index.tsx rename airbyte-webapp/src/pages/{ConnectionPage/pages => connections}/AllConnectionsPage/AllConnectionsPage.module.scss (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages => connections}/AllConnectionsPage/AllConnectionsPage.tsx (90%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/AllConnectionsPage/components => connections/AllConnectionsPage}/ConnectionsTable.tsx (100%) create mode 100644 airbyte-webapp/src/pages/connections/AllConnectionsPage/index.ts create mode 100644 airbyte-webapp/src/pages/connections/ConnectionPage/ConnectionPage.tsx rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionPage}/ConnectionPageTitle.module.scss (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionPage}/ConnectionPageTitle.tsx (76%) rename airbyte-webapp/src/pages/{ConnectionPage/index.tsx => connections/ConnectionPage/index.ts} (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionReplicationTab.module.scss => connections/ConnectionReplicationPage/ConnectionReplicationPage.module.scss} (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionReplicationTab.test.tsx => connections/ConnectionReplicationPage/ConnectionReplicationPage.test.tsx} (96%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionReplicationTab.tsx => connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx} (98%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionReplicationPage}/ResetWarningModal.tsx (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/__snapshots__/ConnectionReplicationTab.test.tsx.snap => connections/ConnectionReplicationPage/__snapshots__/ConnectionReplicationPage.test.tsx.snap} (98%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionReplicationPage/index.ts rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionSettingsTab.module.scss => connections/ConnectionSettingsPage/ConnectionSettingsPage.module.scss} (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionSettingsTab.test.tsx => connections/ConnectionSettingsPage/ConnectionSettingsPage.test.tsx} (85%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionSettingsTab.tsx => connections/ConnectionSettingsPage/ConnectionSettingsPage.tsx} (74%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionSettingsPage}/SchemaUpdateNotifications.module.scss (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionSettingsPage}/SchemaUpdateNotifications.tsx (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionSettingsPage}/StateBlock.tsx (100%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionSettingsPage/index.ts rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionStatusTab.module.scss => connections/ConnectionStatusPage/ConnectionStatusPage.module.scss} (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionStatusTab.tsx => connections/ConnectionStatusPage/ConnectionStatusPage.tsx} (98%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage => connections/ConnectionStatusPage}/JobsList.tsx (78%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionStatusPage/index.ts rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab.module.scss => connections/ConnectionTransformationPage/ConnectionTransformationPage.module.scss} (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab.tsx => connections/ConnectionTransformationPage/ConnectionTransformationPage.tsx} (60%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionTransformationPage/CustomTransformationsCard.tsx rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab => connections/ConnectionTransformationPage}/DbtCloudTransformationsCard.module.scss (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab => connections/ConnectionTransformationPage}/DbtCloudTransformationsCard.tsx (100%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionTransformationPage/NormalizationCard.tsx rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab => connections/ConnectionTransformationPage}/dbt-bit_tm.svg (100%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionTransformationPage/index.ts rename airbyte-webapp/src/pages/{ConnectionPage/pages/ConnectionItemPage/ConnectionTransformationTab => connections/ConnectionTransformationPage}/octavia-worker.png (100%) create mode 100644 airbyte-webapp/src/pages/connections/ConnectionsRoutes.tsx rename airbyte-webapp/src/pages/{ConnectionPage/pages/CreationFormPage => connections/CreateConnectionPage}/ConnectionCreateDestinationForm.tsx (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/CreationFormPage => connections/CreateConnectionPage}/ConnectionCreateSourceForm.tsx (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx => connections/CreateConnectionPage/CreateConnectionPage.tsx} (98%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/CreationFormPage => connections/CreateConnectionPage}/ExistingEntityForm.module.scss (100%) rename airbyte-webapp/src/pages/{ConnectionPage/pages/CreationFormPage => connections/CreateConnectionPage}/ExistingEntityForm.tsx (100%) create mode 100644 airbyte-webapp/src/pages/connections/CreateConnectionPage/index.ts create mode 100644 airbyte-webapp/src/pages/connections/types.ts diff --git a/airbyte-webapp/src/components/ConnectionBlock/index.tsx b/airbyte-webapp/src/components/ConnectionBlock/index.tsx deleted file mode 100644 index bcff58df95d7..000000000000 --- a/airbyte-webapp/src/components/ConnectionBlock/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import ConnectionBlock from "./ConnectionBlock"; - -export default ConnectionBlock; diff --git a/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap b/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap index 8d474ad58224..e2cc8aef5734 100644 --- a/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap +++ b/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap @@ -32,7 +32,7 @@ exports[`CreateConnectionForm should render 1`] = `