New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display informational warning when code is edited while its running #35351
Conversation
this.editDuringRunAlert = undefined; | ||
} | ||
} else { | ||
this.executingCode = this.getCode().trim(); |
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.
Still needed?
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.
The change handlers are also run when you toggle between code and block mode in droplet so we need the code when the user clicked run to compare against later to see if there was an actual change.
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.
👍
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 can't comment on the file itself, but the change(s) to dashboard/db/schema_cache.dump
here should be removed
fcd7809
to
344e27f
Compare
Created a WorkspaceAlert wrapper for the alert component.
apps/src/StudioApp.js
Outdated
var container = $('<div/>'); | ||
parent.append(container); | ||
ReactDOM.render( | ||
<WorkspaceAlert |
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.
🎉
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 do continue to avoid using JSX syntax inside non-JSX files
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.
@Hamms - what's the preferred way to write this?
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 just switched it to use createElement like you suggested earlier, let me know if this wasn't what you meant
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, sorry I missed this. Yep, createElement
is preferred! Thanks
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.
Great work!!!
This displays a warning at the bottom of the workspace if someone makes changes in the workspace while the code is running. This warning will only show up once during a run and go away if they close it or if they click reset (for example, if you run, edit, close the warning, and then edit again you won't get the warning again during this run but it will show up again if you reset, run, and then edit).
Game Lab:
App Lab on mobile:
Dance Party:
Sprite Lab on mobile:
Craft:
Craft on mobile:
Links
Testing story
Reviewer Checklist: