Christopher Allen
0177dff49c
refactor(blocks): Migrate blocks/lists.js to TypeScript ( #6902 )
...
* refactor(blocks): Auto-migration of blocks/lists.js to ts
* fix(blocks): Manually migrate & fix types in lists.ts
* chore(blocks): format lists.ts
Not running clang-format on this as for some reason it decides
half way through the file to indent everything after that by
an extra four spaces (and then has to re-wrap a bunch of lines
that are consequently too long).
* refactor(blocks): Improve types in lists.ts
It turns out that the way I originally specified the types for
the mixins meant that they were all 'any', which is a bit
useless. Change them so that tsc actually typechecks
properties (including method calls) on the mixed-in blocks,
and then fix the numerous additional type errors which
doing this revealed.
(By "fix", I mean apply "as" casts and "!"s as required to
suppress type errors from tsc. Actually fixing the code in a
way that makes the blocks meaningfully more bulletproof is
left as an exercise to the reader - sorry, I mean: will be
dealt with in a future PR.)
* fix(blocks): Additional fixes for comments PR #6902
2023-04-18 12:50:54 +01:00
Beka Westberg
edc5843c4c
fix: non-printable characters in XML ( #6952 )
...
* fix: non-printable characters in XMl
* fix: PR comments
* chore: format
* chore: move to module-level parser and serializer
* chore: reorganize textToDom
* chore: add dummy implementations of domParser and xmlSerializer
* chore: properly check classes before constructing
* chore: fix tests
* chore: PR comments
* chore: remove null char from tests
* chore: docs!
2023-04-17 16:05:09 -07:00
Neil Fraser
20f0c937cd
chore: 'compareDocumentPosition' to 'contains' ( #6982 )
...
The 'compareDocumentPosition' call was inherited from Closure Library, in order to work with IE 8 and earlier. Use the more modern 'contains' call instead.
This change was originally added here:
https://github.com/google/blockly/pull/1991
Remove the DOCUMENT_POSITION_CONTAINED_BY constant which is not a NodeType and should never have been part of that enum.
This change was originally added here:
https://github.com/google/blockly/pull/2736
2023-04-17 23:48:24 +02:00
Maribeth Bottorff
2bbb3aa1fc
fix: do not hide all chaff when resizing ( #6916 )
2023-04-17 10:06:44 -07:00
Neil Fraser
2fa7280ce1
fix: Don't truncate text label fields. ( #6979 )
...
https://groups.google.com/g/blockly/c/S5b3iKB2Sos
2023-04-15 17:34:20 -07:00
Rachel Fenichel
c458d63018
chore: remove underscores from private properties and methods in some fields ( #6977 )
...
* chore: remove private underscores in field_checkbox
* chore: remove private underscores from field_dropdown
* chore: remove private underscores in field_image
* chore: remove private underscores in field_label
* chore: remove private underscores in field_number
* chore: format
2023-04-13 14:59:43 -07:00
Rachel Fenichel
5f8330e74e
chore: remove underscores from private properties and methods in keyboard nav and rendering ( #6975 )
...
* chore: remove underscores in keyboard navigation
* chore: remove private underscores from renderers
2023-04-12 11:19:41 -07:00
Neil Fraser
8ade26148c
Fix offset location of connection ripple ( #6973 )
...
Resolves issue #6972
2023-04-12 10:00:41 -07:00
Beka Westberg
ae8673f09e
chore: Merge master back into develop following v9.3.2 release
...
Merge pull request #6956 from google/master
2023-04-11 14:53:22 -07:00
Beka Westberg
c0cceb56e6
chore: delete update metadata action ( #6969 )
2023-04-11 12:07:10 -07:00
Rachel Fenichel
85013f83b2
chore: remove underscores from private properties and methods in connections ( #6961 )
...
* chore: remove private underscores in connection and connection_db
* chore: remove private underscores in rendererd_connection
2023-04-11 10:06:17 -07:00
Rachel Fenichel
2bf780e74f
chore: remove underscores from private properties and methods for names and workspace comments ( #6962 )
...
* chore: remove private underscores in names.ts
* chore: remove private underscores in workspace comments
* chore: format
* chore: remove unneeded nulls
2023-04-11 10:00:39 -07:00
dependabot[bot]
a344eaf149
chore(deps): bump google-github-actions/deploy-appengine ( #6951 )
...
Bumps [google-github-actions/deploy-appengine](https://github.com/google-github-actions/deploy-appengine ) from 1.2.2 to 1.2.6.
- [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.2.2...v1.2.6 )
---
updated-dependencies:
- dependency-name: google-github-actions/deploy-appengine
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-04-10 14:22:11 -07:00
dependabot[bot]
90ffa76086
chore(deps): bump google-closure-compiler ( #6948 )
...
Bumps [google-closure-compiler](https://github.com/google/closure-compiler-npm ) from 20230206.0.0 to 20230228.0.0.
- [Release notes](https://github.com/google/closure-compiler-npm/releases )
- [Commits](https://github.com/google/closure-compiler-npm/compare/v20230206.0.0...v20230228.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-04-10 13:59:01 -07:00
Aaron Dodson
b32e76d45f
refactor: Remove some more uses of AnyDuringMigration. ( #6970 )
2023-04-10 13:57:04 -07:00
dependabot[bot]
5a671da5aa
chore(deps): bump typescript from 5.0.2 to 5.0.4 ( #6966 )
...
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 5.0.2 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.0.2...v5.0.4 )
---
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-04-10 13:54:43 -07:00
dependabot[bot]
9bcdd5dd18
chore(deps): bump google-closure-deps from 20230206.0.0 to 20230228.0.0 ( #6965 )
...
Bumps [google-closure-deps](https://github.com/google/closure-library ) from 20230206.0.0 to 20230228.0.0.
- [Release notes](https://github.com/google/closure-library/releases )
- [Commits](https://github.com/google/closure-library/compare/v20230206...v20230228 )
---
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-04-10 13:54:21 -07:00
Rachel Fenichel
48bdeb3bdb
chore: remove underscores from private properties and methods for flyout ( #6960 )
...
* chore: remove underscores in flyout files
* chore: remove underscores in flyout_button
2023-04-07 15:40:56 -07:00
Rachel Fenichel
8378eddd17
chore: remove underscores from properties and methods in trashcan ( #6959 )
2023-04-07 14:51:35 -07:00
Beka Westberg
ec6e951e68
release: v9.3.2
...
Merge pull request #6955 from google/rc/v9.3.2
blockly-v9.3.2
2023-04-06 12:10:28 -07:00
Beka Westberg
860dddd08f
release: Update version number to 9.3.2
2023-04-06 18:55:00 +00:00
Beka Westberg
4271e1a4a7
fix: disposing during dragging ( #6954 )
...
(cherry picked from commit 2167afab85 )
2023-04-06 18:54:07 +00:00
Beka Westberg
d227ec2c89
fix: remove forced rerender from mutator ( #6918 )
...
(cherry picked from commit d897cdcf1d )
2023-04-06 18:53:58 +00:00
Beka Westberg
2167afab85
fix: disposing during dragging ( #6954 )
2023-04-06 11:41:12 -07:00
Beka Westberg
7c17ab9931
fix: collapsed toolbox categories being expanded ( #6942 )
2023-04-06 09:09:34 -07:00
dependabot[bot]
ce4260c373
chore(deps): bump eslint from 8.34.0 to 8.37.0 ( #6946 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 8.34.0 to 8.37.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.34.0...v8.37.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-04-06 15:59:23 +01:00
Beka Westberg
25c6d473ce
Merge pull request #6918 from BeksOmega/fix/mutator-rerender
...
fix: remove forced rerender from mutator
2023-04-05 16:21:57 -07:00
Beka Westberg
2bf456d214
chore: Merge master back into develop following v9.3.0 release
...
Merge pull request #6935 from google/master
2023-04-04 13:12:22 -07:00
dependabot[bot]
3996d8f250
chore(deps): bump concurrently from 7.6.0 to 8.0.1 ( #6949 )
...
Bumps [concurrently](https://github.com/open-cli-tools/concurrently ) from 7.6.0 to 8.0.1.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases )
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v7.6.0...v8.0.1 )
---
updated-dependencies:
- dependency-name: concurrently
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-04-03 08:44:09 -07:00
Beka Westberg
cf850d5f78
Merge pull request #6941 from google/rc/v9.3.1
...
release: v9.3.1
blockly-v9.3.1
2023-03-30 14:01:14 -07:00
Beka Westberg
15b83d42db
release: Update version number to 9.3.1
2023-03-30 20:45:03 +00:00
Maribeth Bottorff
8e1890a93c
fix: allow splicing into shadow block stacks ( #6939 )
...
* fix: allow splicing into shadow block stacks
* chore: format
(cherry picked from commit 69afe5b60f )
2023-03-30 20:44:40 +00:00
Maribeth Bottorff
69afe5b60f
fix: allow splicing into shadow block stacks ( #6939 )
...
* fix: allow splicing into shadow block stacks
* chore: format
2023-03-30 13:32:57 -07:00
Beka Westberg
9c9aef1d23
release: v9.3.0
...
Merge pull request #6934 from google/rc/v9.3.0
blockly-v9.3.0
2023-03-29 10:56:46 -07:00
Beka Westberg
a17c86ea7c
release: Update version number to 9.3.0
2023-03-29 17:12:05 +00:00
Beka Westberg
d642aa0dad
release: Merge branch 'develop' into rc/v9.3.0
2023-03-29 17:11:20 +00:00
Beka Westberg
9328eebd73
chore: Update metadata for 2023 Q1 release ( #6933 )
2023-03-29 10:10:11 -07:00
Beka Westberg
ba208037c0
chore: update renamings file for 2023 Q1 release ( #6932 )
2023-03-29 10:09:58 -07:00
Beka Westberg
3572986577
chore: Rollup of 2023 Q1 updates from TranslateWiki ( #6931 )
2023-03-29 10:09:48 -07:00
Christopher Allen
42e838621d
chore(build): Temporarily exclude blocks and generators .d.ts files ( #6930 )
...
Temporarily exclude the generated .d.ts files for blocks/* and
generators/* from the package.
This will in due course replace the (very simplistic) hand-written
versions in typings/, but for now they are not referenced
anywhere a developer's tooling should be looking, and contain
in some cases actually incorrect typings (e.g., in unmigrated
blocks files, the blocks export is typed as ObjectConstructor,
which is wrong), so do not include them in the package least they
cause problems for the unwary.
2023-03-28 22:30:08 +01:00
Beka Westberg
7291fa04a9
fix: mutator not resizing for flyout ( #6917 )
2023-03-28 12:47:02 -07:00
dependabot[bot]
c688c9382b
chore(deps): bump @blockly/dev-tools from 5.0.2 to 5.2.4 ( #6927 )
...
Bumps [@blockly/dev-tools](https://github.com/google/blockly-samples/tree/HEAD/plugins/dev-tools ) from 5.0.2 to 5.2.4.
- [Release notes](https://github.com/google/blockly-samples/releases )
- [Changelog](https://github.com/google/blockly-samples/blob/master/plugins/dev-tools/CHANGELOG.md )
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/dev-tools@5.2.4/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>
2023-03-27 18:28:04 +01:00
dependabot[bot]
c1e2956a31
chore(deps): bump patch-package from 6.5.0 to 6.5.1 ( #6804 )
...
Bumps [patch-package](https://github.com/ds300/patch-package ) from 6.5.0 to 6.5.1.
- [Release notes](https://github.com/ds300/patch-package/releases )
- [Changelog](https://github.com/ds300/patch-package/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ds300/patch-package/compare/v6.5.0...v6.5.1 )
---
updated-dependencies:
- dependency-name: patch-package
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-27 08:48:16 -07:00
dependabot[bot]
a83840c28d
chore(deps): bump closure-calculate-chunks from 3.0.3 to 3.1.1 ( #6926 )
...
Bumps [closure-calculate-chunks](https://github.com/chadkillingsworth/closure-calculate-chunks ) from 3.0.3 to 3.1.1.
- [Release notes](https://github.com/chadkillingsworth/closure-calculate-chunks/releases )
- [Commits](https://github.com/chadkillingsworth/closure-calculate-chunks/compare/v3.0.3...v3.1.1 )
---
updated-dependencies:
- dependency-name: closure-calculate-chunks
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-27 08:19:48 -07:00
Aaron Dodson
d004bd256d
fix: Make Escape cancel changes in text fields. ( #6923 )
2023-03-24 14:56:25 -07:00
Beka Westberg
0708c97ffe
fix: connection locations not updating ( #6921 )
...
* fix: connection locations not updating
* chore: update TODO
2023-03-24 19:58:33 +00:00
Christopher Allen
faa95d022d
fix(fields): Make SKIP_SETUP a Symbol; remove Sentinel class ( #6919 )
...
We introduced the SKIP_SETUP sentinel value when converting
Field and its subclasses to ES6 class syntax, because super
must be called before any other code in a subclass
constructor, breaking the previous mechanism where subclasses
would set some properties before calling their superclass
constructor.
SKIP_SETUP was a singleton value of class Sentinel.
Recently, in PR #6639 @btw17 introduced the isSentinel type
predicate to improve the typing of Field. Unfortunately, there
were some aspects of this change that were not very elegant:
- isSentinel was declared as a static method on Field (rather
than on Sentinel itself).
- It only checks against the specific value SKIP_SETUP,
rather than checking if the argument is instanceof Sentinel
(though perhaps this is for efficiency?)
Additionally - as a result of the migration from ES6 to TS, and
predating PR #6639 - The signature for the Field constructor's
first argument was typed T|Sentinel, with subclass constructors
generally being <some type(s)>|Sentinel.
This creates a small problem when attempting to port Fields from
core to plugins, because Sentinel is not reexported by
core/utils.ts (and therefore not from core/blockly.ts either).
The latter problem could be solved simply by reexporting Sentinel,
or by having plugin constructors not accept SKIP_SETUP (though
this potentially makes them more difficult to subclass), but
neither is particularly desirable.
Instead, this PR proposes that we:
- Make Field.SKIP_SETUP a (unique) Symbol.
- Change the value argument to the Field constructor to accept
T|typeof Field.SKIP_SETUP - where typeof Field.SKIP_SETUP is
(like a literal type) a type that accepts just the single
value SKIP_SETUP.
- Remove the Sentinel class and core/utils/sentinel.ts.
Not treating this as a breaking change:
- Removes Field.isSentinel - though this addition has not yet
been published, so it can only break our own as-yet-unreleased
code in samples.
- Changes the type of Field.SKIP_SETUP and the first argument
of the Field constructor from Sentinel to typeof SKIP_SETUP
(a unique Symbol) - but given that Sentinel has never been
exported this should not break any actual external code.
2023-03-23 20:30:48 +00:00
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