Offer to fork non-editable fiddle on Save/Run/Test #120
Conversation
@@ -366,6 +366,16 @@ async function saveAll() { | |||
|
|||
export async function deployAndRun(fiddleName: string, pageName: string = "", contractSuffix: string = "") { | |||
gaEvent(pageName === "test.html" ? "deployAndTest" : "deployAndRun"); | |||
|
|||
// TODO: Remove ugly hack with window |
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.
do we need to copy this todo everywhere? Let's just keep this pattern, since I don't see a good way to solve this any time soon.
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.
it generally can be solved by moving state management to happen through AppStore
, but yeah, easier to hack around for now
@@ -421,6 +422,19 @@ export class App extends React.Component<AppProps, AppState> { | |||
notifyArcAboutFork(fiddle); | |||
} | |||
} | |||
|
|||
async forkIfNeeded(): Promise<boolean> { |
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.
add a test?
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 don't see good way to test it without running whole thing in browser.
Gonna track this here cause initial setup gonna be involved:
#121
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.
ok
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.
Please add a test, after that LGTM
Fixes #93