utopia icon indicating copy to clipboard operation
utopia copied to clipboard

feat(import): github import wizard

Open liady opened this issue 1 year ago • 2 comments

This PR adds a Github import wizard, tracking the progress of importing a project from Github, showing errors or warnings. The design is still preliminary, but it is hidden behind a feature switch so that the logic can be reviewed and merges, in order not to create a long living PR.

It supports error/warning states: image

PR Includes:

  1. Adding three actions
    • SetImportWizardOpen - controlling the wizard UI
    • UpdateImportOperations - updating the results of individual import operations (desc. to follow).
    • UpdateProjectRequirements - updating the results of checking and fixing Utopia specific requirements
  2. Utilities to start/end tracking of import operations, their results and timings.
  3. Tracked import operations - tracking hooks are being called at appropriate places in the code.
    • Loading the code from Github
    • Parsing the files
    • Checking specific Utopia requirements
    • Loading dependencies
  4. Utopia checks:
    • storyboard file (created if not present)
    • utopia entry in package.json
    • project composition (JS/TS)
  5. Not tracked in this PR but will in subsequent ones (can be added modularily):
    • React version - currently a placeholder
    • Server side packages - mainly Node builtins
    • Style frameworks
  6. The wizard UI itself - showing progress and results (still preliminary)

Note for reviewers: there are a lot of changed files due to adding new actions and passing down the dispatch parameter, but the main logic is contained in the new services and the wizard React components.

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

liady avatar Oct 09 '24 14:10 liady

Try me

github-actions[bot] avatar Oct 09 '24 15:10 github-actions[bot]

#14940 Bundle Size — 58.02MiB (+0.07%).

8fb5834(current) vs 916e8b9 master#14936(baseline)

[!WARNING] Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 4 changes Regression 1 regression
                 Current
#14940
     Baseline
#14936
Regression  Initial JS 41.01MiB(+0.09%) 40.97MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18.29% 0%
No change  Chunks 20 20
No change  Assets 22 22
Change  Modules 4159(+0.17%) 4152
No change  Duplicate Modules 213 213
Change  Duplicate Code 27.32%(-0.04%) 27.33%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#14940
     Baseline
#14936
Regression  JS 58.02MiB (+0.07%) 57.98MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch feat/github-import-wizardProject dashboard


Generated by RelativeCIDocumentationReport issue

relativeci[bot] avatar Oct 09 '24 15:10 relativeci[bot]