enable editor changes in sketch mode, refactor some of the code manager (#2287)
* Revert "Revert "client side sketch updating properly with direct changes to t… (#2286)"
This reverts commit e7ab645267
.
* rejig out side of xstate
* test tweak
* more test tweak
* refactor some codeManager stuff
* tsc
* try and fix tests
* revert small uneeded change
* fix
* snapshot tweak
* more test tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* small tweak
* disable bad test
* fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -56,7 +56,7 @@ function OnboardingWithNewFile() {
|
||||
dismiss={dismiss}
|
||||
next={() => {
|
||||
// We do want to update both the state and editor here.
|
||||
codeManager.updateCodeStateEditor(bracket)
|
||||
codeManager.updateCodeEditor(bracket)
|
||||
kclManager.executeCode(true)
|
||||
next()
|
||||
}}
|
||||
@ -80,7 +80,7 @@ function OnboardingWithNewFile() {
|
||||
dismiss={dismiss}
|
||||
next={() => {
|
||||
void createAndOpenNewProject()
|
||||
codeManager.updateCodeStateEditor(bracket)
|
||||
codeManager.updateCodeEditor(bracket)
|
||||
dismiss()
|
||||
}}
|
||||
nextText="Make a new project"
|
||||
@ -113,7 +113,7 @@ export default function Introduction() {
|
||||
const isStarterCode = currentCode === '' || currentCode === bracket
|
||||
|
||||
useEffect(() => {
|
||||
if (codeManager.code === '') codeManager.updateCodeStateEditor(bracket)
|
||||
if (codeManager.code === '') codeManager.updateCodeEditor(bracket)
|
||||
}, [])
|
||||
|
||||
return isStarterCode ? (
|
||||
|
Reference in New Issue
Block a user