Commit Graph

7972 Commits

Author SHA1 Message Date
Beka Westberg
01ecf547f4 fix: overwriting flyout def with dynamic categories (#6913)
* fix: overwriting flyout def with dynamic categories

* chore: revert playground testing

* fix: change createFlyoutInfo_ to be recursive
2023-03-22 15:25:47 -07:00
Beka Westberg
d897cdcf1d fix: remove forced rerender from mutator 2023-03-22 21:43:57 +00:00
dependabot[bot]
00dae595ff chore(deps): bump typescript from 4.9.5 to 5.0.2 (#6908)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.5...v5.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 16:36:10 +00:00
Beka Westberg
a7d250cb78 fix: flyouts resizing for blocks (#6914)
* fix: flyouts resizing for blocks

* chore: fix node build

* chore: actually fix node
2023-03-21 15:27:04 -07:00
Beka Westberg
252b204adb fix: scrolling dropdown items into view (#6912)
* fix: scrolling dropdown items into view

* chore: lint
2023-03-21 10:00:40 -07:00
Aaron Dodson
cbb3829707 fix: Fix scrolling of menus on mobile. (#6911) 2023-03-20 15:27:51 -07:00
dependabot[bot]
40b454fb2f chore(deps): bump @typescript-eslint/eslint-plugin from 5.50.0 to 5.55.0 (#6909)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.50.0 to 5.55.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.55.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  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>
2023-03-20 17:43:58 +00:00
Beka Westberg
ed531ec313 chore: remove all namespace comments (#6903)
* chore: remove all namespace comments

* chore: fix lint
2023-03-20 09:43:58 -07:00
dependabot[bot]
5cdd2bf65f chore(deps): bump peter-evans/create-pull-request from 4.2.3 to 4.2.4 (#6910)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](2b011faafd...38e0b6e68b)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  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>
2023-03-20 09:06:08 -07:00
Christopher Allen
bb9f31853d refactor(blocks): Migrate blocks/math.js to TypeScript (#6900)
* refactor(blocks): Auto-migration of blocks/math.js to ts

  This is just the result of running js2ts on this file.

* fix(blocks): Manually migrate & fix types in math.ts

* chore(blocks): clang-format math.ts

* fix(blocks): Corrections for comments on PR #6900

* refactor(blocks): Define types for mixin-ed blocks, etc.

  Define types to represent the union of Block and each of the
  *_MIXINs, and use these types for the type of this in mixin
  methods.

* refactor(blocks): Misc minor changes

  Make sure validator functions explicitly return undefined.
  Field.prototype.setValidator takes a FieldValidator<T>, which
  must be a non-void function.  I'm not sure why tsc was not
  objecting to the void implementation here, but it does in
  other very similar situations so for consistency explicitly
  return undefined to signal the value should be used unchanged.

  Also undo previous change of !. to ?.: I think it wisest to
  try to preserve the existing behaviour as exactly as possible
  for now, and make behaviour changes (i.e., ones that affect
  the generated code) separately.

* fix(blocks): Fix erroneous typing of mixins

  It turns out that the previous types for these were completely
  wrong, for two reasons:

  - They should be intersection types (which have the union of the
    properties), not union types (which have the interseciton of the
    properties).
  - The *_MIXIN types were already declared as having type
    BlockDefinition, which is ultimately an alias for any.

  TypeScript doesn't like (some) kinds of circularly defined types,
  so fixing the above necessitates declaring a few auxiliary types
  just to make the type checker happy - but the end result is
  excellent and caught an actual type error in the code.
2023-03-17 20:24:09 +00:00
Maribeth Bottorff
a7c342ec29 chore: force add the build files when updating gh-pages (#6904) 2023-03-17 12:36:48 -07:00
Neil Fraser
6f64d1801a fix: Don't clober event group when renaming vars (#6829)
* fix: Don't clober event group when renaming vars

Also audit all existing event group commands and tweak a few of them where I think there's a potential issue.
2023-03-17 12:09:51 -07:00
Christopher Allen
a0b4a214a9 refactor(blocks): Migrate blocks/colour.js to TypeScript (#6901)
* refactor(blocks): Auto-migration of blocks/colour.js to ts

* fix(blocks): Manually migrate types & fix imports in colour.ts
2023-03-17 15:36:44 +00:00
Beka Westberg
670f7da802 fix: dispose performance (#6894)
* fix: improve dispose performance

* chore: cleanup dispose functions

* chore: split dispose into dispose and disposeInternal

* chore: remove unnecessary node removal

* fix: remove unnecessary unbinding of event listeners

* fix: readd skipping event construction

* chore: work on fixing tests

* chore: fix remaining test failures

* chore: format

* chore: typo

* fix: first pass of PR comments

* chore: remove TODO
2023-03-16 15:28:25 -07:00
Beka Westberg
c2919c51bd fix: improve performance of connecting blocks (#6876)
* fix: early return from updateDisabled if it is noop

* chore: trigger connect and disconnect before hiding

* chore: remove disconnectInternal

* fix: skip setting parent when disconnecting before connecting

* chore: fixup docs

* chore: remove erroneous test

* fix: add delay to context menu callback.

Improve INP by allowing the browser to do a paint (closing the context
menu) before we trigger callbacks. This improves the user experience
for expensive callbacks (e.g. collapsing, or updating disabled).

* fix: rendering bug

When disconnecting the last block in the stack, the block would not be
rerendered correctly (the top-start corner would not be reshaped)

* fix: connecting bug

The order for applying connections was changed so that connections were
applied and then the insertion marker was hidden. This caused an error
because hiding the insertion marker expected there to be a child block
when there was not.

* chore: remove setParent param from public API

* chore: tsdoc
2023-03-16 13:40:33 -07:00
Christopher Allen
4efd2042f9 chore: Add required @license tag to any_aliases.ts (#6899)
Missing licence tag causes presubmit failure when updating
Blockly in third_party.
2023-03-16 17:15:51 +01:00
dependabot[bot]
7c40f6b62e chore(deps): bump selenium-standalone from 8.2.5 to 8.3.0 (#6880)
Bumps [selenium-standalone](https://github.com/webdriverio/selenium-standalone) from 8.2.5 to 8.3.0.
- [Release notes](https://github.com/webdriverio/selenium-standalone/releases)
- [Changelog](https://github.com/webdriverio/selenium-standalone/blob/main/HISTORY.md)
- [Commits](https://github.com/webdriverio/selenium-standalone/compare/v8.2.5...v8.3.0)

---
updated-dependencies:
- dependency-name: selenium-standalone
  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>
2023-03-15 15:13:59 -07:00
Neil Fraser
42fde0f81b chore: Reduce delta on ports to blockly-samples (#6886)
* Reduce usage of obsolete .keyCode property.
* Rename private properties/methods which violate eslint rules.
* Use arrays of bound events rather than individual properties.
* Improve typing info.
* Also fix O(n^2) recursive performance issue in theme's getComponentStyle function.
* And replace String(...) with '${...}' (smaller, faster).
* .toString() is considered harmful.
2023-03-15 13:28:57 -07:00
Beka Westberg
66fd055a83 fix: toString performance (#6896)
* fix: performance of reducing

* chore: remove AST from toString

* chore: format

* chore: fix build

* chore: readd comment
2023-03-15 13:12:36 -07:00
dependabot[bot]
b17187629a chore(deps): bump google-closure-compiler (#6882)
Bumps [google-closure-compiler](https://github.com/google/closure-compiler-npm) from 20230103.0.0 to 20230206.0.0.
- [Release notes](https://github.com/google/closure-compiler-npm/releases)
- [Commits](https://github.com/google/closure-compiler-npm/compare/v20230103.0.0...v20230206.0.0)

---
updated-dependencies:
- dependency-name: google-closure-compiler
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 23:10:44 +00:00
dependabot[bot]
587f558db8 chore(deps): bump jsdom from 21.1.0 to 21.1.1 (#6891)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 21.1.0 to 21.1.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/21.1.0...21.1.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:production
  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>
2023-03-14 23:09:14 +00:00
Aaron Dodson
17064a1c39 chore: Remove various IE hacks and workarounds (#6781)
* chore: Remove IE-specific hacks from flyout_base.ts.

* chore: Remove IE hacks from workspace_svg.ts.

* chore: Remove IE hacks from css.ts.

* chore: Remove IE hacks from xml.ts.

* chore: Remove IE hacks from grid.ts.

* chore: Remove errant logging from flyout_base.ts.

* chore: Remove obsolete comments about IE from bootstrap.js.

* chore: Remove reference to IE from README.

* chore: Clean up trailing spaces in bootstrap.js.
2023-03-14 11:26:38 -07:00
Tim Gates
0a1096262f docs: Fix a few typos (#6878)
There are small typos in:
- closure/goog/base.js
- demos/minimap/minimap.js
- gulpfile.js
- scripts/gulpfiles/build_tasks.js
- scripts/gulpfiles/cleanup_tasks.js
- scripts/gulpfiles/license_tasks.js

Fixes:
- Should read `prerequisites` rather than `prequisites`.
- Should read `satisfies` rather than `satisifies`.
- Should read `regenerates` rather than `regenrates`.
- Should read `minimap` rather than `mimimap`.
- Should read `diagnostic` rather than `disagnostic`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
2023-03-14 05:15:37 -07:00
dependabot[bot]
9fd29e7aac chore(deps): bump google-github-actions/deploy-appengine (#6893)
Bumps [google-github-actions/deploy-appengine](https://github.com/google-github-actions/deploy-appengine) from 1.1.0 to 1.2.2.
- [Release notes](https://github.com/google-github-actions/deploy-appengine/releases)
- [Changelog](https://github.com/google-github-actions/deploy-appengine/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/deploy-appengine/compare/v1.1.0...v1.2.2)

---
updated-dependencies:
- dependency-name: google-github-actions/deploy-appengine
  dependency-type: direct:production
  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>
2023-03-13 09:49:56 -07:00
Beka Westberg
435b0b92ee chore: cleanup render management (#6883) 2023-03-13 09:27:21 -07:00
Beka Westberg
67dd6dfe00 fix: empty procedure arrays in serialization (#6872) 2023-03-13 08:55:27 -07:00
Beka Westberg
9236b4e207 fix: improve performance of modifying block shape (#6884) 2023-03-13 08:55:00 -07:00
Maribeth Bottorff
cdb1215d95 revert: "refactor: Remove block and workspace drag surfaces (#6758)" (#6888)
This reverts commit 332c0fd2f2.
2023-03-09 13:43:12 -08:00
Beka Westberg
c0934216f8 fix: creating duplicate params via renaming vars (#6885)
* feat: add IVariableHolder

* chore: reorganize variable prompts to early return

* fix: add retriggering prompt for conflicting params

* chore: add unit tests

* chore: fix build

* chore: reorganize checking for param conflicts

* fix: visibility

* chore: rename variable holder interface

* chore: fix typo

* chore: fix lint
2023-03-09 06:00:48 -08:00
Maribeth Bottorff
8173d139e1 feat: make renderer methods public or protected (#6887)
* feat: make renderering methods public or protected

* chore: formatting

* chore: recommend thrasos more strongly
2023-03-09 00:31:47 +00:00
Beka Westberg
5cae074431 fix: improve collapse / uncollapse performance (#6860)
* feat: enable render queueing for collapse-related things

* chore: delay bumping

* chore: fixup tests
2023-03-08 06:03:20 -08:00
dependabot[bot]
4f6367d593 chore(deps): bump @blockly/theme-modern from 3.0.3 to 3.0.6 (#6881)
Bumps [@blockly/theme-modern](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-modern) from 3.0.3 to 3.0.6.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Changelog](https://github.com/google/blockly-samples/blob/master/plugins/theme-modern/CHANGELOG.md)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-modern@3.0.6/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>
2023-03-07 16:15:05 -08:00
dependabot[bot]
6ac3cfabd2 chore(deps): bump mocha from 10.1.0 to 10.2.0 (#6879)
Bumps [mocha](https://github.com/mochajs/mocha) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: mocha
  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>
2023-03-06 05:40:54 -08:00
Blake Thomas Williams
9e5bfc243e fix: export Field-related types from Blockly (#6877)
* chore: re-exported Field config types from Blockly

* mark `@internal` types, export field error, and add validator comments
2023-03-03 14:20:20 -08:00
Aaron Dodson
3a7ac3be1b fix: Don't repeatedly recreate the last marker block during a drag. (#6875)
* fix: Don't repeatedly recreate the last marker block during a drag.

* refactor: Reorganize insertion marker initialization and disposal.
2023-03-01 15:52:37 -08:00
Beka Westberg
bb6124a7c3 fix: updating connections in the db multiple times (#6859)
* fix: updating connections in the DB recursively

* chore: cleanup
2023-03-01 15:00:05 -08:00
dependabot[bot]
c2df9037f6 chore(deps): bump typescript from 4.9.4 to 4.9.5 (#6868)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 4.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.4...v4.9.5)

---
updated-dependencies:
- dependency-name: typescript
  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>
2023-03-01 18:58:33 +00:00
Beka Westberg
f2b75fb877 feat: add basic render queueing (#6851)
* feat: add basic render queueing

* feat: change connecting and disconnecting to queue renders

* feat: delay bringToFront

* chore: format

* chore: fix build

* fix: stop updating connections when setting the parent.

This was causing erroneous block bumps because the connection locations
were changed before the blocks were actually rerendered.

* fix: connection highlight positioning
2023-03-01 10:29:01 -08:00
dependabot[bot]
ae2e6b23c5 chore(deps): bump webdriverio from 8.0.15 to 8.3.11 (#6866)
Bumps [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio) from 8.0.15 to 8.3.11.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.3.11/packages/webdriverio)

---
updated-dependencies:
- dependency-name: webdriverio
  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>
2023-02-28 15:10:57 -08:00
Aaron Dodson
8a44dff4e8 refactor: Remove more uses of AnyDuringMigration (#6863)
* refactor: Remove uses of AnyDuringMigration from xml.ts.

* refactor: Remove uses of AnyDuringMigration from block_svg.ts.

* refactor: Remove uses of AnyDuringMigration from theme_manager.ts.

* refactor: Remove uses of AnyDuringMigration from names.ts.

* refactor: Remove uses of AnyDuringMigration from field_angle.ts.

* refactor: Remove some uses of AnyDuringMigration from block.ts.

* refactor: Make safename construction more readable.

* fix: Use a default size for block comments.

* fix: Clarify test of shadow block disposal.

* fix: Update assert in workspace_svg_test to use isDeadOrDying().
2023-02-28 14:38:17 -08:00
Beka Westberg
c9e2af2a27 fix: variable events not deserializing properly (#6832) 2023-02-27 10:43:19 -08:00
dependabot[bot]
a8faa69d9a chore(deps): bump @wdio/selenium-standalone-service from 8.1.0 to 8.3.11 (#6869)
Bumps [@wdio/selenium-standalone-service](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-seleniun-standalone-service) from 8.1.0 to 8.3.11.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.3.11/packages/wdio-seleniun-standalone-service)

---
updated-dependencies:
- dependency-name: "@wdio/selenium-standalone-service"
  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>
2023-02-27 09:43:06 -08:00
dependabot[bot]
5c61e40413 chore(deps): bump yargs from 17.6.2 to 17.7.1 (#6867)
Bumps [yargs](https://github.com/yargs/yargs) from 17.6.2 to 17.7.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.6.2...v17.7.1)

---
updated-dependencies:
- dependency-name: yargs
  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>
2023-02-27 09:28:07 -08:00
dependabot[bot]
bed981e574 chore(deps): bump eslint-plugin-jsdoc from 39.6.4 to 40.0.0 (#6843)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 39.6.4 to 40.0.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v39.6.4...v40.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-23 15:31:07 +00:00
dependabot[bot]
f6d2f4803a chore(deps): bump google-closure-deps from 20221102.0.0 to 20230206.0.0 (#6857)
Bumps [google-closure-deps](https://github.com/google/closure-library) from 20221102.0.0 to 20230206.0.0.
- [Release notes](https://github.com/google/closure-library/releases)
- [Commits](https://github.com/google/closure-library/compare/v20221102...v20230206)

---
updated-dependencies:
- dependency-name: google-closure-deps
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 08:27:41 -08:00
dependabot[bot]
4f1259d1af chore(deps): bump eslint from 8.31.0 to 8.34.0 (#6856)
Bumps [eslint](https://github.com/eslint/eslint) from 8.31.0 to 8.34.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.31.0...v8.34.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2023-02-20 13:46:29 -08:00
Beka Westberg
4d16584266 fix: serializing disabled interactions (#6847)
* feat: add own property getters for disabled interactions

* feat: add serialization of disabled attributes
2023-02-19 08:18:43 -08:00
Christopher Allen
f90a2531a7 feat(build): Run tsc on blocks/ and generators/ (#6836) 2023-02-15 13:10:27 -08:00
Aaron Dodson
a312e9e3d3 refactor: Use input type=number for field_number.ts (#6845) 2023-02-14 13:37:28 -08:00
Beka Westberg
7255d980d6 chore: fixup dialog deprecation warnings (#6844) 2023-02-13 09:35:42 -08:00