Commit Graph

2876 Commits

Author SHA1 Message Date
Rachel Fenichel
5412adf7e5 Merge pull request #4951 from rachel-fenichel/remove_build_py
Remove deprecated build.py script
2021-06-28 11:13:05 -07:00
Rachel Fenichel
5c48bfc188 Tweak comment 2021-06-28 11:09:01 -07:00
Neil Fraser
9ad50ea98a Fix escape key on all fields. (#4934)
Currently the escape key fails to revert the value.  This is the inherited root of all type-in fields, including number, angle, and note.

Fixes #4910
2021-06-27 23:51:46 -07:00
Rachel Fenichel
2fcdd846be Remove deprecated build.py script 2021-06-24 16:58:28 -07:00
Beka Westberg
13bb9f5bf6 Refactor connect logic (#4880)
* Refactor connect logic.

* Fixup from rebase

* Fix build

* PR Comments
2021-06-18 09:53:43 -07:00
Neil Fraser
292911062e Honour option for collapse in context menu
Currently the ‘collapse’ option is always present, even if flagged off in the inject options.
2021-06-18 08:23:09 -07:00
Neil Fraser
c8bea1ff3a Remove return value from Field dropdownCreate_ (#4915)
These functions have side effects and set all kinds of private fields.  It is misleading for them to return the top-level element, for the caller to assign to a private field.
2021-06-18 08:22:25 -07:00
Monica Kozbial
7b286dbf82 Update the registered component ids (#4898) 2021-06-17 17:50:04 -07:00
Monica Kozbial
7d45b531ac Update toolbox drag target when visibility changes (#4919) 2021-06-17 15:17:36 -07:00
Aaron Dodson
ad7a40dac4 Merge pull request #4927 from gonfunko/flyout-delete
Fixed bug that prevented delete areas from updating when flyout width changed.
2021-06-17 08:54:09 -07:00
Aaron Dodson
50fcdfb7ac Keep horizontal flyout delete area in sync with its bounds. 2021-06-17 15:39:15 +00:00
Aaron Dodson
de220a3ff0 Fixed bug that prevented delete areas from updating when flyout width changed. 2021-06-16 20:08:44 +00:00
Neil Fraser
36d25343f4 Don’t hide insertion marker if it’s already gone
Fixes #2338.

I also looked at having workspace.clear delete any insertion marker, but there doesn’t appear to be a public API for this.  Shouldn’t matter, this should be sufficient.
2021-06-16 11:48:34 -07:00
Aaron Dodson
9fa6b03789 Merge pull request #4925 from gonfunko/copy-paste
Prevent an error beep when copying blocks in Safari.
2021-06-16 11:16:51 -07:00
Aaron Dodson
7a456a048b Prevent an error beep when copying blocks in Safari. 2021-06-16 17:51:36 +00:00
Monica Kozbial
a15bbf1700 Revert #4697 (#4917) 2021-06-16 09:36:39 -07:00
alschmiedt
a46dbb37e7 Fixes workspace scroll bug (#4921) 2021-06-16 08:18:28 -07:00
jschanker
672574b056 Require field name to be string, test changes
* Now throws error for getField/getFieldValue/setFieldValue if provided name is not a string
* Changed error to more specific TypeError
* Type checking and error message moved up to getField
* Tests added/modified to check that non-string types for field names produce type errors
2021-06-16 10:46:05 +01:00
jschanker
62bb663b38 Added tests/setFieldValue error message
* Added tests for getting/setting field (values) when names are not supplied and test for getting a field value, setting it to a new value, and getting it again.
* Added more user-friendly error message for setFieldValue telling the developer that he/she is missing the name rather than Field "undefined" not found.
* Fixed lint error by removing trailing space
2021-06-16 10:46:05 +01:00
jschanker
f9c5260fb0 Added tests/setFieldValue error message
* Added tests for getting/setting field (values) when names are not supplied and test for getting a field value, setting it to a new value, and getting it again.
* Added more user-friendly error message for setFieldValue telling the developer that he/she is missing the name rather than Field "undefined" not found.
2021-06-16 10:46:05 +01:00
jschanker
ee8e282360 Fix #4830 for getting/setting unnamed fields
* Returns null when getting unnamed field (value), throws error Field "undefined" not found when attempting to set value of unnamed field
2021-06-16 10:46:05 +01:00
Aaron Dodson
f9702deab0 Merge pull request #4911 from gonfunko/ipad-useragent
Updated user agent parsing to detect iPads posing as desktop Safari.
2021-06-15 08:33:01 -07:00
Aaron Dodson
289d8ac857 Adjusted line wrapping. 2021-06-15 15:22:51 +00:00
Neil Fraser
0eef4f34f6 'navigator' may be renamed by the compiler.
Use quoted name instead.  Also, navigator doesn't exist in Node, or non-browser environments.
2021-06-14 22:32:55 -07:00
Aaron Dodson
c29afbcd27 Updated user agent parsing to detect iPads posing as desktop Safari. 2021-06-14 22:14:46 +00:00
Monica Kozbial
ff34e067f8 Update positionable jsdoc (#4908) 2021-06-14 13:14:01 -07:00
Monica Kozbial
1931c31aa6 Update JsDoc for IDragTarget (#4907) 2021-06-14 12:19:36 -07:00
Monica Kozbial
34fce2c1cb Moves toolbox cursor styling out of block_dragger (#4896) 2021-06-11 18:02:40 -07:00
Maribeth Bottorff
5a1533d1b0 Creates getLocationAfterMove in BlockDragger (#4905)
* Add getLocationAfterMove method to block dragger

* Renames and addresses comments
2021-06-11 17:32:27 -07:00
Monica Kozbial
a17cb7f12e Adding parameter to dragEnter and dragExit (#4890)
* introduce IDraggable interface
* Add parameter to drag methods in IDragTarget
* combines bubble/drag methods on IDragTarget and IDeleteArea to take an IDraggable element
2021-06-11 12:58:26 -07:00
Neil Fraser
fb170b9052 Remove extra space in generator error message. 2021-06-11 12:12:14 -07:00
Monica Kozbial
8aeb78eff3 Revert bubble dragger logic change and helper name change (#4897)
* Revert accidental change in bubble drag logic

* Revert name change
2021-06-11 11:10:39 -07:00
Monica Kozbial
73b06f14bb Fix bug in Flyout getClientRect (#4901) 2021-06-11 11:10:22 -07:00
alschmiedt
566b14e15f Fixes block dragger after merge (#4895) 2021-06-10 16:54:33 -07:00
Monica Kozbial
2005576036 Add onDragOver and wouldDelete_ to DeleteArea (#4888)
* keep track of state for whether the block or bubble would be deleted for use with drag enter exit

* Check if block and bubble is deletable in IDeleteArea

* Add to jsdoc of IDeleteArea
2021-06-10 16:27:04 -07:00
Maribeth Bottorff
2c15a0dfb1 Merge pull request #4894 from maribethb/clone-coord
Add a clone method to Coordinate
2021-06-10 16:24:41 -07:00
Maribeth Bottorff
777b3f46d6 use clone 2021-06-10 16:17:12 -07:00
Monica Kozbial
e40093dc23 Add API to IDragTarget to prevent block move (#4886) 2021-06-10 16:17:07 -07:00
Maribeth Bottorff
c4f04a7a7b Merge branch 'develop' of github.com:google/blockly into clone-coord 2021-06-10 16:15:25 -07:00
Maribeth Bottorff
f0143b6d6c Add a clone method to Coordinate 2021-06-10 16:12:48 -07:00
Monica Kozbial
0014ad3257 Add id to component interface (#4887) 2021-06-10 16:03:43 -07:00
alschmiedt
9eaca6a1e1 Adds necessary methods for scroll-options plugin (#4893) 2021-06-10 15:50:42 -07:00
Monica Kozbial
77dddca02e Fix bug with updating cursor style in draggers (#4889) 2021-06-10 10:57:09 -07:00
Monica Kozbial
d2579a7369 Add removeComponent to ComponentManager (#4884) 2021-06-09 22:29:33 -07:00
Neil Fraser
96315ad449 Fix removal of spaces near parens inside strings
Extra spaces should only be stripped from the inside of paren tokens.  Parens in strings (and other static content) should not be edited.
2021-06-09 22:16:35 -07:00
Monica Kozbial
d2c61d5735 Prevent uncessary add/remove class calls on cursor during drag (#4885) 2021-06-09 19:20:47 -07:00
Monica Kozbial
11390341b1 Adding IDragTarget support. (#4852) 2021-06-09 13:59:22 -07:00
Neil Fraser
861a981cb6 Remove extra else clauses 2021-06-09 11:41:42 -07:00
Neil Fraser
cff7b359f4 Make comments more consistent. 2021-06-09 11:41:42 -07:00
Neil Fraser
6a6c630f8c Back out variable change. 2021-06-09 11:41:42 -07:00