Skip to content
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

Disallow behavior editing if there is a toolbox with no categories #32395

Merged
merged 3 commits into from
Dec 18, 2019

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Dec 12, 2019

Description

Fix for #32252, which was reverted by #32280

Level with categorized toolbox (allows behavior editing):
s/coursef-2019/stage/3/puzzle/5
image

Level with no toolbox (allows behavior editing):
s/coursef-2019/stage/15/puzzle/2
image

Level with uncategorized toolbox (disallows behavior editing):
s/coursef-2019/stage/2/puzzle/4
image

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@jmkulwik
Copy link
Contributor

This seems like a workaround for a very specific use-case. Is there future work planned to allow levelbuilders to enable/disable the edit behavior button per level?

@ajpal
Copy link
Contributor Author

ajpal commented Dec 16, 2019

This seems like a workaround for a very specific use-case. Is there future work planned to allow levelbuilders to enable/disable the edit behavior button per level?

I don't think so at this point? This was the decision from the curriculum/eng meeting: https://docs.google.com/document/d/1EL99K31sSv3wwsfc5bNqtChh870oF3GepenWxyPm9Cg/edit#bookmark=id.swq3i21lhwkw

@ajpal ajpal requested a review from a team as a code owner December 18, 2019 18:34
@ajpal ajpal changed the base branch from staging-next to staging December 18, 2019 18:34
@@ -377,7 +378,12 @@ export default {
.appendTitle(fieldLabel, 'VAR')
.appendTitle(Blockly.Msg.VARIABLES_GET_TAIL);

if (Blockly.useModalFunctionEditor) {
let allowBehaviorEditing = Blockly.useModalFunctionEditor;
if (appOptions.level.toolbox && !Blockly.hasCategories) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment explaining why we do this check? (No need to wait for drone after)

Copy link
Contributor

@jmkulwik jmkulwik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment. Besides that, looks good!

@ajpal ajpal merged commit e182f3f into staging Dec 18, 2019
@ajpal ajpal deleted the dec11-spritelab-behavior branch December 18, 2019 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants