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
Add a location picker #21955
Add a location picker #21955
Conversation
Generate code to just return the one argument, don't call a function
apps/src/StudioApp.js
Outdated
@@ -2320,6 +2320,7 @@ StudioApp.prototype.setStartBlocks_ = function (config, loadLastAttempt) { | |||
this.loadBlocks(startBlocks); | |||
} catch (e) { | |||
if (loadLastAttempt) { | |||
console.error(e); |
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.
nit: stray console
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.
If the problem is an undefined block, the mainBlockSpace.clear()
call on the next line throws a less useful exception, so I want to expose this one.
Cleaned it up a little to actually re-throw this exception if the following lines run into a problem.
}) => { | ||
if (!func === !expression) { | ||
throw new Error('Provide either func or expression, but not both'); | ||
if (!!func + !!expression + !!simpleValue !== 1) { |
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.
clever!
Overview of the changes in this PR:
simpleValue
option to blocks, which makes them act as a simple wrapper around a single argument.GamelabVisualizationColumn
, depending on actions and state from theLocationPickerModule
.