Commit Graph

204 Commits

Author SHA1 Message Date
Neil Fraser
3909bd420a Remove all goog.asserts and goog.isXxx
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Rachel Fenichel
df7f534ad6 Performance improvements for workspace clear and load 2018-05-17 11:05:18 -07:00
Rachel Fenichel
ee6f2ea097 Comments v3 (#1817)
* Add skeleton for workspace comments

* XML parsing and encoding of workspace comments.

* Minor fix: piping the height and width from xml to newWorkspaceComment

* Move height and width into workspace_comment_svg

* rename newWorkspaceComment to newComment

* minor refactoring. PR changes

* Functions for managing the comment's lifecycle

* Add initial tests

* Add another test

* Add basic rendering of a comment.

* Cleanup remaining highlighting steps from render

* Fix lint

* Fix aslant

* Add basic comment translate

* Simplify render code into one setPath method

* Move steps to setPath_

* Remove svg elements when disposing of a comment; some code cleanup

* Add a workspace comment on context menu click and position it where the initial context menu was clicked.

* Minor rendering changes, fixes RTL. Fix positioning of new (context menu) comments while workspace is scaled.

* PR feedback

* Gesture code for dragging comments

* Add comment (block drag) surface methods

* minor comment fix

* Comment fixes

* Add comment dragger

* Making rendered private

* Require CommentDragger

* Make basic comment dragging work

* Increase the border around the comment to make a bigger drag handle

* Remove typo

* Allow comments to be selected. Highlight selected comment. Only edit comment on click. Updated comment rendering.

* minor refactor: remove commented out code

* PR comments

* lint and rebuild

* Fix renamed function call

* Fix workspace getMetrics by storing comment size as a number, not a string

* Enable comment deletion when dragging over the toolbox or trash can

* Give issue references to some todos

* Create a helper function for workspace comment creation

* Integrate sam's workspace comments, using the bubble dragger

* Remove comment_dragger references

* Remove comment dragger.js

* Remove pointer handling

* Fix lint

* Move comment XML functions into the comment files.

* Fix tests

* Fix type annotations

* Fix comments on comments

* Fix compiler errors related to visibility.

* Fix merge issues and add an issue number to a TODO

* Add a new message for default text on workspace comments, and rebuild

* Add support for a context menu on workspace comment showing delete and duplication options.
Add copy and paste support.

* PR comment feedback

* Show a delete icon on the comment when selected. Delete icon deletes the comment. Comment can be deleted if dragged onto the toolbox or the trash icon. A normal bubble cannot be deleted that way.

* use isDeletable instead

* Support drag of the comment during editing mode using the top handle.

* Add skeletons for all workspace comment events

* Rebuild with new comments

* Get rid of confused TODO

* JSDoc on a function

* Fix broken tests

* More PR feedback

* Fix lint

* Delete comment on mouse out, highlight on mouse down.

* Fix lint.

* Show delete hand cursor when dragging a comment to delete over the toolbox

* Focus textarea on select

* Add delete events

* Remove workspace comment create event, and add TODO placeholder

* Provide default values if comment height and width are missing in XML

* Set comment handle fill to none by default

* Rebuild

* Comment de/serialization should include location.

* Add comment move events, with undo and redo

* Add comment change events

* Move files up to core

* Add package/private annotations wherever possible

* Move the workspace comment events up to core and into a single file

* Mark things package or private where possible

* Get rid of unnecessary changes to messge files

* Fix lint

* Fix some review feedback

* Make changes to the comment db happen in addTopComment and removeTopComment

* Add css classes for toggling comment focus

* Clean up css for comment focus

* Rebuild
2018-04-27 15:18:59 -07:00
Neil Fraser
662d79443f Add 'ordered' option to descendant getting functions. (#1786) 2018-04-17 11:41:03 -07:00
Rachel Fenichel
52e0241f66 Add argsIgnorePattern to the eslintrc 2018-04-06 13:29:22 -07:00
Rachel Fenichel
d1d60eb62a Make undoStack_ and redoStack_ protected 2018-03-15 13:02:12 -07:00
Rachel Fenichel
e3700c02e4 Merge pull request #1651 from AnmAtAnm/rm-todos-in-docs
Moving TODO from doc comment to single line comment.
2018-02-21 11:06:31 -08:00
Rachel Fenichel
13cb64392f Fix some JsDoc annotations (#1650) 2018-02-21 11:01:01 -08:00
Andrew n marshall
91e2d03eea Moving TODO from doc comment to single line comment. 2018-02-21 10:58:52 -08:00
Rachel Fenichel
5cd6a51197 Make some functions public 2018-01-18 15:35:59 -08:00
Rachel Fenichel
fa91c6b36f Make some functions package 2018-01-16 12:41:52 -08:00
Rachel Fenichel
b593d44379 Make the potential variable map null when not needed 2018-01-12 14:51:02 -08:00
Rachel Fenichel
80b397f532 Respond to more review comments 2018-01-10 17:27:43 -08:00
Rachel Fenichel
5d6d7519cd Remove some TODOs; add a variable-referencing block to the simple playground flyout 2018-01-08 14:14:26 -08:00
Rachel Fenichel
9b091a8f9e Update procedure generators 2018-01-02 16:27:17 -08:00
Rachel Fenichel
db9a9f5182 Move code from the variable to the variable map. Fixes #1512. 2017-12-15 15:31:41 -08:00
Rachel Fenichel
9f4b52a834 Clean up TODOs and move potential variable map to the flyout workspace 2017-12-12 17:19:41 -08:00
Rachel Fenichel
96e814deff Fix events for variable renaming 2017-12-12 17:19:41 -08:00
Rachel Fenichel
3b91de7bb4 Remove ws.updateVariableStore and tests, and ws.getVariableUses 2017-12-12 17:19:41 -08:00
Rachel Fenichel
72e4be9b4e Get rid of workspace.deleteVariable 2017-12-12 17:19:41 -08:00
Rachel Fenichel
9e0d908133 Move getOrCreateVariable to variables.js 2017-12-12 17:19:41 -08:00
Rachel Fenichel
f3f3f34fc2 All but XML tests now pass 2017-12-12 17:19:41 -08:00
Rachel Fenichel
a7b98f7479 Move code from renameVariableInternal to renameVariableById 2017-12-12 17:19:41 -08:00
Rachel Fenichel
62737bc233 Update tests in workspace_test. Get rid of renameVariable 2017-12-12 17:19:41 -08:00
Rachel Fenichel
0516310f66 Delete by id 2017-12-12 17:19:41 -08:00
Rachel Fenichel
08e065a75b Fix renaming 2017-12-12 17:19:41 -08:00
Rachel Fenichel
745bed5ac3 Can now create a variable with the button in the flyout; drag a block with a variable out of the flyout; handle default variable names; and import and export variables 2017-12-12 17:19:41 -08:00
Rachel Fenichel
731d2735c0 Add TODOs and fix return type 2017-12-12 17:19:41 -08:00
Rachel Fenichel
c825e60813 Allow variables of different types to share the same name. 2017-12-12 17:19:41 -08:00
picklesrus
e0f7862547 spacing changes 2017-11-02 14:05:29 -07:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
Neil Fraser
e100c66659 Linting. 2017-10-24 14:06:29 -07:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
marisaleung
d937920afc Remove out of date todo comments. 2017-06-20 13:15:28 -07:00
CoryDCode
1ee550aa24 Fixing the accessible variable stuff so it interacts correctly with (#1170)
variableMap.
2017-06-13 09:47:27 -07:00
marisaleung
833c2d0c40 Fire VAR events and test. 2017-06-09 14:42:14 -07:00
marisaleung
e9a480c51f Add VAR events. 2017-06-08 15:15:17 -07:00
marisaleung
a6f85cec53 Appease eslint: semicolons and such. 2017-05-25 13:44:06 -07:00
marisaleung
5fddba7545 Add VariableMap requirement to workspace. 2017-05-17 14:51:29 -07:00
marisaleung
12ea998155 Created separate file for VariableMap 2017-05-03 17:04:15 -07:00
marisaleung
d903b5e86b VariableMap and functions added. 2017-05-03 10:51:24 -07:00
marisaleung
b159c7c3b5 Create separate file for VariableMap and its functions. 2017-05-02 15:06:12 -07:00
marisaleung
2994805e6a VariableMap and functions added. 2017-05-02 10:07:46 -07:00
CoryDCode
537bf17b7d Adding the remove variable modal and functionality to accessible Blockly. (#1011) 2017-03-30 11:31:31 -07:00
Tim Dawborn
f9e0552c11 Add an allInputsConnected method to Block and Workspace to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off develop instead of master as per discussion in PR #791. 2016-12-28 12:26:53 +11:00
Neil Fraser
c27841f8df Fix compiler errors. 2016-11-15 16:41:11 -08:00
Neil Fraser
f6aef459fc API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00
Andrew n marshall
52ffc64f6a Refactor variable rename to handle UI actions more directly. (#726)
FieldDropdown now has onItemSelected(..) method to handle the menu item selection action. Variable renames and deletes are now handled here, instead of during validation.

Also fixes an issue deleting variables used by less than two blocks.

Fixes #723.
2016-11-01 16:32:10 -07:00
rachel-fenichel
3d53b1e7fb Fix annotation 2016-10-21 17:34:59 -07:00