-
Notifications
You must be signed in to change notification settings - Fork 172
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
feat(import): allow continuing the import after an error #6614
Conversation
#15023 Bundle Size — 58.04MiB (~+0.01%).474a2b1(current) vs d1d46c1 master#15007(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch feat/continue-import Project dashboard Generated by RelativeCI Documentation Report issue |
@@ -38,25 +51,10 @@ export const ImportWizard = React.memo(() => { | |||
e.stopPropagation() | |||
}, []) | |||
|
|||
const totalImportResult: ImportOperationResult | null = React.useMemo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to a different file
return ( | ||
<React.Fragment> | ||
<div style={textStyle}>Error Importing Project</div> | ||
<Button style={buttonStyle}>Import A Different Project</Button> | ||
<div style={textStyle}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're in an error mode (but not a critical error), show a button for Continue Anyway
dispatch([updateImportStatus(importStatus)]) | ||
} | ||
|
||
export function getTotalImportStatusAndResult(importState: ImportState): TotalImportResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic was moved here from import-wizard.tsx
This PR adds the ability to control the import process after an error: 1. Import a different project 2. Decide to continue anyway (for example to correct it using our editor). This PR distinguishes between an `Error` (that can be continued) and a `Critical Error` (for example a non-existent repo) - that we cannot recover from. **PR details:** 1. In [editor/src/core/shared/github/operations/load-branch.ts](https://github.com/concrete-utopia/utopia/pull/6614/files#diff-3c1474cac72b0e757d951539630bd72175135c05eddbff91d9f10639d2796440) this PR adds the ability to stop before dependencies fetching and resume afterwards 2. In [editor/src/components/editor/import-wizard/import-wizard.tsx](https://github.com/concrete-utopia/utopia/pull/6614/files#diff-a1ec93eec4b0720f01ff6ec77bb4efb6cc3ac0ba4297d3fe7bb77049c601ca94) this PR adds the UI for displaying the correct status/buttons according to the current import state. 3. The rest of the changes are mostly actions/state changes. For example this flow: 1. Importing a non-existing repo (critical error) 2. Then importing a project with errors (TS/server packages, etc), choosing to continue importing 3. Deciding to import a different project - which is a success <video src="https://github.com/user-attachments/assets/39eaeedd-14fd-4819-b590-39a92629ad8e"></video> Current design: <img width="693" alt="image" src="https://github.com/user-attachments/assets/a609068f-dece-4448-a31d-c266969a6341"> **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
This PR adds the ability to control the import process after an error:
This PR distinguishes between an
Error
(that can be continued) and aCritical Error
(for example a non-existent repo) - that we cannot recover from.PR details:
For example this flow:
Monosnap.screencast.2024-11-04.19-04-09.mp4
Current design:
![image](https://private-user-images.githubusercontent.com/7003853/382582568-a609068f-dece-4448-a31d-c266969a6341.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NDgyMzMsIm5iZiI6MTczODg0NzkzMywicGF0aCI6Ii83MDAzODUzLzM4MjU4MjU2OC1hNjA5MDY4Zi1kZWNlLTQ0NDgtYTMxZC1jMjY2OTY5YTYzNDEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMTMxODUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmJlYjA5ZDQzNzVkMTk2ODY0YzA1M2RmZWZhMTIzM2M1MzM5ODdjYTk3YWUxYWVjNGJhZDRkN2FhOTRiYzY3NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.IxJIf0EB6fJurzoj90cVKdJ3_bR9W86Pgq7pNaiASak)
Manual Tests:
I hereby swear that: