Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(VSCode): Refactor KaotoEditor structure #1386

Merged

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Sep 4, 2024

Context

Currently, the DesignPage component is duplicated to serve the multiplying architecture and the webapp.

In addition to that, for the multiplying architecture, we're using a React render approach to navigate between different tabs, whereas in the web app we use a Router.

This commit removes the Tabs folder and uses the DesignPage component directly to reduce the duplication.

In addition to that, a Router has been introduced to navigate between the tabs, this is a cleanup for the upcoming tasks.

@lordrip lordrip requested a review from apupier September 4, 2024 23:12
{
path: Links.PipeErrorHandler,
lazy: async () => import('../pages/PipeErrorHandler'),
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apupier we could add an About tab here.

@@ -30,19 +31,6 @@ export class KaotoEditorApp implements Editor {
this.editorRef = createRef<EditorApi>();
}

async getElementPosition() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer used.

}
aria-label="Design canvas"
>
<DesignTab />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more linking components directly, the router will take care of mounting the right component when needed.

Comment on lines -151 to -153
<CatalogModalProvider>
<DeleteModalContextProvider>{props.children}</DeleteModalContextProvider>
</CatalogModalProvider>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These providers already come directly from the DesignPage, so they are no longer needed here.

Currently, the `DesignPage` component is duplicated to serve the
multiplying architecture and the webapp.

In addition to that, for the multiplying architecture, we're using a
React render approach to navigate between different tabs, whereas in the
webapp we use a Router.

This commit removes the `Tabs` folder and use the `DesignPage` component directly to reduce the duplication.

In addition to that, a Router has been introduced to navigate between
the tabs, this as a cleanup for the upcoming tasks.
@lordrip lordrip force-pushed the chore/refactor-vscode-editor-structure branch from ec2026d to 478d37c Compare September 4, 2024 23:36
Copy link

sonarcloud bot commented Sep 4, 2024

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 48.00000% with 13 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@9b5c678). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ui/src/multiplying-architecture/KaotoEditorApp.tsx 37.50% 5 Missing ⚠️
...src/multiplying-architecture/KaotoEditorRouter.tsx 55.55% 4 Missing ⚠️
...es/ui/src/multiplying-architecture/KaotoBridge.tsx 0.00% 1 Missing ⚠️
...es/ui/src/multiplying-architecture/KaotoEditor.tsx 80.00% 1 Missing ⚠️
packages/ui/src/pages/Design/DesignPage.tsx 0.00% 1 Missing ⚠️
...Design/router-exports-multiplying-architecture.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1386   +/-   ##
=======================================
  Coverage        ?   67.01%           
  Complexity      ?       25           
=======================================
  Files           ?      265           
  Lines           ?     7563           
  Branches        ?     1473           
=======================================
  Hits            ?     5068           
  Misses          ?     2492           
  Partials        ?        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lordrip lordrip merged commit 845ba63 into KaotoIO:main Sep 5, 2024
12 checks passed
@lordrip lordrip deleted the chore/refactor-vscode-editor-structure branch September 5, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants