Commit Graph

8355 Commits

Author SHA1 Message Date
picklesrus
b3ba25ab5c Disable workspace resizing at the beginning of cleanup blocks and re-enable at the end. (#1331) 2017-09-21 16:20:17 -07:00
Ewa
d45d42dad7 Initial checkin for the code for Blockly for the Web codelab (#1273)
* Add Blockly for the Web codelab code

* Adding licences and comments as per review

* Renaming a4/b4 sounds to a5/b5

* Define blocks with defineBlocksWithJsonArray istead of jsonInit
2017-09-21 10:22:47 -07:00
translatewiki.net
a10c686d49 Localisation updates from https://translatewiki.net. 2017-09-21 09:18:02 +02:00
Rachel Fenichel
8050ce929c Code cleanup: widget creation (#1332) 2017-09-20 16:38:13 -07:00
Sam El-Husseini
9c0de1ae8d Avoid IE and Edge re-rendering (#1326)
* Fix wrong width of field_dropdown with an image on Edge / IE

* Avoid re-rendering on IE and Edge by using getBBox().width to compute the text width on those browsers
2017-09-19 15:04:25 -07:00
Eric Rosenbaum
cc8a12a574 Scale Firefox scrolling for mouse only, not trackpad (#1324) 2017-09-19 10:47:23 -07:00
Eric Rosenbaum
d0e1141a9f Add margin only for buttons, not labels (#1322) 2017-09-19 10:46:49 -07:00
Nick Allred
c5be6e1722 Subtract metrics.contentTop from metrics.viewTop so that the flyout does not begin to scroll down once the delta is smaller than the value of metrics.contentTop (#1309) 2017-09-18 13:21:43 -07:00
Rachel Fenichel
dd50dde23d Make dropdowns update correctly when you switch between images. (#1321) 2017-09-18 13:09:07 -07:00
Rachel Fenichel
d4c21cea3a Fix field_image click handler (#1320) 2017-09-18 13:01:19 -07:00
Rachel Fenichel
da6d392878 Allow the toolbox to scroll (#1319)
* Allow the toolbox to scroll

* Switch from onMouseDown to onClick_ for toolbox category taps and clicks.
2017-09-18 12:44:48 -07:00
translatewiki.net
4df4ad9bf4 Localisation updates from https://translatewiki.net. 2017-09-18 13:13:46 +02:00
Rachel Fenichel
e669466475 Code cleanup in FieldDropdown (#1289)
* Helper functions for rendering an image or text option.

* Break showEditor_ into smaller helper functions

* More decomposition, and function comments.
2017-09-15 12:26:39 -07:00
Rachel Fenichel
a3f72c86be Create .github folder and add pull request template and issue template (#1314) (#1317)
* Create .github folder and move CONTRIBUTING.md to the new folder

* Add pull request template and issue template

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md
2017-09-15 11:23:13 -07:00
Neil Fraser
ddd4700e1d Strip licences from compiled code. (#1318) 2017-09-14 17:23:50 -07:00
Rachel Fenichel
05e24497c6 Create .github folder and add pull request template and issue template (#1314)
* Create .github folder and move CONTRIBUTING.md to the new folder

* Add pull request template and issue template

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md
2017-09-14 16:29:30 -07:00
translatewiki.net
fcef4edbfe Localisation updates from https://translatewiki.net. 2017-09-14 07:14:17 +02:00
translatewiki.net
2e8ebc0423 Localisation updates from https://translatewiki.net. 2017-09-11 07:13:39 +02:00
Sam El-Husseini
6e3a2b7218 Fix flyout labels causing flyout scrolling issues (#1301) 2017-09-05 10:26:58 -07:00
Neil Fraser
f34a2c2ed4 Properly escape IDs in procedure generators. (#1305)
Issue #251 and #1304.
2017-09-04 08:51:16 -07:00
Isaac Dunn
f8f807f53c Store Block hue so it can be extracted reliably (#1293)
Adds `Block.getHue()` to retrieve the block colour when set via a hue.
The hue value is stored in the new `.hue_` field, which is null if the colour was set via a hex string.
2017-09-04 08:45:33 -07:00
translatewiki.net
03aa8387d5 Localisation updates from https://translatewiki.net. 2017-09-04 08:56:56 +02:00
translatewiki.net
cba54cbb19 Localisation updates from https://translatewiki.net. 2017-08-31 07:50:29 +02:00
picklesrus
5518873389 Revert "Remove all all instances calling setValue on variable fields with the name instead of the id" (#1296)
* Revert "Create WorkspaceViewport class (#1291)"

This reverts commit 6c00d77c9e.

* Revert "Remove all all instances calling setValue with name. (#1254)"

This reverts commit 8e8b6b27af.
2017-08-28 16:55:44 -07:00
translatewiki.net
0dfaf84aab Localisation updates from https://translatewiki.net. 2017-08-28 07:35:52 +02:00
Rachel Fenichel
6c00d77c9e Create WorkspaceViewport class (#1291)
* Create WorkspaceViewport class

* Update comments

* Move workspace viewport functions back to the workspace for now

* whitespace
2017-08-24 15:51:31 -07:00
marisaleung
8e8b6b27af Remove all all instances calling setValue with name. (#1254) 2017-08-24 14:34:01 -07:00
Rachel Fenichel
62e4730ba5 Add annotations for units to scrollbar.js (#1290)
* Add annotations for units to scrollbar.js

* Update comments
2017-08-24 10:58:16 -07:00
translatewiki.net
ff427043dc Localisation updates from https://translatewiki.net. 2017-08-24 09:22:04 +02:00
Muḥend Belqasem
f60c424351 code demo kab file (#1286)
Kabyle localization Code demo
2017-08-23 12:44:26 -07:00
Rachel Fenichel
00b2b85e8c Decompose the showEditor_ function in FieldTextInput (#1285)
* Explicit annotations

* Decompose the showEditor_ function in FieldTextInput

* Remove extra newline
2017-08-18 15:19:05 -07:00
Rachel Fenichel
2d5f1156d7 Clean up code in FieldTextInput (#1284)
* Clean up code in FieldTextInput

* Explicit annotations

* Remove extra newline
2017-08-18 14:55:40 -07:00
Evan W. Patton
e1e94271c4 Implement Blockly.Events.filter in linear time (#1205)
* Implement Blockly.Events.filter in linear time

For large App Inventor projects (order 1k+ blocks, 100+ top-level
blocks), the O(n^2) behavior of Blockly.Event.filter was causing
performance issues when rearranging blocks or pasting from the
backpack. This commit provides a linear merge implementation using a
key that uniquely identifies a block so that multiple events targeting
the same block are merged. This change benefits from O(1) amortized
lookup using an object as a key-value store.

* Add event filter unit tests and fix logic bugs

* Update Blockly.Events.filter unit tests
2017-08-18 14:18:47 -07:00
Rachel Fenichel
a3586db023 Bring the most recently edited stack to the front at the end of a drag. (#1283) 2017-08-18 14:16:46 -07:00
Rachel Fenichel
b2492dec67 Escape variable names correctly when serializing to XML (#1279) 2017-08-18 11:18:49 -07:00
Andrew n marshall
1956baa963 BlockFactory: Adding JSON/JavaScript import support (#1235)
Updates the BlockFactory main workspace based on the preview block generated from manual construction.

This is a continuation of PR #1216 by @JC-Orozco, rebased on latest develop branch. Bring it latest code up to Google styling and standards.
2017-08-17 12:40:58 -07:00
translatewiki.net
ca7429a91d Localisation updates from https://translatewiki.net. 2017-08-17 15:28:10 +02:00
CoryDCode
29582ba0d7 Fixing no-category toolboxes so they populate immediately, rather (#1255)
than on a timeout.
2017-08-16 16:05:35 -07:00
picklesrus
859d63633e Fix #1275 by adding a more specific rule for overflow:visible on the … (#1280)
* Fix #1275 by adding a more specific rule for overflow:visible on the drag surface svg.  This wins out over a common bootstrap rule that says: svg:not(:root) {overflow:hidden} and helps avoid a difficult problem for Blockly users to diagnose.

* Update css.js
2017-08-15 13:20:51 -07:00
Sam El-Husseini
4c4c8be142 Fix wrong width of field_dropdown with an image on Edge / IE (#1278) 2017-08-14 16:09:27 -07:00
Rachel Fenichel
4b9fc09fed Code cleanup in BlockSvg.prototype.tab (#1277) 2017-08-14 15:34:44 -07:00
translatewiki.net
ed3dffe5d8 Localisation updates from https://translatewiki.net. 2017-08-14 08:11:37 +02:00
translatewiki.net
24e2628423 Localisation updates from https://translatewiki.net. 2017-08-10 07:38:18 +02:00
Tom
a6245f4c6e Compile messages with externs and demo with advanced optimizations (#1259)
* Revert "Fix synonyms when compiled. (#1248)"

This reverts commit f08afbb351.

* Revert "Compatibility for Closure Compiler. (#1240)" [fc8d4c9]

* Adding exports to all messages.

* Fixed missing dependency to Blockly.defineBlocksWithJsonArray()

* Adding a fully compiled demo draft (still simple optimizations).

* Demo optimizations switched to advanced and enabled exports (for Blockly.Msg).

* Message interpolation updated to use the exported (global) Blockly.Msg array.

* Adding some debug compilation options to the build script.

* Adding SVG externs.

* Fixed Blockly.inject's config array to work with compilation.

* Reverting all compiled code.

This fixes commit b307ba1151.
This fixes commit dec6910b67.

* Reverting all compiled code.

This fixes commit 824c806ec3.

* Removing old todo

* Merge commit 'fe96bec765f0eb58c5321101965100c2716760ed' into compile-messages-with-externs

* commit 'fe96bec765f0eb58c5321101965100c2716760ed':
  Fixes positional index for Czech translation (#1264)
  Missed one use of string instead of .property in extensions.js (#1262)
  Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS (#1253)
  Fix type tags and todo placement.
  Procedure block renames variable in mutator if there is a case change.

* Fixes based on review by @NeilFraser
- 80 cols
- using goog.global instead of window
- @export on the same line as messages

* BF: Moving the msg dependency earlier, since Blockly.Msg.en is filling the Blockly.Msg object, which is empty without Blockly.Msg.en (and the rest of the code is using it as Blockly.Msg).

* Updating some texts in the demo's html file to be more descriptive.

* Commenting the debug options in the build, to maximize the optimizations. They are not removed, to allow anybody to turn them on if needed (since they are not documented on the Closure Compiler's REST API pages).

* BF: fixed blocks_compressed.js compilation, as it now requires Blockly namespace to exist.

* SVG externs file updated based on the one in https://github.com/google/closure-compiler/blob/master/contrib/externs/svg.js (eliminating 2 warnings)
2017-08-08 11:16:49 -07:00
vicng
fe96bec765 Fixes positional index for Czech translation (#1264) 2017-08-07 16:54:41 -07:00
translatewiki.net
15d7b70440 Localisation updates from https://translatewiki.net. 2017-08-07 07:18:46 +02:00
marisaleung
98494ad951 Merge pull request #1257 from marisaleung/develop_procedureMutatorRenamesVariables
Procedure block renames variable in mutator if there is a case change.
2017-08-04 14:24:01 -07:00
marisaleung
685a41d599 Merge pull request #1261 from marisaleung/develop
Fix type tags and todo placement.
2017-08-04 13:56:36 -07:00
RoboErikG
26e74f72d6 Missed one use of string instead of .property in extensions.js (#1262) 2017-08-04 11:34:33 -07:00
RoboErikG
fab59facee Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS (#1253)
* Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS

We were using strings to check for the existence of properties on
a mutator, which breaks if those properties were renamed by the
closure compiler. This updates all of the uses to direct function
references so that anyone building with advanced optimizations turned
on will get the correct method references in their mutators.

fixes #1251

* Update to extensions.js for advanced optimizations

Some minor updates to making extensions.js work with advanced
optimizations.

* use === undefined instead of typeof == 'undefined'
2017-08-03 15:18:41 -07:00