fiddle icon indicating copy to clipboard operation
fiddle copied to clipboard

refactor: integrate fiddle-core

Open aryanshridhar opened this issue 3 years ago • 4 comments

Integrates fiddle core into the renderer codebase

Todos:

  • ~Fix the TODOS over the codebase. (Only one left, not a major one!)~
  • ~Fix jests tests (to be done later)~
  • Handle bisecting of versions through fiddle-core.
  • ~Handle different source mirrors in fiddle-core (global/china)~
  • ~Add the downloadProgress callback to fiddle-core (Opened https://github.com/electron/fiddle-core/pull/30 for the same)~

Tackles #644 as well :)

aryanshridhar avatar Jul 15 '22 16:07 aryanshridhar

Coverage Status

Coverage decreased (-0.5%) to 91.906% when pulling 5d3cd75a42b682d2eb29267c972cae0e63ecd907 on aryanshridhar:Integrate-fiddlecore into 69950223bca7c577cf191dd7591b9b481b023b62 on electron:main.

coveralls avatar Jul 28 '22 10:07 coveralls

Added a couple of comments above that I felt can be improved. Would love opinions upon it :)

aryanshridhar avatar Jul 30 '22 19:07 aryanshridhar

Updates on the pr -

If I click "Download" on a version under "Settings", when I close "Settings" the version run button at the top of Fiddle is showing "Checking Status" and spins indefinitely, until I choose a different version from the selector.

  • Debugged this and turns out fiddle-core blocks the installation of other versions if one is already installing (https://github.com/electron/fiddle-core/pull/35)
  • Rebased the pr so now the imports are always sorted :)
  • Removed the VersionState interface to avoid deduplication of code (https://github.com/electron/fiddle-core/pull/33). We can now directly import the interface from fiddle-core and use it.

Also, would love reviews on this comment!

aryanshridhar avatar Aug 08 '22 09:08 aryanshridhar

Rebased and now the checks are passing :rocket: (A pr to fiddle-core upgrading get is only left out)

aryanshridhar avatar Aug 15 '22 18:08 aryanshridhar

So cool that this is in main now. Thank you @aryanshridhar, this is great! :heart:

ckerr avatar Sep 13 '22 00:09 ckerr