Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Fable func refactor (#22)
Browse files Browse the repository at this point in the history
* Storing procedures is now possible

* Added confirmation window when overriding

* Master update (#20)

* Avoid crashing when a procedure input has an empty string (google#2182)

Fixes google#1958

This will drop the input when it's in the empty string state. This
causes the block to remove the input and re-add it when the text
is reverted, but prevents the breakage. A followup fix should leave
the input alone instead of removing it, but this works for now.

* Added message for running local_build.sh from correct folder.

* Changes in comment.

* Comment out removing tmp directory for testing

* Debuggin

* Fix generator tests

* Bump version number on develop

* Updated Comments.

* Add error message for when style is not set

* Remove use of style variables in block definition

* Fixing review comments

* Update the style on blocks in the mutator

* Fixed scrolling horizontal flyouts with mousewheel.

* Changed callback to be looked up dynamically when the button is clicked.

* Localisation updates from https://translatewiki.net.

* Changed how bubbles position themselves.

* Fixed RTL mistake.

* Fixes refresh on simple toolbox withno categories

* Fix failing test

* Localisation updates from https://translatewiki.net.

* Fixing review comments

* Prevent duplicate parameters in functions (google#2177)

Prevents the coder from using duplicate parameters names in functions.

In the validator function check for parameter names that have been used. If it finds a block with a name that matches return null so that it will revert the change. Also change the name each time a new parameter is created to try to prevent duplicate name.

* Updated createZoomSVG comments.

* Changes names for block styles

* Enable insertion markers

* First pass at creating mocha tests

* Add jsunit->chai assert converters, and block tests

* More testing with mocha

* Skip two broken test suites

* Changes Blockly style to be Blockly theme.

* Remove dependenceis and use unpkg

* Delete commented-out code

* Go back to run_all_tests.sh for npm test

* Fix eslint errors with in-file comments

* Fixes problem with hat style

* Adds hat style

* Adds support for category styles

* Add eslintrc to mocha directory

* Fixes error thrown for style defined inline

* Small fixes

* Added flipRtl Support for FieldImages (google#2203)

* Added flipRtl support for FieldImages. Added a flipRtl test block.

* Added blockfactory support.

* Fixed JSDoc.

* Fixing review comments

* Final fixes

* Added displaying flyout horizontally when layout is horizontal.

* Fixed comments not being recorded in delete event. (google#2211)

* Remove old eslintrc and use .json for mocha eslintrc

* Fixing compiler error for blockly themes

* Remove unnecessary scripts

* Moved theme scripts out of core

* Adding compressed files

* Adding accessible uncompressed

* Access colours using bracket notation

* Localisation updates from https://translatewiki.net.

* local_build: Add build for local_blocks_compressed.js (google#2204)

* local_build.sh: Add generation of local_blocks_compressed.js

* Added comments to local_build.sh

* Ignore insertion markers when checking remaining capacity

* Added a Finished Loading event.

* Updated blockly_uncompressed file.

* Update copyright year

* Fixed Xml goog.require's. Changed Blockly.Events.Ui functions to Blockly.Events.FinishedLoading.

* Changed require's to be in correct lexicographical order.

* Changed trashcan and zoom controls to be positioned in the opposite corner of the toolbox. Fixed trashcan hotspot being incorrect.

* Added the ability to drag disabled blocks out of the trashcan flyout.

* Changed the trashcan lid to always open towards the workspace.

* Ignore insertion markers in getAllBlocks; add accessors for inseriton markers

* Removed render_ call, which was causing fields to calculate their size incorrectly.

* Localisation updates from https://translatewiki.net.

* Update procedures.js

When I use [Rename variable...] in procedure definition block.
The argument name for calling procedure has not changed.

* Use a real JS array for the connection DB.

Previously “Array.isArray(connectionDB)” was false, even through “connectionDB instanceof Array” was true.

* Added a test block for a dynamic dropdown.

* Localisation updates from https://translatewiki.net.

* Update connection_db_test

* New label and title case

* Fix event description for theme

* Fixed comments and defaults.

* Update to latest Closure Template jars, recompile.

There was a small chance that the existing Soy jar files contained a denial of service vulnerability.  Not that this affects Blockly in any way.
https://buganizer.corp.google.com/issues/123937301

* Typo fix in code comment (google#2269)

"independent" instead of "independant".

* Changes colour names

* language-neutral text -> language-neutral id

* Check against healing child shadow blocks.
Fixes google#2227, healing values.
Also applies to shadow next blocks.
Added a playground test block group with a shadow statement.

* Fixed next blocks not being disabled in flyout. (google#2278)

* Fixed horizontal scrolling on window resize.

* Fixed flyout scrollbars not being repositioned on window resize.

* Update dependencies

* Changed flyout setter/change blocks so the selected variable is the most recently created one.

* Changed for dynamic variables as well.

* Rebuild

* Add new message

* Fixed multiple trashcans on the same page leaking state.

* Localisation updates from https://translatewiki.net.

* Fix insertion marker flickering on value inputs (PR google#2295)

Merge from rachel-fenichel/bugfix/2255

* Fix insertion marker flickering on value inputs

* Rebuild and update version numbers

* Fixed multiple trashcans on the same page leaking state.

* rebuild after cherry-pick

* Fixed bubble positioning to work with simple toolboxes (PR google#2279)

Merge from BeksOmega/fixes/BubbleSimpleToolbox

* Update version number

* Localisation updates from https://translatewiki.net.

* Movement Updates (google#2247)

This is a squash and merge of a large set of changes by @BeksOmega 

* Added functionality to scrolling, dragging, and zooming.

* Fixed incorrect changes to workspaceChanged function.

* Fixed comment.

* Fixed typo.

* Removed scrollbar.set calls from workspace_svg.

* Removed scrollbar.resize() call.

* Added move options to playground.

* Fixed scroll_ calls that replaced scrollbar.set calls.

* Removed this.scrollbar checks.

* Changed zoom so that it always zooms towards the coordinates. Changed isContentBounded_ to be separate from isMovable_ (b/c of the previous change zoomControls had to be added to the bounded check). Fixed scroll_() calls... again.

* Changed procedures so the Highlight definition option is only available if the workspace is moveable.

* Fixed scrollCenter so that it works with flyout toolboxes.

* Fixed zoomToFit so that it works with horizontal flyout toolboxes.

* Fixed Typo.

* Fixed bumping blocks when the workspace is not movable.

* Fixed bumping not working with left and top toolbox positions.

* Re-Added not allowing scrollCenter if the workspace is not movable. Disabled scrollCenter button for this case.

* Cleaned up formatting.

* Fixed bumping... again. Reformatted workspaceChanged a bit.

* Changed blocks to be completely bumped into the workspace.

* Reorganized metrics-getting for workspaceChanged.

* Added bumping workspace comments. Moved event checking.

* Renamed workspaceChanged to bumpObjects.

* Added a bumpObjects developer reminder.

* Added warning to zoomToFit.

* Cleaned up some text.

* Added better inline documentation.

* Fixed up inline docs.

* Cleaned up comments.

* Fixed zoomCenter not actually zooming towards the center.

* Fixed zoomControls error on unmovable bottom-toolbox workspaces

* Fixed programatically placing blocks in an unmovable workspace.

* Removed unnecessary translate call in inject.

* Reversed removal of translate. (apparently it was necessary)

* Cleaned up code in response to first round of reviews.

* Added unit comments to the zoom function.

* Removed bumpObjectsEventChecker. Added BUMP_EVENTS list to Blockly.Events.

* Changed getWorkspaceObjectMetrics call to getBoundingRectangle().

* Fixed utils.mouseToSvg (was causing problems with zoom on wheel if the page was scrolled).

* Fixed zoom when page is scrolled (actually this time). Reverted changes to utils.mouseToSvg.

* Fixed centerOnBlock.

* Added unit docs to translate. Moved setting the grid position to the translate function.

* Added TODO's.

* Disable orphaned mutator blocks. (google#2304)

* Correcting jsdoc tag spacing (PR google#2303)

* Fix hat logic

* Fixes block input sticking to the screen when navigated away.

* Added scroll delta mode constants.

* Add dropdowndiv file

* Use dropdown div for colour field

* Use dropdown div for dropdowns

* Readded the toolbox click subscriber. Added preventing propagation to the toolbox click subscriber. Added clearing touch identifier to the document click subscriber.

* Fix error by init of dropdown in case the value is "" (google#2308)

I have following dropdown options

```
[
    ["no matter", ""]
    ["Update", "true"]
    ["Command", "false"]
]
```
In case my value is "" the text is not filled with "no matter" by the initial draw and the empty selector is shown. I expect the text "no matter"

This PR fixes that

* Changed absolute metrics to avoid simple toolboxes.

* Localisation updates from https://translatewiki.net.

* Use dropdowndiv for field colour but not field dropdown

* Add require and rebuild for travis

* css cleanup

* Use dropdownDiv for the angle field as well

* Add click target property to fields, with accessor

* Removed accessing private flyout.width_ variable.

* Removed console log.

* Added event filtering to workspaceChanged in mutator. (google#2320)

* Clarify some dropdown rendering code

* Fixed scroll event binding to work with multiple workspaces.

* Don't try to bump if the object has already been deleted.

* Use constants for dropdown div colours in the colour field

* Update toolbox.js

Changed style attribute to categorystyle.

* Update playground.html

* Ran build.py

* Removed build changes

* Reset blockly_compressed

* Missed a few reversions

* blockly_compressed was still off.

* Localisation updates from https://translatewiki.net.

* Fix issue 2061 (google#2326)

* Reverts changes to fix bug with selecting dropdown

* Localisation updates from https://translatewiki.net.

* Add a playgound for debugging SVG paths

* Localisation updates from https://translatewiki.net.

* Fixed updateToolbox not properly updating flyouts. (google#2332)

* Localisation updates from https://translatewiki.net.

* Fixed setTheme so it doesn't error when no workspace is created

* Refactor setTheme

* Add private annotation

* Add license; translate the group, not the start point of the path

* Delete bad translation

This translates back as “% 1 is the name of the renamed variable” which is the translator’s description, not the message.

* Fix comment on new message.

/// is needed to indicate translator message.

* Prevent gestures from being broken by zoom/scroll.

* Lint issues found while debugging.

* Routine recompile

Closure changed, this clears an error.

* Remove Python references in Dart math generator
Resolves google#2329
Commit in develop branch

* Localisation updates from https://translatewiki.net.

* Fixed trashcan flyout positioning.

* Ignores urls for eslint

* Listener functions are no longer wrapped opaquely.

* Add comment regarding async nature of listening.

* Failing unit tests no longer show useful info.

* Fix JSDoc

* Delete bad translation

This translates back as “% 1 is the name of the renamed variable” which is the translator’s description, not the message.

* Line length

* Remove Blockly.WidgetDiv.position

Nobody appears to call it.

* Make drag detection more robust.

Previously, one could drag (and hold) a quark outside the bounds of a mutator bubble, then scroll, and the old code wouldn’t query the mutator for gestures.

* Consistent speling.

* No need to check non-null before nullifying

* Use hashes instead of objects.

* No keyboard access to quarks during drag.

Same issue as zooming with the mouse wheel.

* Fix @return JSDocs.

* More comprehensive approach to gesture detection.

Search all workspaces.  The flaw with looking at the workspace of the selected block is that dragging a workspace is a gesture but has no selected block.

* Corrections to JSDoc comments

* Don’t drop newValue from bubble open events.

* Update help URLs to be https.

* Localisation updates from https://translatewiki.net.

* Update selected menu sizing to fix google#2351 (google#2353)

* Adds check for a targetConnection

* Fixes test case for unplug

* Rename WorkspaceSvg.getFlyout_ (google#2357)

* Develop1709 (google#2358)

* Remove Python references in Dart math generator
Resolves google#2329
Commit in develop branch

* first commit for Thomas

* Created entry for custom-dialogs
Part of issue google#1709

* icon.png for custom dialog demo added

* Localisation updates from https://translatewiki.net.

* Hides chaff on document mouseup

* Fixes bumping too much when in RTL

* Fix margins/checkbox in RTL dropdown menus (google#2356)

Fixes google#2337 by adding in correct positioning for RTL selected states
and fixing an incorrect margin value.

* Common prefix for test blocks

Fixes google#2103.

This will break any saved XML involving the playground’s test blocks.  I don’t think any such XML exists on this planet.

* Localisation updates from https://translatewiki.net.

* Updates function call

* typo fix in line 134 of field.js for documentation

* Rebuild

* Reverts hideChaff fix

* Fixed Mutator Flyout Being Positioned Incorrectly RTL (google#2378)

* Fixed mutator flyout being positioned incorrectly.

* Changed flyout_horizonal and flyout_vertical to check this.targetWorkspace_.toolboxPosition instead of targetWorkspaceMetrics.toolboxPosition.

* rebuild

* Update version number to 1.20190419.0

* Fix style matching in Firefox 67

Chrome returns ‘transform: translate(107px, 0px);’ whereas Firefox now returns ‘transform: translate(107px);’ if the y value is 0.  This is consistent with existing behaviour in the translate SVG attribute.

The comment in our code specifically states:
// Accounts for same exceptions as XY_REGEX_
Yet that was not true at all.

This PR makes the y argument optional (as falsely described in the comment).  It also merges the 2D and 3D regeps together to simplify the code.

Resolves issue google#2482.  Needs to be cherrypicked to Master and everything rebuilt and pushed.

* Recompile to pick up XY regex fix.

* Set node version explicitly for travis on master

* Fixed issues with merge

* Small bugfixes

* Added search functionality

* Added optional check for dropdown search

* made optinal param false by default

* Initial logic

* Fixed bugs with deleting blocks

* Checkmark

* Merge

* Fixes to search logic

* Bug fixes

* Bug fixes with insertion markers

* Bug fixes to search logic

* Search improvement - custom search terms added

* Major search optimizations. Hardcoded keywords.

* Search refactor

* Search keywords added

* Added a clearAll for when changing the toolbox

* Bugfix when not adding chars to search. Comments and refactoring.

* Fable Functions refactored

* Added an important TODO

* moved custom dialog stuff into blockly
  • Loading branch information
ivml authored Dec 11, 2019
1 parent bfeb3de commit b15de07
Show file tree
Hide file tree
Showing 183 changed files with 9,713 additions and 1,947 deletions.
68 changes: 0 additions & 68 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"code": 100,
"tabWidth": 4,
"ignoreStrings": true,
"ignoreRegExpLiterals": true
"ignoreRegExpLiterals": true,
"ignoreUrls": true
}
],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ npm-debug.log
tests/compile/main_compressed.js
tests/compile/*compiler*.jar
local_build/*compiler*.jar
local_build/local_*_compressed.js
local_build/local_blockly_compressed.js

blockly_compressed.js
Expand All @@ -26,4 +27,4 @@ lua_compressed.js
php_compressed.js
python_compressed.js

msg/js/*.js
msg/js/*.js
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: node_js
matrix:
include:
- os: linux
dist: trusty
node_js: stable
sudo: required
addons:
apt:
packages:
- google-chrome-stable
os: linux
dist: trusty
node_js:
- 8
- 10
sudo: required
addons:
apt:
packages:
- google-chrome-stable
# TODO (#2114): reenable osx build.
# - os: osx
# node_js: stable
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Make a pull request on the GitHub website. Select the remote master branch (in t
It can turn out to be a mess, so keeping branches of all changes is necessary.

Alternatively, use this:
https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository
https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository
2 changes: 1 addition & 1 deletion appengine/app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
application: blockly-demo
version: 1
version: 20190419
runtime: python27
api_version: 1
threadsafe: no
Expand Down
4 changes: 2 additions & 2 deletions appengine/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ BlocklyStorage.monitorChanges_ = function(workspace) {
var xmlText = Blockly.Xml.domToText(xmlDom);
if (startXmlText != xmlText) {
window.location.hash = '';
workspace.removeChangeListener(bindData);
workspace.removeChangeListener(change);
}
}
var bindData = workspace.addChangeListener(change);
workspace.addChangeListener(change);
};

/**
Expand Down
8 changes: 4 additions & 4 deletions blocks/colour.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Colour",
"colour": "%{BKY_COLOUR_HUE}",
"helpUrl": "%{BKY_COLOUR_PICKER_HELPURL}",
"style": "colour_blocks",
"tooltip": "%{BKY_COLOUR_PICKER_TOOLTIP}",
"extensions": ["parent_tooltip_when_inline"]
},
Expand All @@ -66,8 +66,8 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "colour_random",
"message0": "%{BKY_COLOUR_RANDOM_TITLE}",
"output": "Colour",
"colour": "%{BKY_COLOUR_HUE}",
"helpUrl": "%{BKY_COLOUR_RANDOM_HELPURL}",
"style": "colour_blocks",
"tooltip": "%{BKY_COLOUR_RANDOM_TOOLTIP}"
},

Expand Down Expand Up @@ -96,8 +96,8 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Colour",
"colour": "%{BKY_COLOUR_HUE}",
"helpUrl": "%{BKY_COLOUR_RGB_HELPURL}",
"style": "colour_blocks",
"tooltip": "%{BKY_COLOUR_RGB_TOOLTIP}"
},

Expand Down Expand Up @@ -127,8 +127,8 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Colour",
"colour": "%{BKY_COLOUR_HUE}",
"helpUrl": "%{BKY_COLOUR_BLEND_HELPURL}",
"style": "colour_blocks",
"tooltip": "%{BKY_COLOUR_BLEND_TOOLTIP}"
}
]); // END JSON EXTRACT (Do not delete this comment.)
Loading

0 comments on commit b15de07

Please # to comment.