Skip to content

on signin, transfer local projects to cloud#8431

Merged
eanders-ms merged 4 commits intomasterfrom
eanders/skillmap/sync
Aug 26, 2021
Merged

on signin, transfer local projects to cloud#8431
eanders-ms merged 4 commits intomasterfrom
eanders/skillmap/sync

Conversation

@eanders-ms
Copy link
Contributor

@eanders-ms eanders-ms commented Aug 25, 2021

Once the MakeCodeFrame ref is available, and after the App component has mounted, if the user is signed in and has local skillmap projects in the workspace, transfer them to the cloud in the background. whew.

Fixes microsoft/pxt-arcade#3752

These conditions can become true in any order. We know when this component
is mounted, but when the MakeCodeFrame is loaded is completely variable.
*/
cloudSyncCheckAsyncEmpty = async () => { }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't love this (function assignment as state), but it saves from having to keep an additional state variable around. Open to other suggestions!

Copy link
Member

Choose a reason for hiding this comment

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

I would rather just have it be in the state, but I don't feel super strongly. Not sure we need to have three cloud sync properties though; could we just declare cloudSyncCheckAsync equal to the actual implementation and then assign to an inline function inside?

@shakao
Copy link
Contributor

shakao commented Aug 26, 2021

should https://github.com/microsoft/pxt/blob/master/skillmap/src/components/UserProfile.tsx#L107 also be replaced with the skillmap authClient's logoutAsync?

@eanders-ms eanders-ms merged commit 2121443 into master Aug 26, 2021
@eanders-ms eanders-ms deleted the eanders/skillmap/sync branch August 26, 2021 18:17
eanders-ms added a commit that referenced this pull request Aug 26, 2021
* on signin, transfer local projects to cloud

* pr feedback and refinements
abchatra pushed a commit that referenced this pull request Aug 27, 2021
* on signin, transfer local projects to cloud

* pr feedback and refinements
eanders-ms added a commit that referenced this pull request Sep 13, 2021
* [stable7.1] Cherry-pick fixes for skillmap, iframe (#8391)

* Rest finishedActivityState when opening new activity (#8387)

* Null check for header when saving, posting tutorial progress (#8389)

* Don't unload/reload skillmap graph, reduces jittering (#8390)

* Don't use telemetry item before it's declared (#8393)

* 7.1.21

* Cherry pick fixes to stable7.1 (#8394)

* Don't write the contents of nonexistent files (#8392)

* Don't use telemetry item before it's declared (#8393)

* 7.1.22

* Handle iframe reloading (#8398)

* 7.1.23

* Only load project if skillmap editorview open (#8399)

* 7.1.24

* Don't run sim in background when no project is loaded in the skillmap iframe (#8405)

* Don't run sim in background when no project is loaded in the skillmap iframe

* Don't reload header when exiting skillmp tutorial

* Remove post progress

* Retry request for skillmap markdown in safari (#8395)

* 7.1.25

* Check for deleted flag when importing skillmap project (#8414)

* Filter tiles out of image gallery in image editor (#8403)

* Add user profile page (#8411)

Co-authored-by: Eric Anderson <eanders@microsoft.com>

* Fix hang in monaco by making regex more specific (#8427)

* Fix hang in monaco by making regex more specific

* cleanup

* Only reset progress for currently open skillmap (#8415)

* reenable auth in skillmap (#8428)

* 7.1.26

* Check for placeholder type before guessing a new type (#8429) (#8435)

* on signin, transfer local projects to cloud (#8431) (#8443)

* on signin, transfer local projects to cloud

* pr feedback and refinements

* Add detection for chromium-based edge (#8432)

* skillmap: reflect project cloud status on on info panel (#8440)

* cloud status wip

* reflect cloud status on info panel

* removed unneeded property

* show cloud status on skillmap view

* pr feedback and refinements

* Fix User Menu header sizing (#8437)

* Prompt users to sign in after completing the first skillmap activity (#8433)

* 7.1.27

* Load entire toolbox instead of exiting tutorial on toolbox error (#8449)

* Make copies of local projects when importing skillmap progress to cloud (#8456)

* Make copies of local projects when importing skillmap progress to cloud

* cleanup

* PR feedback

* always request all header cloud status

* 7.1.28

* Tick event for grey block in tutorial filters, add 24hr expiration (#8463)

* 7.1.29

* allow specifying pkgs to compile hex files for in staticpkg (#8460) (#8466)

* Handle user initials better in skillmap (#8458)

* 7.1.30

* Never use the icons.css from pxt-arcade-sim (#8451)

* Never use the icons.css from pxt-arcade-sim (#8451)

* [stable7.1] Cherry Pick (#8477)

* cleanup cloudSyncCheckAsync trigger (#8476)

* Cleanup console output (#8479)

* [stable7.1] Expand inline blocks regex to allow arrays (#8471) (#8474)

* Expand inline blocks regex to allow arrays (#8471)

* Thow warning instead of error for loop in skillmap graph (#8424)

* Allow skill map end action without link (#8478)

* 7.1.31

* Align sign in button icon (#8481)

* skillmap: export cloud projects to local on profile delete (#8482)

* 7.1.32

* Merge branch 'stable7.1'

* Copy skillmap headers over for cloud users (#8483)

* Copy skillmap headers over nicely for new users

* Remove trailing spaces

* Put ready promise back

* Don't block things forever

* Move things from ready to appstate

* Add comment

* Use 'some' instead of filter

* 7.1.33

* Use arcade-sim icons.css :) (#8485)

* 7.1.34

* Copy over user tags. (#8488)

* 7.1.35

Co-authored-by: shakao <34112083+shakao@users.noreply.github.com>
Co-authored-by: Richard Knoll <riknoll@users.noreply.github.com>
Co-authored-by: Abhijith Chatra <abchatra@microsoft.com>
Co-authored-by: Vivian Li <vivl@microsoft.com>
Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
Co-authored-by: Joey Wunderlich <joey.wunderlich@gmail.com>
Co-authored-by: livcheerful <li.v.cheerful@gmail.com>
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.

Exporting a skillmap project to a signed in editor doesn't sync it to the cloud

5 participants