Commit Graph

6225 Commits

Author SHA1 Message Date
Christopher Allen
e8eb30fa8b Script to clean release directory
You can now do npm run clean:buildDir, ... clean:releaseDir, or just
... clean, which does both.

The release directory is automatically cleaned before packaging
commences.
2021-06-23 13:07:20 +01:00
dependabot[bot]
56f1c4f36d Bump @blockly/theme-modern from 2.1.17 to 2.1.18 (#4944)
Bumps [@blockly/theme-modern](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-modern) from 2.1.17 to 2.1.18.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-modern@2.1.18/plugins/theme-modern)

---
updated-dependencies:
- dependency-name: "@blockly/theme-modern"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-22 16:17:57 -07:00
dependabot[bot]
b9fec34a85 Bump @blockly/dev-tools from 2.3.0 to 2.4.0 (#4936)
Bumps [@blockly/dev-tools](https://github.com/google/blockly-samples/tree/HEAD/plugins/dev-tools) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/dev-tools@2.4.0/plugins/dev-tools)

---
updated-dependencies:
- dependency-name: "@blockly/dev-tools"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-22 10:31:27 -07:00
Christopher Allen
961319b3eb Script to clean build directory 2021-06-22 18:10:02 +01:00
Christopher Allen
e2c4a9b7f9 Script to copy built files from BUILD_DIR to repository
This is to allow built files to be checked in.
2021-06-22 18:08:23 +01:00
Christopher Allen
25f073d0e3 Build msg/js/*.js langfiles in BUILD_DIR 2021-06-22 12:04:30 +01:00
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
Aaron Dodson
1f6c8f0206 Reflow flyouts when zoom level changes to keep block zoom level in sync. 2021-06-18 20:26:17 +00: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
Aaron Dodson
245a44b030 Merge pull request #4920 from gonfunko/capture-warning
Use captureWarning helper from dev-tools instead of mocha/test_helpers.js implementation
2021-06-17 16:04:23 -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
355c54f70a Use captureWarning helper from dev-tools instead of mocha/test_helpers.js implementation. 2021-06-15 19:10:13 +00:00
Monica Kozbial
e5a2df301a Add msg files (#4918) 2021-06-15 11:27:36 -07: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
Aaron Dodson
8d8309e7e7 Merge pull request #4906 from gonfunko/test-suite
Use selenium-standalone-service to automatically start and stop Selenium when running the test suite.
2021-06-14 14:10:57 -07:00
Monica Kozbial
ff34e067f8 Update positionable jsdoc (#4908) 2021-06-14 13:14:01 -07:00
Aaron Dodson
65339377f4 Moved Typescript to devDependencies. 2021-06-14 19:40:41 +00:00
Monica Kozbial
1931c31aa6 Update JsDoc for IDragTarget (#4907) 2021-06-14 12:19:36 -07:00
Aaron Dodson
5cd2d375ef Updated comment for runGeneratorsInBrowser to refer to Chrome instead of Firefox. 2021-06-14 19:06:28 +00:00
Aaron Dodson
384e88add1 Merge branch 'test-suite' of https://github.com/gonfunko/blockly into test-suite 2021-06-14 11:54:35 -07:00
Aaron Dodson
146840e09f Updated CI config to run new simplified test target. 2021-06-14 18:54:13 +00:00
Aaron Dodson
df7da795a3 Use selenium-standalone-service to automatically start and stop Selenium when running the test suite. 2021-06-14 11:52:49 -07: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
Aaron Dodson
06352c0eea Use selenium-standalone-service to automatically start and stop Selenium when running the test suite. 2021-06-14 17:27:01 +00:00