Workspace Factory #5: Import Categories, Dropdown UI#25
Workspace Factory #5: Import Categories, Dropdown UI#25edauterman merged 12 commits intoworkspacefactory_masterfrom
Conversation
…n add new category or load standard Blockly category. Added some calls to updatePreview to update preview on category creation, deletion, and modification
…nged width of CSS dropdown accordingly
|
+@picklesrus +@vicng +@quachtina96 Review status: 0 of 7 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
|
Review status: 0 of 7 files reviewed at latest revision, 11 unresolved discussions. demos/workspacefactory/factory_controller.js, line 379 [r2] (raw file):
Nit: Add an extra space above this line. It's easier to read methods in sections, instead of one long paragraph. This paragraph is "where the model is updated". demos/workspacefactory/factory_controller.js, line 384 [r2] (raw file):
Nit: Add extra space above this line. This next paragraph is "where the view is updated". demos/workspacefactory/factory_controller.js, line 404 [r2] (raw file):
standardCategories should be a property of the Controller (or the Model). Try to avoid global variables whenever possible. demos/workspacefactory/factory_model.js, line 6 [r2] (raw file):
Nit: Extra period. demos/workspacefactory/factory_model.js, line 255 [r2] (raw file):
This method might be more versatile if it's something like "setCategoryById" (and you worry about loading standard categories inside the controller). demos/workspacefactory/factory_model.js, line 257 [r2] (raw file):
It's always a bad sign when a method relies on a global variable being defined :) demos/workspacefactory/index.html, line 477 [r2] (raw file):
This should be: // Hide dropdown menu demos/workspacefactory/index.html, line 481 [r2] (raw file):
Same thing here. demos/workspacefactory/index.html, line 506 [r2] (raw file):
// Hide dropdown menu demos/workspacefactory/standard_categories.js, line 10 [r2] (raw file):
Add this to a namespace. demos/workspacefactory/standard_categories.js, line 12 [r2] (raw file):
Are these already defined by the blockly library? If so, try to use those definitions instead of redefining them. Comments from Reviewable |
|
Friendly reminder: try not to add code functionality to a CL after you've submitted it for review. It makes it harder for us to review the CL if it changes from the original submit :) Review status: 0 of 7 files reviewed at latest revision, 11 unresolved discussions. Comments from Reviewable |
|
Only 1 nit after what we just discussed. Also, the 2 things this CL does are pretty different (auto update workspace and copy whole category) so could be 2 separate CLS (though don't change that now). Review status: 0 of 7 files reviewed at latest revision, 12 unresolved discussions. demos/workspacefactory/style.css, line 47 [r3] (raw file):
how come you had to push this backwards? Is something showing up on top of it? Comments from Reviewable |
…r small nit changes
|
Thanks for the feedback -- I'll try to break things up better and not add functionality in the future, Review status: 0 of 7 files reviewed at latest revision, 13 unresolved discussions. demos/workspacefactory/factory_controller.js, line 379 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 10 unresolved discussions. demos/workspacefactory/index.html, line 545 [r4] (raw file):
whoops, missed this before. Di d you want to catch the create events too? Comments from Reviewable |
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/factory_controller.js, line 391 [r4] (raw file):
Actually, if there's no color, is it ok to set a default one on the category instead? demos/workspacefactory/factory_model.js, line 255 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/standard_categories.js, line 10 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/standard_categories.js, line 10 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/standard_categories.js, line 10 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/factory_controller.js, line 391 [r4] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. demos/workspacefactory/standard_categories.js, line 10 [r2] (raw file):
|
|
Review status: 0 of 7 files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
|
Review status: 0 of 7 files reviewed at latest revision, 4 unresolved discussions. Comments from Reviewable |
Added feature to allow the user to load a standard Blockly category (logic, loops, math, etc.) by name as a new category. Also changed the add and edit buttons to be dropdowns to (for the add dropdown) add a new category or load a standard category, and (for the edit dropdown) edit the name or the color. Also moved calls to updatePreview to other functions (adding, deleting, editing) and listened for Blockly move and delete events to eliminate the need for the "Update Preview" button (removed button).


This change is