Commit Graph

8053 Commits

Author SHA1 Message Date
dependabot[bot]
2546b01d70 chore(deps): Bump prettier from 2.8.8 to 3.0.0 (#7322)
* chore(deps): Bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* chore: Reformat using Prettier v3.0 defaults

The main change is to add trailing commas to the last line of
block-formatted function calls.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2023-07-25 14:56:10 +00:00
dependabot[bot]
9fc57a3bfa chore(deps): Bump word-wrap from 1.2.3 to 1.2.5 (#7323)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 15:54:49 +01:00
Rachel Fenichel
c61da55566 fix(tests): fix broken browser tests (#7324)
* fix(tests):broken browser tests

* chore: format

* chore(tests): flip assertion order
2023-07-24 22:10:00 +00:00
Beka Westberg
36ba408b79 fix: have icons use the new render management system (#7296)
* feat: add method for triggering renders

* chore: switch icon methods to use queue
2023-07-24 14:43:14 -07:00
Beka Westberg
786553efb1 chore: update block test dependency (#7313)
* chore: update block test dependency

* chore: bump block test to 5.0.0

* chore: update dev-tools

* chore: bump theme modern dependency
2023-07-24 10:21:51 -07:00
Beka Westberg
9efc0d7dd0 chore: fix renamings (#7312) 2023-07-20 13:50:12 -07:00
Neil Fraser
06ba992206 feat: Allow dragging from simple toolbox (#7301)
fix: Add delay after block connection.  Otherwise it can randomly and silently fail.
2023-07-18 19:36:20 +02:00
ericblackmonGoogle
30ed44558d release: v10.0.2 #7295 and #7297 (#7298) (#7299)
* fix(generators): Changes to exports and access controls for TypeScript compatibility (#7295)

* fix(generators): Add missing declarations for Order enums

* chore(generators): Remove spurious whitespace

* fix(generators): Make provideFunction_ etc. public

  Remove the protected declaration on provideFunction_ and
  FUNCTION_NAME_PLACEHOLDER_ so they can be used from generator
  functions written in TypeScript.

  Not strictly part of #7283, but closely related and required to
  fixing the related issue google/blockly-samples#1785.

* chore(generators): format

(cherry picked from commit d503fbb409)

* fix: Correct errors in `HSV_SATURATION`, `HSV_VALUE` accessors (#7297)

* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  https://github.com/google/blockly/pull/7249#issuecomment-1638645810

* chore: Add renamings for HSV_SATURATION, HSV_VALUE

(cherry picked from commit 1bc4f67d78)

* release: Update version number to 10.0.2

---------

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2023-07-17 16:51:30 -04:00
Beka Westberg
abb82a2f91 chore: add tests for disabling blocks (#7279)
* chore: add tests for disabling blocks

* chore: update asserts to be one line

* fix: test setup
2023-07-17 13:28:03 -07:00
Christopher Allen
1bc4f67d78 fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors (#7297)
* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  https://github.com/google/blockly/pull/7249#issuecomment-1638645810

* chore: Add renamings for HSV_SATURATION, HSV_VALUE
2023-07-17 21:00:06 +01:00
Christopher Allen
d503fbb409 fix(generators): Changes to exports and access controls for TypeScript compatibility (#7295)
* fix(generators): Add missing declarations for Order enums

* chore(generators): Remove spurious whitespace

* fix(generators): Make provideFunction_ etc. public

  Remove the protected declaration on provideFunction_ and
  FUNCTION_NAME_PLACEHOLDER_ so they can be used from generator
  functions written in TypeScript.

  Not strictly part of #7283, but closely related and required to
  fixing the related issue google/blockly-samples#1785.

* chore(generators): format
2023-07-17 20:40:27 +01:00
Christopher Allen
82a775a982 test: Basic Blocks: verify drag blocks works properly (#7291)
* refactor(tests): Have testSetup accept a URL

  Have testSetup accept a URL.  Make testFileLocations a dictionary
  whose values are URLs, and change the spellings of the keys to
  be CONSTANT_CASE.

  This allows tests to specify their own URL, or to add a query or
  fragment.

* feat(tests): Add getAllBlocks helper

* test: Verify drag blocks works properly

* chore(tests): Reformat comments

  Manually reformat comments to comply with styleguide.
2023-07-14 15:51:38 +01:00
Beka Westberg
8355351898 fix: add compose and decompose errors to mutator icon (#7289)
* fix: add compose and decompose errors to mutator icon

* chore: format
2023-07-13 17:18:48 -07:00
Rachel Fenichel
741e8dbebb chore(tests): Add tests for adding and removing comments (#7284)
* chore(tests): Add tests for adding and removing comments

* chore(tests): respond to PR feedback
2023-07-13 13:57:38 -07:00
ericblackmonGoogle
a940dc5671 chore: Added test for loading json and interblock deletion (#7282)
* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion

* chore: Added test for loading json and interblock deletion
2023-07-12 11:22:59 -04:00
Rachel Fenichel
6b3803e68f chore(tests): Add documentation to browser test helper functions (#7280)
* chore(test): release strictness of jsdoc parsing in browser tests

* chore(tests): add jsdoc to browser test helper functions

* Update tests/browser/test/test_setup.js

Co-authored-by: Beka Westberg <bwestberg@google.com>

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2023-07-11 21:43:53 +00:00
ericblackmonGoogle
cae721e968 chore: create test for undo block movements and editing a field (#7272)
* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field

* chore: create test for undo block movements and editing a field
2023-07-11 12:51:04 -04:00
Beka Westberg
b1045a27b0 chore: remove extra waits and shorten necessary ones (#7259) 2023-07-11 09:24:01 -07:00
Rachel Fenichel
c7d0610ed0 feat(tests): add right click tests and helpers (#7262)
* feat(tests): add test for collapsing block

* chore: format

* chore: format

* feat(tests): add right-click tests and helpers

* chore(tests): respond to review feedback
2023-07-10 14:24:30 -07:00
John Nesky
75ea8d9941 fix: disposing workspace comments. (#7264)
* fix: disposing workspace comments.

* whitespace formatting
2023-07-10 09:18:42 -07:00
ericblackmonGoogle
bb7697faa2 chore: Merge master into develop following v10.0.1 release
Merge pull request #7271 from google/master
2023-07-10 16:05:09 +00:00
ericblackmonGoogle
20423346b8 release: v10.0.1
Merge pull request #7270 from google/rc/v10.0.1
blockly-v10.0.1
2023-07-10 15:47:14 +00:00
dependabot[bot]
f0f72c0155 chore(deps): Bump tough-cookie from 4.1.2 to 4.1.3 (#7265)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 08:42:00 -07:00
Eric Blackmon
82e8697143 :release: Update version number to 10.0.1 2023-07-10 11:31:34 -04:00
Christopher Allen
2d7ec49175 fix: Restore HSV_SATURATION and HSV_VALUE accessors and deprecate (#7249)
* fix: Restore HSV_SATURATION and HSV_VALUE accessors

Contrary to the notice at the top of the `Object.defineProperties`
call, these were not actually marked as deprecated, and their
removal in Blockly 10.0.0 constituted an avoidable zero-notice
breaking change.

* deprecate: Add deprecation notices for HSV_SATURATION and HSV_VALUE

DEPRECATION:

Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and
will be removed in a future version of Blockly.  Use
Blockly.colour.getHsvSaturation / Blockly.colour.setHsvSaturation
and Blockly.colour.getHsvValue / Blockly.colour.setHsvValue instead.

(cherry picked from commit a677355f73)
2023-07-10 11:30:40 -04:00
Beka Westberg
28b08ea306 chore: add css classes to individual zoom controls (#7261) 2023-07-07 14:19:17 -07:00
Christopher Allen
aefb97d780 fix(tests): Make test imports correct and more consistent (#7260)
* fix(tests): Fix invalid import paths in mocha tests

  This resolves the warnings generated during buildDeps by
  closure-make-deps.

  This commit does not attempt to address #7224 or otherwise
  rationalise the imports and usage thereof.

* fix(tests): Fix failing context menu item test

  Test appears to have been wrong: Block.prototype.getIcon is typed
  as

      getIcon<T extends IIcon>(/* ... */): T | undefined

  and documented as "@returns The icon with the given type if it
  exists on the block, undefined otherwise."

* refactor(tests): Clean up inconsistent usage of CommentIcon

  Tweak the test files touched by PR #7200 to be consistent with
  existing usage of Blockly.icons.CommentIcon instead of importing
  this separately.
2023-07-07 17:15:03 +01:00
Beka Westberg
07ba841850 chore: add test helpers for connecting blocks (#7258)
* chore: get procedure test passing on linux

* chore: cleanup

* chore: format
2023-07-06 15:35:58 -07:00
Beka Westberg
eb4025bb61 chore: fix problems from rebase (#7257) 2023-07-06 13:13:58 -07:00
Beka Westberg
956b72ad5c chore: add test helpers for getting blocks from the toolbox (#7255)
* chore: add test helpers for getting blocks from the toolbox

* chore: format

* chore: switch to use getBlockType

* chore: format

* chore: restore teardown
2023-07-06 18:08:29 +00:00
Rachel Fenichel
f1e0e11312 feat(test): add helper functions for getting selected block and block… (#7254)
* feat(test): add helper functions for getting selected block and block by ID

* chore: format test files

* chore: fix lint
2023-07-06 17:30:53 +00:00
Christopher Allen
a677355f73 fix: Restore HSV_SATURATION and HSV_VALUE accessors and deprecate (#7249)
* fix: Restore HSV_SATURATION and HSV_VALUE accessors

Contrary to the notice at the top of the `Object.defineProperties`
call, these were not actually marked as deprecated, and their
removal in Blockly 10.0.0 constituted an avoidable zero-notice
breaking change.

* deprecate: Add deprecation notices for HSV_SATURATION and HSV_VALUE

DEPRECATION:

Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and
will be removed in a future version of Blockly.  Use
Blockly.colour.getHsvSaturation / Blockly.colour.setHsvSaturation
and Blockly.colour.getHsvValue / Blockly.colour.setHsvValue instead.
2023-07-05 09:04:49 -07:00
jayway
57fdb71ad9 fix: set flyout visbility on calling setExpanded (#7199)
* fix: set flyout visbility on calling setExpanded

* move setVisible to only set false when category is no longer expanded
2023-07-05 08:24:03 -07:00
Maribeth Bottorff
fa58cbaaf7 chore: update app engine version names (#7231) 2023-06-30 14:12:48 -07:00
Beka Westberg
a2672a4fe6 chore: delete drag surface files (#7216) 2023-06-29 14:00:24 -07:00
Rachel Fenichel
2d27105e3c chore: delete unused fuction clearTransformAttributes_ (#7229) 2023-06-29 13:54:37 -07:00
Rachel Fenichel
55decfe7c9 chore: delete unused function getFirstStatementConnection (#7228) 2023-06-29 20:37:10 +00:00
ericblackmonGoogle
93126df164 Merge pull request #7223 from google/master
chore: Merge master back into develop following v10.0.0 release
2023-06-28 20:36:22 +00:00
ericblackmonGoogle
d832085c40 Merge pull request #7222 from google/rc/v10.0.0
release: v10.0.0
blockly-v10.0.0
2023-06-28 19:46:53 +00:00
Eric Blackmon
241c9632cf release: Update version number to 10.0.0 2023-06-28 15:25:32 -04:00
Eric Blackmon
fb95ae6f72 release: Merge branch 'develop' into rc/v10.0.0 2023-06-28 15:23:21 -04:00
ericblackmonGoogle
4b563c1503 chore: update renamings file for new release (#7219)
* chore: update renamings file for new release

* chore: update renamings file for new release

* chore: update renamings file for new release
2023-06-28 15:20:40 -04:00
ericblackmonGoogle
86053a4ba6 chore: Update metadata for 2023 Q2 release (#7221) 2023-06-28 15:19:45 -04:00
Christopher Allen
6670db1f2d chore(messages): Update messages (#7220)
* chore(messages): npm run messages

  This is the raw changes made by `npm run messages`, without any
  manual reverts / backporting.

* fix(messages): Backport TranslateWiki hints (with edits)

  Backport changes made to qqq.json by TranslateWiki editors to
  messages.json, with some modifications.

  See https://translatewiki.net/wiki/Template:Optional for details
  of how the {{Optional}} template works.

* chore(messages): Apply backported messages.js changes to qqq.json

  Also manually revert deletion of translation credits.
2023-06-28 15:13:28 -04:00
ericblackmonGoogle
6732b097fa chore: Rollup of 2023 Q2 updates from TranslateWiki (#7217) 2023-06-28 15:10:49 -04:00
Rachel Fenichel
e2cd1bad24 chore: remove js-green-licenses (#7201) 2023-06-27 13:36:06 -07:00
Beka Westberg
452abd4b93 chore: add setVisible (#7214)
* chore: add setVisible

* chore: format
2023-06-27 13:09:10 -07:00
Christopher Allen
e49c028c84 fix(demos): Update to use new script import names for generators (#7213)
This is mostly just chore updating to the new import names
(e.g. BlocklyJavaScript -> javascript.javascriptGenerator),
but the change to Code.checkAllGeneratorFunctionsDefined is
a necessary fix due to the breaking change in PR #7150,
implementing the .forBlock dictionary.
2023-06-27 17:50:36 +01:00
Christopher Allen
5579098e35 fix(demos): Update BlockFactory generator stub generator (#7211)
Update the BlockFactory block generator function stub generator
to apply recent changes in generator function best practices:

- Use languageGenarator instead of Blockly.Language.
- Put generator functions in .forBlock dictionary.
- Accept (and use) a second argument that is the calling
  CodeGenerator object.
- User Order.ATOMIC enum instead of ORDER_ATOMIC.

Also:

- Prefix (e.g.) javascriptGenerator and Order with "javascript.".
- Use template literals where useful.
- DRY up all the non-special field stub code generation.
2023-06-27 14:36:15 +01:00
Beka Westberg
b189b1989c chore: deprecate minimalist renderer (#7210)
* chore: deprecate the minimalist renderer

* chore: add renamings
2023-06-26 14:30:06 -07:00