Commit Graph

5770 Commits

Author SHA1 Message Date
Christopher Allen
a03cd29b68 Separate script to rebuild msg/json/en.json, qqq.json etc.
There are some files in msg/json/ (currently en.json, qqq.json,
constants.json and synonyms.json) that are generated by
scripts/i18n/js_to_json.py as part of the language file build process
- but this only needs to be done when messages.js is updated and
and usually requires some manual cleanup, so remove this step from the
existing buildLangfiles gulp script and create a separate command
('npm run generate:langfiles') to do this when required.
2021-06-22 10:59:24 +01:00
Christopher Allen
4111073292 Write build output to built/ instead of repository root
I have verified that

   npm run build && npm run package

produces an identical dist/ directory compared to the one produced prior
to this and the previous commit.
2021-06-22 10:59:13 +01:00
Christopher Allen
082fd1fc6f Move build and package directory config into new config.js
Make the destination directories for certain build/package/release
steps more easily (and centrally) configurable.

This only deals with building *_compressed* files;
blockly_uncompressed.js and the various msg/js/*.js files are not
affected by this commit.
2021-06-22 10:55:38 +01:00
Christopher Allen
b348e18dfb Don't use path.join to create globs for gulp.src
Per the gulp documentation[1], globs passed to gulp.src should use '/'
as the path separator regardless of the path separator used on whatever
OS we are running on.

[1] https://gulpjs.com/docs/en/getting-started/explaining-globs#segments-and-separators
2021-06-21 19:13:59 +01:00
Christopher Allen
e65a396809 Revert removal of node v10 from build matrix. 2021-06-14 19:41:12 +01:00
Christopher Allen
f94cb15021 Re-disable CI on macOS
I have been unable to resolve the mocha test issues, so leave macOS
disabled for the moment.
2021-06-14 19:41:12 +01:00
Christopher Allen
f477db2251 Remove unneeded macOS setup
Chrome comes pre-installed on GitHub hosted macOS runners, and while
`Xvfb` does not seem to be installed neither does it seem to be needed.
2021-06-14 19:41:12 +01:00
Christopher Allen
ab33cd567a Update test setup for GitHub Actions
- Do the (hopefully now) correct test to check we are on macOS.
- Fix brew command-line syntax for installing google-chrome.
2021-06-14 19:41:12 +01:00
Christopher Allen
5cc0df775d Reenable CI on macOS
Working on fixing #2114.
2021-06-14 19:41:12 +01:00
Christopher Allen
403f3119a6 Bump node.js versions for CI
Remove v12 and add v16, per https://nodejs.org/en/about/releases/
2021-06-14 19:41:12 +01: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
Neil Fraser
76b5517008 Use null-prototype objects for maps
A {} has a bunch of names already defined on it (like ‘toString’).  When using an object as a map with arbitrary keys, it should not inherit from Object.prototype.
2021-06-09 11:41:42 -07:00
jschanker
53d8754ee9 Remove row healing for block deletion #4832 (#4873) 2021-06-08 17:13:17 -07:00
Monica Kozbial
e3e1089641 ComponentManager API extension (#4875) 2021-06-08 14:03:41 -07:00
Monica Kozbial
8e7cb406f9 Handle overriding components in ComponentManager (#4856) 2021-06-08 12:28:59 -07:00
Monica Kozbial
6f7ead6e9c Fix error caused by extra teardown call (#4877) 2021-06-08 10:19:08 -07:00
alschmiedt
e7bf54e82e Fixes a check in bump into bounds (#4872) 2021-06-08 08:17:00 -07:00
Neil Fraser
5f7fe9096b Use String() over toLocaleString when possible
toLocaleString results in a 4.6% performance penalty when loading the Spaghetti test in Playground.
2021-06-08 06:08:12 -07:00
Beka Westberg
ab5616cff7 Add tests for connecting blocks (#4853) 2021-06-07 08:14:13 -07:00
alschmiedt
e4f15898d0 Update chrome version (#4866) 2021-06-03 17:57:40 -07:00
dependabot[bot]
cd7c24b4ac Bump @blockly/theme-modern from 2.1.16 to 2.1.17 (#4862)
Bumps [@blockly/theme-modern](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-modern) from 2.1.16 to 2.1.17.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-modern@2.1.17/plugins/theme-modern)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-03 16:56:36 -07:00
dependabot[bot]
21d10f9dd0 Bump eslint from 7.26.0 to 7.27.0 (#4860)
Bumps [eslint](https://github.com/eslint/eslint) from 7.26.0 to 7.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.26.0...v7.27.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-03 16:56:13 -07:00
dependabot[bot]
f33814cf44 Bump @blockly/theme-dark from 1.0.6 to 1.0.7 (#4861)
Bumps [@blockly/theme-dark](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-dark) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-dark@1.0.7/plugins/theme-dark)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-03 16:55:44 -07:00
Neil Fraser
c5a7b481bc Code simplifications 2021-06-03 08:23:01 -07:00
translatewiki.net
91fe77e26c Localisation updates from https://translatewiki.net. 2021-05-31 09:59:35 +02:00
Neil Fraser
37a1ee55b8 Remove useless variable declarations in PHP. (#4849) 2021-05-27 21:40:04 -07:00
Neil Fraser
e661c92a36 More JSDoc improvements 2021-05-27 21:30:26 -07:00
Neil Fraser
f64c11d74e Make JSDoc object nullability more strict.
Also make Blockly.utils.deprecation.warn apply to properties.
2021-05-27 21:30:26 -07:00