Commit Graph

2832 Commits

Author SHA1 Message Date
Andrew n marshall
ea6438de3e Adding Blockly.FieldDropdown.validateOptions_() (#1840)
* Adding Blockly.FieldDropdown.validateOptions_()

Verifies the datastructure of dropdown option lists.
Catches errors early, such as:
  https://groups.google.com/forum/#!topic/blockly/ae9WrvEcOP0
2018-05-04 19:12:10 -07:00
Corey Frang
222e33eaa3 Do not nullify inverseScreenCTM if for some reason CTM is lost 2018-05-04 19:39:07 -04:00
Corey Frang
0dc32091c4 Delay getting inverse screen CTM until needed 2018-05-04 13:40:55 -04:00
Rachel Fenichel
02aada1e3d Make ui events work when block is null; test 2018-05-03 17:36:08 -07:00
translatewiki.net
c1922a1cd2 Localisation updates from https://translatewiki.net. 2018-05-03 09:20:51 +02:00
Rachel Fenichel
c7a0721a18 Fix a problem with scrolling on firefox 2018-05-02 16:44:54 -07:00
Andrew n marshall
0ffd5dda18 Changing root script for tests under Node. (#1837)
* Changing root script for tests under Node.

Was: tests/jsunit/test_runner.js
Now: tests/test_runner.js

The webdriver & jsunit calls formerly in tests/jsunit/test_runner.js
are now in function runJsUnitTestsInBrowser, in
run_jsunit_tests_in_browser.js, called from tests/test_runner.js.

This makes room for additional tests under Node, such as headless and generator tests.
2018-05-02 12:19:49 -07:00
Andrew n marshall
1687275cb2 Replace raw window references with goog.global.window. (#1818)
This should be safer when run within Node.
2018-05-01 13:35:51 -07:00
Andrew n marshall
42e0439aa3 Adding JsDoc @this for closure in jsonInitFactory(). (#1833) 2018-05-01 11:05:35 -07:00
Andrew n marshall
9ce9c6f7d9 Using %{BKY_} notation for toolbox category colours. (#1826) 2018-04-30 13:08:02 -07:00
Rachel Fenichel
b578647906 Merge pull request #1828 from rachel-fenichel/feature/zoom_control_decomp
Decompose some functions for creating zoom controls SVG
2018-04-30 13:07:00 -07:00
Rachel Fenichel
744bb9b6eb Add comments explaining unique IDs on clip paths 2018-04-30 13:01:04 -07:00
translatewiki.net
8fe1ab802e Localisation updates from https://translatewiki.net. 2018-04-30 08:18:49 +02:00
Rachel Fenichel
a572a15874 Merge pull request #1827 from rachel-fenichel/feature/references_variables
Add a referencesVariables function to field
2018-04-27 15:34:53 -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
Rachel Fenichel
66fde72ab6 Change comment on function 2018-04-27 13:25:06 -07:00
Neil Fraser
a6e386d14f Routine recompile.
…after the storm.
2018-04-27 11:50:51 -07:00
Neil Fraser
4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Neil Fraser
fb06f39258 Routine recompile.
…before the storm.
2018-04-27 11:50:51 -07:00
translatewiki.net
e3598d1c48 Localisation updates from https://translatewiki.net. 2018-04-26 07:49:43 +02:00
Rachel Fenichel
e65c3a7c95 Fix parameter annotation 2018-04-25 17:37:44 -07:00
Rachel Fenichel
0cfe5a610c Decompose out some functions for creating zoom controls 2018-04-25 17:35:07 -07:00
Rachel Fenichel
a8767ee6c9 Add a referencesVariables function to field 2018-04-25 15:15:05 -07:00
Neil Fraser
488539f636 Update storage.py to use ndb instead of db.
Back-ports from Blockly Games:
* db is old and busted, ndb is the new hotness (there’s no known
difference, just pointless API churn).
* Use SHA1 which is consistent, rather than Python’s hash() which has
started changing between executions.  This stops duplicate programs
from being stored.
* Restructure so that storage.py can be used as a library, with
xmlToKey and keyToXml being callable by external programs.
* Use print function compatible with Python 3.
2018-04-25 13:39:00 -07:00
Andrew n marshall
42e229fb4c Removing Blockly.utils.getScale_() and usage. (#1821)
The function only returns 1 for the two cases it was used on,
making the scale multiplication a no-op.
2018-04-24 10:24:03 -07:00
Rachel Fenichel
5bb9088765 Merge pull request #1814 from rachel-fenichel/feature/comment_messages
Add comment messages and rebuild
2018-04-23 10:18:47 -07:00
Rachel Fenichel
e792be0d20 Add metadata back to qqq.json 2018-04-23 10:18:05 -07:00
translatewiki.net
d521b043ab Localisation updates from https://translatewiki.net. 2018-04-23 08:50:06 +02:00
Rachel Fenichel
9dfcf4adbf Rebuild message files with new messages 2018-04-20 16:49:16 -07:00
Rachel Fenichel
2a37fc849a Add comment messages 2018-04-20 16:47:28 -07:00
Rachel Fenichel
71a30ddb39 Merge pull request #1813 from rachel-fenichel/rebuild_langfiles
Rebuild message files
2018-04-20 16:46:35 -07:00
Rachel Fenichel
3927bd17c3 Rebuild message files 2018-04-20 16:45:16 -07:00
Rachel Fenichel
7679d227df Merge pull request #1782 from google/rc/april_2018
April 2018 release
2018-04-20 09:40:31 -07:00
Andrew n marshall
ab8692652a Revert "Removing namespace declarations for deprecated and unused namespaces. (#1796)" (#1809)
This reverts commit 75459abfdd.
2018-04-20 08:08:11 -07:00
Rachel Fenichel
19dd26ad84 Rebuild 2018-04-19 17:47:30 -07:00
Rachel Fenichel
dba3375742 Move events back up to core, because moving it to a separate folder was a mistake. 2018-04-19 17:45:02 -07:00
Rachel Fenichel
2e83750082 Remove unnecessary conditionals. 2018-04-19 17:44:27 -07:00
Rachel Fenichel
453fa014c7 Create base classes for block and variable events, instead of stuffing everything into Abstract 2018-04-19 17:44:14 -07:00
Rachel Fenichel
c3b5bb2140 Merge pull request #1808 from rachel-fenichel/event_file_churn
Move events back up to core, because moving it to a separate folder was a mistake.
2018-04-19 17:40:44 -07:00
Rachel Fenichel
4a467cef5b Move events back up to core, because moving it to a separate folder was a mistake. 2018-04-19 16:53:19 -07:00
Rachel Fenichel
e4e73e7d60 Merge pull request #1729 from rachel-fenichel/feature/block_event_base
Create base classes for block and variable events
2018-04-19 16:28:53 -07:00
Rachel Fenichel
f23c5c0a38 Rebuild 2018-04-19 16:23:53 -07:00
Rachel Fenichel
5839620a43 Remove unnecessary conditionals. 2018-04-19 16:15:00 -07:00
Rachel Fenichel
d8202f8cae Create base classes for block and variable events, instead of stuffing everything into Abstract 2018-04-19 16:15:00 -07:00
Andrew n marshall
75459abfdd Removing namespace declarations for deprecated and unused namespaces. (#1796)
These namespaces use to contain the original block hue constants,
but were deprecated (via comment, except for procedures) over a year
ago. With the removal of those constants, the declarations were
creating empty, unused objects.
2018-04-18 15:32:26 -07:00
Rachel Fenichel
240daead2a Rebuild compressed 2018-04-18 13:41:56 -07:00
Andrew n marshall
643759a93f Warn if jsonInit() receives a colour attribute without a value. (#1795)
* Warn if jsonInit() receives a colour attribute without a value.
 * Extract colour init code into function.
 * Adding block type name to prior warnings.
2018-04-18 13:37:05 -07:00
Andrew n marshall
2bfff4a335 Warn if jsonInit() receives a colour attribute without a value. (#1795)
* Warn if jsonInit() receives a colour attribute without a value.
 * Extract colour init code into function.
 * Adding block type name to prior warnings.
2018-04-18 13:35:30 -07:00
Andrew n marshall
c52d14ce84 Refactor of checkBlockColourConstant_() (#1798)
Rewrote Blockly.checkBlockColourConstant_(..).
 * Last argument is now the expected value of the constant (replacing
   the `removed` argument). The prevents warnings when a Msg colour
   constant is overridden (the correct way).
 * If a value for the constant is not found, do not warn (#1790).
2018-04-18 13:30:51 -07:00
Andrew n marshall
b56bedbceb Correct block color reference in demos/graph (#1794) 2018-04-18 13:29:02 -07:00