Commit Graph

1327 Commits

Author SHA1 Message Date
DD
e06807155d Add todo per code review 2018-08-07 18:04:04 -04:00
Rachel Fenichel
2eeee8b9af Stop handling keypresses when the workspace is hidden. 2018-08-07 18:03:23 -04:00
Andrew n marshall
e064a147c7 Create a common helper function for Comment[Create|Delete]) (PR #1988)
Resolves #1871
2018-08-07 12:54:47 -07:00
Rachel Fenichel
341865c80c Merge pull request #1995 from rachel-fenichel/feature/unplug_horizontal
Heal rows when unplugging, and add tests
2018-08-06 11:28:12 -07:00
Rachel Fenichel
b89487e332 Ignore whether parent has multiple inputs 2018-08-06 11:18:00 -07:00
Rachel Fenichel
a8d52903e2 update comment with todo 2018-08-06 10:29:12 -07:00
Dhruv
3ab37dbe46 #1871 Create a common helper function for Comment[Create|Delete] 2018-08-07 00:17:55 +08:00
Neil Fraser
c6afb08c4b Add unit tests and code cleanup to utils (#1993)
* Add unit tests for new util functions
* Utils functions shouldn’t be package, not private.
* Use existing utility function for insertAfter
2018-08-03 14:31:50 -07:00
Rachel Fenichel
b65491e656 Heal rows when unplugging, and add tests 2018-08-03 13:54:29 -07:00
Neil Fraser
6ce31942e0 Some goog.dom removal (#1991) 2018-08-01 15:47:28 -07:00
RoboErikG
99ebefa1bf Revert "Fix #1960 by collecting block info before icons are destroyed" (#1973)
* Revert "Localisation updates from https://translatewiki.net."

This reverts commit c4a0b64945.

* Revert "Fix #1960 by collecting block info before icons are destroyed (#1970)"

This reverts commit 9a3bd45b22.
2018-07-16 10:18:40 -07:00
RoboErikG
9a3bd45b22 Fix #1960 by collecting block info before icons are destroyed (#1970)
The icons in rendered Blockly currently own the comment text. When
a block was deleted the icons were being disposed of before the block
info was recorded in the event, which meant the comment was lost. This
adds some additional logic to block_svg to make sure the event is
captured before the icons are removed.
2018-07-12 15:34:32 -07:00
Neil Fraser
ac2fa96d7f Replace goog.dom.createDom for creating HTML 2018-07-11 12:20:02 -07:00
Neil Fraser
dce60fd152 Replace ReferenceError with Error.
Change to 4-space indentation rather than aligning with parent structure.
2018-07-11 12:20:02 -07:00
Neil Fraser
c51cf0b79c Remove goog.dom.removeNode 2018-07-11 12:20:02 -07:00
Neil Fraser
f802859547 Remove goog.dom.removeChildren
HTML can be nullified with innerHTML, SVG needs a loop.
2018-07-11 12:20:02 -07:00
Neil Fraser
c8e08109f2 Correct requires for goog.style 2018-07-11 12:20:02 -07:00
Neil Fraser
51e86263c7 Correct requires for goog.math.* 2018-07-11 12:20:02 -07:00
Neil Fraser
0583bee502 Correct requires for goog.dom 2018-07-11 12:20:02 -07:00
Neil Fraser
8f7674ea08 Correct requires for goog.events 2018-07-11 12:20:02 -07:00
Neil Fraser
67a18036d0 Fix Travis errors 2018-07-11 12:20:02 -07:00
Neil Fraser
07d1d86283 Remove remaining goog.math 2018-07-11 12:20:02 -07:00
Neil Fraser
284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Neil Fraser
60cce6cd0c Remove goog.math angle functions. 2018-07-11 12:20:02 -07:00
Neil Fraser
eea2794e38 Remove goog.dom.TagName 2018-07-11 12:20:02 -07:00
Neil Fraser
06d90c9b34 Remove goog.array 2018-07-11 12:20:02 -07:00
Neil Fraser
03bf9f5e71 Remove goog.string 2018-07-11 12:20:02 -07:00
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
Andrew n marshall
02dc7b1d1d Fixing JSDoc for the return type of Blockly.WorkspaceComment.parseAttributes (#1966) 2018-07-03 12:07:25 -07:00
Andrew n marshall
cf3f914be8 Moving TODOs out of jsdoc comments. (#1965) 2018-07-03 11:42:40 -07:00
Neil Fraser
13f7e75ffb Supress empty <variables> tag in XML. 2018-06-29 17:52:26 -07:00
Rachel Fenichel
caac6b8324 Merge pull request #1932 from rachel-fenichel/lint/infix_curly
Add curly and space-infix-ops rules
2018-06-25 17:12:44 -04:00
Rachel Fenichel
5b1e249adc Fix lint 2018-06-25 12:12:24 -07:00
Mark Gibson
709d31b729 Fix case of duplicate var (i) 2018-06-19 11:00:24 +01:00
Andrew n marshall
100d9f1a1c Support %{..} in flyout_button (#1927) (#1929)
Expand %{..} references in toolbox <button> and <label>
2018-06-18 11:45:36 -07:00
Neil Fraser
05fcdc3510 Remove goog.Timer 2018-06-12 14:06:10 -07:00
Andrew n marshall
7886d24130 Fixing xml.js: Always throw XML I/O errors; Support parsing in Node (#1911)
* Improved Blockly.XML comments.
 * Support JSDOM as an alternate parser under Node.js
 * Throw standard errors instead of goog.asserts.
 * Adding textToDomDocument_ and override in gulpfile.
2018-06-12 14:03:10 -07:00
Andrew n marshall
2c84161b4a Correct require goog.Timer statements. (#1906) 2018-06-06 15:57:53 -07:00
Rachel Fenichel
bae346963f Remove custom touch handling code for dropdown fields 2018-06-06 12:34:28 -07:00
Andrew n marshall
dc081e3677 Fixed typo (#1899)
Correct name in FieldButton member reference.
2018-06-06 10:42:19 -07:00
Andrew n marshall
e9aae34388 Adaptive popup size for FieldDropdowns (#1897)
Replace the fixed dropdown height with one responsive to the document's viewport.

This is adapted from Bohdan-Tereta's proposed solution:
https://github.com/google/blockly/pull/1483#issuecomment-381638639

It is sub-optimal, in that is does not adapt to field height (variable
due to workspace zoom), and it does not fully utilize the space above
or below the field if the block is near the top or the bottom.
2018-05-31 16:37:09 -07:00
Andrew n marshall
15817e78a1 Fix case where lack of colour attribute results in null. (#1894)
Fixes regression in #1893. Patch on change in #1831.
Verify typeof colour variable before passing through Number().
Missing attributes return null, and Number(null) === 0, resulting in a red hues category color.
2018-05-31 12:31:18 -07:00
Rachel Fenichel
c6b46d854a Fix comment in dragged_connection_manager.js 2018-05-25 10:34:04 -07:00
Rachel Fenichel
e6a875bb02 Make event filtering stricter for events 2018-05-24 17:12:00 -07:00
Rachel Fenichel
68f8639da1 Merge pull request #1888 from rachel-fenichel/cleanup/stepObject
Create and use a Blockly.BlockSvg.PathObject type
2018-05-23 15:44:59 -07:00
Rachel Fenichel
73e6cf1265 Fix undoing a drag to connect 2018-05-23 14:56:41 -07:00
Rachel Fenichel
c1df1c647a Create and use a Blockly.BlockSvg.PathObject type 2018-05-23 11:40:15 -07:00
Rachel Fenichel
206e22e88c Decompose some render functions so they'll be easier to work with 2018-05-22 14:06:51 -07:00
Rachel Fenichel
98f838c0c3 Merge pull request #1878 from rachel-fenichel/bugfix/1380
Fix #1380
2018-05-21 16:11:29 -07:00
Rachel Fenichel
178473e989 Merge pull request #1885 from rachel-fenichel/bugfix/ws_comment_enable_ie
Disable ws comments in IE
2018-05-21 16:11:20 -07:00