-
Notifications
You must be signed in to change notification settings - Fork 154
[WIP] Export to Codesandbox #324
base: master
Are you sure you want to change the base?
Conversation
<ExportToCodesandboxWrapper> | ||
<FormField size="small" label="Export to Codesandbox.io"> | ||
<InfoText> | ||
Goto Codesandbox website by clicking the link and copy the token. |
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.
Goto Codesandbox website by clicking the link and copy the token. | |
Go to the Codesandbox website by clicking the link and copy the token. |
Codecov Report
@@ Coverage Diff @@
## master #324 +/- ##
==========================================
+ Coverage 20.91% 21.47% +0.55%
==========================================
Files 246 255 +9
Lines 3896 4094 +198
Branches 389 413 +24
==========================================
+ Hits 815 879 +64
- Misses 2802 2922 +120
- Partials 279 293 +14
|
This comment has been minimized.
This comment has been minimized.
OK, I think this is ready for a review. The UI is not perfect yet. If you're having any ideas what should be improved please let me know. @melanieseltzer where do you get that message? Is this happening after triggering export action? |
This comment has been minimized.
This comment has been minimized.
Seems like |
package.json
Outdated
@@ -48,6 +48,7 @@ | |||
] | |||
}, | |||
"dependencies": { | |||
"codesandbox": "^1.3.5", |
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.
Oh, I've missed to pin the version. I'll change that in my next commit.
@AWolf81 🤦♀️ That was it, whoops. I'm not too familiar with Codesandbox and the CLI, do you know why I'm getting an infinite loop of tokens? Every time it finds error with the token and prompts me to get a new one. Am I doing something wrong? |
{ | ||
// Would be good to not go to codesandbox as the user already entered the token | ||
// we need to open codesandbox because otherwise there won't be a question for the token | ||
// --> current CLI api doesn't support what we need here. A command line arg for the token would help. |
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.
I need to double check this with a fresh state. I think this behaviour changed during my work on it.
I think it's working as expected and not opening a page to codesandbox but I have to check this.
@melanieseltzer no problem. :-) That's weird. Maybe The Codesandbox shouldn't loop. The normal CLI flow is like following:
The token is stored at the CLI location that's why I've added a logout button which will call |
@melanieseltzer I had the same behaviour like you. Seems like a node version issue with codesandbox cli. Issue on Codesandbox Cli already tracking it. Seems like it is related to opn package - I'll have a look into that package. |
My first shot at getting this running resulted in getting stuck with a loading spinner on the |
If the looping issue is due to |
Related Issue:
#323
Summary:
Exporting to Codesandbox working in branch
export-to-codesandbox
. Just the mentioned issue with the image not fixed yet in Codesandbox. I have to check what's wrong with it.I'm creating this because I'd like to get a first feedback if this is going into the right direction. If it's OK then I'll start to refactor the business logic from the component into
export-codesandbox.saga
.Save button styling at the end of the dialog is a bit messed. I have to check why this happened.
I think the export flow is OK like it is in the branch. The Codesand token is saved in app-settings.reducer so it's available for every project.
TODOs
export-codesandbox.saga
logout
test$FlowFixMe
added.codesandbox
- shouldn't happend but we need to show an error message likeExport failed. Please check browser console for more details.
& also finish exporting.Screenshots/GIFs: