Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v9.1.0 #6629

Merged
merged 76 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
84f6dfe
Fix: `//` isn't a legal comment in CSS (#6467)
NeilFraser Oct 5, 2022
fe714bb
test: add skipped tests for the procedure map (#6486)
BeksOmega Oct 5, 2022
083ea0c
chore(deps): bump webdriverio from 7.25.0 to 7.25.1 (#6468)
dependabot[bot] Oct 5, 2022
a263587
chore: rearrange serialization export to make APIExtractor happy (#6480)
BeksOmega Oct 5, 2022
d4f2ba8
chore(deps): bump selenium-standalone from 8.2.0 to 8.2.1 (#6487)
dependabot[bot] Oct 5, 2022
88a5bba
chore(deps): bump @wdio/selenium-standalone-service (#6490)
dependabot[bot] Oct 5, 2022
ce3ec78
fix: update a moved function in developer tools so it loads (#6500)
maribethb Oct 6, 2022
224af0a
fix: remove deprecated use of objectUtils from generators (#6499)
maribethb Oct 6, 2022
ee4e24d
chore(deps): bump @typescript-eslint/eslint-plugin from 5.38.0 to 5.3…
dependabot[bot] Oct 7, 2022
12343d4
chore: add auto labeling workflow (#6504)
maribethb Oct 7, 2022
581e8ac
fix: Connections can be highlighted multiple times (#6502)
koenvanwijk Oct 10, 2022
29acad0
chore(deps): force update @blockly deps (#6509)
BeksOmega Oct 10, 2022
4f6b0b8
chore(deps): bump @typescript-eslint/eslint-plugin from 5.39.0 to 5.4…
dependabot[bot] Oct 11, 2022
9507b29
chore(deps): bump selenium-standalone from 8.2.1 to 8.2.2 (#6529)
dependabot[bot] Oct 11, 2022
51fe84b
chore(deps): bump async from 2.6.3 to 3.2.3 (#6528)
dependabot[bot] Oct 11, 2022
d731880
chore(deps): bump eslint from 8.24.0 to 8.25.0 (#6530)
dependabot[bot] Oct 11, 2022
1da58e0
chore(deps): bump google-closure-compiler (#6531)
dependabot[bot] Oct 11, 2022
6456ab9
chore(deps): bump peter-evans/create-pull-request from 4.1.2 to 4.1.3…
dependabot[bot] Oct 11, 2022
ca3b9bd
fix: move Theme to use a Partial type for BlockStyle (#6532)
BeksOmega Oct 11, 2022
a9b0b19
chore: clean up some underscores (#6492)
rachel-fenichel Oct 11, 2022
a64d6e9
fix: fix block factory in manual mode (#6533)
maribethb Oct 12, 2022
25fe272
chore: remove underscores from private properties in workspace.ts (#6…
rachel-fenichel Oct 12, 2022
ab9825c
chore: remove underscores from some private properties and methods (#…
rachel-fenichel Oct 12, 2022
9b81317
chore: Remove blockly factory use of utils.dom.add/removeClass (#6534)
NeilFraser Oct 12, 2022
7147813
fix: parent blocks not bumping neighbours (#6538)
BeksOmega Oct 13, 2022
1162a66
feat: add interface definitions for procedure stuff (#6488)
BeksOmega Oct 13, 2022
a7247af
feat: add basic observable implementations of procedure interfaces (#…
BeksOmega Oct 13, 2022
ad22de1
test: add shared procedures playground (#6485)
BeksOmega Oct 13, 2022
caf91c8
fix: fix pinch to zoom (#6544)
maribethb Oct 14, 2022
5a23c84
Don't quote fromJson property. (#6545)
NeilFraser Oct 14, 2022
6c95b9e
chore(deps): bump google-github-actions/deploy-appengine (#6555)
dependabot[bot] Oct 17, 2022
3eddb2c
chore(deps): bump peter-evans/create-pull-request from 4.1.3 to 4.1.4…
dependabot[bot] Oct 17, 2022
b0c8972
chore: clean up code in field_angle.ts (#6551)
rachel-fenichel Oct 17, 2022
df660af
fix: make getSourceBlock nullable again (#6542)
BeksOmega Oct 18, 2022
321f619
fix: Don't warn if field is acually 0 width (#6558)
NeilFraser Oct 18, 2022
04dffbc
chore: fix mutator blocks jumping (#6559)
BeksOmega Oct 18, 2022
4a26103
chore(deps): bump @blockly/block-test from 3.0.0 to 3.0.1 (#6553)
dependabot[bot] Oct 18, 2022
82e5a23
chore(deps): bump @microsoft/api-extractor from 7.31.2 to 7.33.4
dependabot[bot] Oct 18, 2022
169bf67
chore(deps): bump @typescript-eslint/eslint-plugin from 5.40.0 to 5.4…
dependabot[bot] Oct 18, 2022
d435186
chore(deps): bump mocha from 10.0.0 to 10.1.0 (#6566)
dependabot[bot] Oct 19, 2022
5f70fc4
chore: update procedure map tests to match the refactored API (#6562)
BeksOmega Oct 19, 2022
d58844d
Revert "chore: update procedure map tests to match the refactored API…
BeksOmega Oct 19, 2022
ca4df2f
chore(deps): bump peter-evans/create-pull-request from 4.1.4 to 4.2.0…
dependabot[bot] Oct 24, 2022
daee180
chore(deps): bump @blockly/theme-modern from 3.0.0 to 3.0.1 (#6579)
dependabot[bot] Oct 24, 2022
f22303b
chore: added type information to `core/field_dropdown.ts` (#6550)
btw17 Oct 24, 2022
a46e12b
chore: remove underscores from menuitem and menu (#6567)
rachel-fenichel Oct 25, 2022
41db0c5
fix: feedback on procedure model implementations (#6560)
BeksOmega Oct 25, 2022
7ffe1fa
chore: update procedure map tests to match the refactored API (#6569)
BeksOmega Oct 25, 2022
c9ced48
feat: trigger updates to IProcedureBlock blocks (#6570)
BeksOmega Oct 25, 2022
97450b2
chore: add tests for procedure serialization (#6574)
BeksOmega Oct 25, 2022
af75ca6
chore: Merge branch 'master' back into develop after v9.0.1 release
cpcallen Oct 25, 2022
75c8eb2
chore: Merge branch 'master' back into develop after v9.0.1 release (…
cpcallen Oct 25, 2022
8db4eb0
chore: start command uses tsc watch (#6577)
maribethb Oct 25, 2022
fed57f2
fix: refactors concrete implementations of the procedure data models …
BeksOmega Oct 25, 2022
db70be2
fix(build): Fix spurious tsc errors cause by tsc version bump
cpcallen Oct 26, 2022
c1fbcc5
chore(release): delete release-please configuration (#6546)
rachel-fenichel Oct 26, 2022
52879dd
fix(build): build/test on windows (#6431)
yamadayutaka Oct 27, 2022
2311a94
feat: add serialization of procedure models (#6582)
BeksOmega Oct 27, 2022
e90aba9
fix: Rename Generator to CodeGenerator (#6585)
NeilFraser Oct 27, 2022
971d109
chore(deps): bump webdriverio from 7.25.1 to 7.25.2 (#6587)
dependabot[bot] Oct 28, 2022
25c87c1
chore: remove underscores and clean up scrollbar.ts (#6584)
rachel-fenichel Oct 28, 2022
e1244e5
fix: generator tests on linux (#6588)
rachel-fenichel Oct 28, 2022
10d3bc6
chore(deps): bump google-closure-deps from 20220905.0.0 to 20221004.0…
dependabot[bot] Oct 31, 2022
5c1860f
feat: export serializers (#6586)
BeksOmega Oct 31, 2022
9b8b322
Merge pull request #6564 from google/dependabot/npm_and_yarn/develop/…
maribethb Oct 31, 2022
f95af36
chore: remove some underscores in icon-related classes (#6583)
rachel-fenichel Oct 31, 2022
52a0d52
chore(build): Remove build products from the Blockly repository (#6475)
cpcallen Nov 3, 2022
82dc966
test: add tests for the insertion marker manager (#6596)
rachel-fenichel Nov 3, 2022
1d43bd4
test: firing procedure events (#6593)
BeksOmega Nov 4, 2022
024e9c5
chore(deps): bump @typescript-eslint/eslint-plugin from 5.40.1 to 5.4…
dependabot[bot] Nov 7, 2022
010a56b
chore: add command to generate reference docs (#6506)
maribethb Nov 9, 2022
1f862cb
chore: disable serialization of procedure data for point release (#6610)
BeksOmega Nov 9, 2022
2209b8b
release: Merge branch 'develop' into blockly-v9.1.0
cpcallen Nov 10, 2022
3c2e893
release: Update version number to 9.1.0
cpcallen Nov 10, 2022
21077ee
fix(build): Put build products in correct location for AppEngine
cpcallen Nov 11, 2022
b7bb48b
release: Update version number to 9.1.0
cpcallen Nov 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@
"jsdoc/check-param-names": ["off", {"checkDestructured": false}],
// Allow any text in the license tag. Other checks are not relevant.
"jsdoc/check-values": ["off"]

}
}]
}
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ All submissions, including submissions by project members, require review. We
use Github pull requests for this purpose.

### Browser compatibility
We care strongly about making Blockly work on all browsers. As of 2022 we
We care strongly about making Blockly work on all browsers. As of 2022 we
support Edge, Chrome, Safari, and Firefox. We will not accept changes that only
work on a subset of those browsers. You can check [caniuse.com](https://caniuse.com/)
work on a subset of those browsers. You can check [caniuse.com](https://caniuse.com/)
for compatibility information.

### The small print
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ updates:
- "PR: chore"
- "PR: dependencies"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
Expand Down
7 changes: 0 additions & 7 deletions .github/release-please.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/appengine_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path: _deploy/

- name: Deploy to App Engine
uses: google-github-actions/deploy-appengine@v0.8.0
uses: google-github-actions/deploy-appengine@v0.8.2
# For parameters see:
# https://github.com/google-github-actions/deploy-appengine#inputs
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
pull_request_target:
types: [ opened, edited ]
name: conventional-release-labels
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: bcoe/conventional-release-labels@v1
with:
type_labels: '{"feat": "PR: feature", "fix": "PR: fix", "breaking": "breaking change", "chore": "PR: chore", "docs": "PR: docs", "refactor": "PR: refactor"}'
ignored_types: '[]'
4 changes: 2 additions & 2 deletions .github/workflows/tag_module_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ name: Tag module cleanup

# Trigger on pull requests against goog_module branch only
# Uses pull_request_target to get write permissions so that it can write labels.
on:
on:
pull_request_target:
branches:
- goog_module

jobs:
tag-module-cleanup:

# Add the type: cleanup label
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Check Out Blockly
Expand All @@ -36,7 +36,7 @@ jobs:
run: source ./tests/scripts/update_metadata.sh

- name: Create Pull Request
uses: peter-evans/create-pull-request@171dd555b9ab6b18fa02519fdfacbb8bf671e1b4
uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7
with:
commit-message: Update build artifact sizes in check_metadata.sh
delete-branch: true
Expand Down
3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

1,540 changes: 0 additions & 1,540 deletions blockly_compressed.js

This file was deleted.

1 change: 0 additions & 1 deletion blockly_compressed.js.map

This file was deleted.

3 changes: 1 addition & 2 deletions blocks/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ const PROCEDURE_DEF_COMMON = {
this.argumentVarModels_.push(variable);
} else {
console.log(
'Failed to create a variable with name ' + varName +
', ignoring.');
`Failed to create a variable named "${varName}", ignoring.`);
}
}
}
Expand Down
230 changes: 0 additions & 230 deletions blocks_compressed.js

This file was deleted.

1 change: 0 additions & 1 deletion blocks_compressed.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion closure/goog/base_minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var goog = goog || {};
/**
* Reference to the global object. This is provided as 'root' by the
* UMD wrapper, but prefer globalThis if it is defined.
*
*
* https://www.ecma-international.org/ecma-262/9.0/index.html#sec-global-object
*
* @const
Expand Down
92 changes: 46 additions & 46 deletions core/block_drag_surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,40 @@ import * as svgMath from './utils/svg_math.js';
* @alias Blockly.BlockDragSurfaceSvg
*/
export class BlockDragSurfaceSvg {
/** The SVG drag surface. Set once by BlockDragSurfaceSvg.createDom. */
private svg_: SVGElement;
/**
* The root element of the drag surface.
*/
private svg: SVGElement;

/**
* This is where blocks live while they are being dragged if the drag
* surface is enabled.
*/
private dragGroup_: SVGElement;
private dragGroup: SVGElement;

/**
* Cached value for the scale of the drag surface.
* Used to set/get the correct translation during and after a drag.
*/
private scale_ = 1;
private scale = 1;

/**
* Cached value for the translation of the drag surface.
* This translation is in pixel units, because the scale is applied to the
* drag group rather than the top-level SVG.
*/
private surfaceXY_: Coordinate = new Coordinate(0, 0);
private readonly childSurfaceXY_: Coordinate;
private surfaceXY = new Coordinate(0, 0);

/**
* Cached value for the translation of the child drag surface in pixel
* units. Since the child drag surface tracks the translation of the
* workspace this is ultimately the translation of the workspace.
*/
private readonly childSurfaceXY = new Coordinate(0, 0);

/** @param container Containing element. */
constructor(private readonly container: Element) {
/**
* Cached value for the translation of the child drag surface in pixel
* units. Since the child drag surface tracks the translation of the
* workspace this is ultimately the translation of the workspace.
*/
this.childSurfaceXY_ = new Coordinate(0, 0);

this.svg_ = dom.createSvgElement(
this.svg = dom.createSvgElement(
Svg.SVG, {
'xmlns': dom.SVG_NS,
'xmlns:html': dom.HTML_NS,
Expand All @@ -72,7 +73,8 @@ export class BlockDragSurfaceSvg {
'class': 'blocklyBlockDragSurface',
},
this.container);
this.dragGroup_ = dom.createSvgElement(Svg.G, {}, this.svg_ as SVGElement);

this.dragGroup = dom.createSvgElement(Svg.G, {}, this.svg);
}

/**
Expand All @@ -93,13 +95,13 @@ export class BlockDragSurfaceSvg {
* @param blocks Block or group of blocks to place on the drag surface.
*/
setBlocksAndShow(blocks: SVGElement) {
if (this.dragGroup_.childNodes.length) {
if (this.dragGroup.childNodes.length) {
throw Error('Already dragging a block.');
}
// appendChild removes the blocks from the previous parent
this.dragGroup_.appendChild(blocks);
this.svg_.style.display = 'block';
this.surfaceXY_ = new Coordinate(0, 0);
this.dragGroup.appendChild(blocks);
this.svg.style.display = 'block';
this.surfaceXY = new Coordinate(0, 0);
}

/**
Expand All @@ -111,13 +113,13 @@ export class BlockDragSurfaceSvg {
* @param scale Scale of the group.
*/
translateAndScaleGroup(x: number, y: number, scale: number) {
this.scale_ = scale;
this.scale = scale;
// Make sure the svg exists on a pixel boundary so that it is not fuzzy.
const roundX = Math.round(x);
const roundY = Math.round(y);
this.childSurfaceXY_.x = roundX;
this.childSurfaceXY_.y = roundY;
this.dragGroup_!.setAttribute(
this.childSurfaceXY.x = roundX;
this.childSurfaceXY.y = roundY;
this.dragGroup.setAttribute(
'transform',
'translate(' + roundX + ',' + roundY + ') scale(' + scale + ')');
}
Expand All @@ -128,13 +130,11 @@ export class BlockDragSurfaceSvg {
* @internal
*/
translateSurfaceInternal_() {
let x = this.surfaceXY_!.x;
let y = this.surfaceXY_!.y;
// Make sure the svg exists on a pixel boundary so that it is not fuzzy.
x = Math.round(x);
y = Math.round(y);
this.svg_.style.display = 'block';
dom.setCssTransform(this.svg_, 'translate3d(' + x + 'px, ' + y + 'px, 0)');
const x = Math.round(this.surfaceXY.x);
const y = Math.round(this.surfaceXY.y);
this.svg.style.display = 'block';
dom.setCssTransform(this.svg, 'translate3d(' + x + 'px, ' + y + 'px, 0)');
}

/**
Expand All @@ -144,9 +144,9 @@ export class BlockDragSurfaceSvg {
* @param deltaY Vertical offset in pixel units.
*/
translateBy(deltaX: number, deltaY: number) {
const x = this.surfaceXY_.x + deltaX;
const y = this.surfaceXY_.y + deltaY;
this.surfaceXY_ = new Coordinate(x, y);
const x = this.surfaceXY.x + deltaX;
const y = this.surfaceXY.y + deltaY;
this.surfaceXY = new Coordinate(x, y);
this.translateSurfaceInternal_();
}

Expand All @@ -160,7 +160,7 @@ export class BlockDragSurfaceSvg {
* @param y Y translation for the entire surface.
*/
translateSurface(x: number, y: number) {
this.surfaceXY_ = new Coordinate(x * this.scale_, y * this.scale_);
this.surfaceXY = new Coordinate(x * this.scale, y * this.scale);
this.translateSurfaceInternal_();
}

Expand All @@ -171,8 +171,8 @@ export class BlockDragSurfaceSvg {
* @returns Current translation of the surface.
*/
getSurfaceTranslation(): Coordinate {
const xy = svgMath.getRelativeXY(this.svg_ as SVGElement);
return new Coordinate(xy.x / this.scale_, xy.y / this.scale_);
const xy = svgMath.getRelativeXY(this.svg);
return new Coordinate(xy.x / this.scale, xy.y / this.scale);
}

/**
Expand All @@ -181,17 +181,17 @@ export class BlockDragSurfaceSvg {
*
* @returns Drag surface group element.
*/
getGroup(): SVGElement|null {
return this.dragGroup_;
getGroup(): SVGElement {
return this.dragGroup;
}

/**
* Returns the SVG drag surface.
*
* @returns The SVG drag surface.
*/
getSvgRoot(): SVGElement|null {
return this.svg_;
getSvgRoot(): SVGElement {
return this.svg;
}

/**
Expand All @@ -201,7 +201,7 @@ export class BlockDragSurfaceSvg {
* @returns Drag surface block DOM element, or null if no blocks exist.
*/
getCurrentBlock(): Element|null {
return this.dragGroup_.firstChild as Element;
return this.dragGroup.firstChild as Element;
}

/**
Expand All @@ -213,7 +213,7 @@ export class BlockDragSurfaceSvg {
*/
getWsTranslation(): Coordinate {
// Returning a copy so the coordinate can not be changed outside this class.
return this.childSurfaceXY_.clone();
return this.childSurfaceXY.clone();
}

/**
Expand All @@ -230,16 +230,16 @@ export class BlockDragSurfaceSvg {
const currentBlockElement = this.getCurrentBlock();
if (currentBlockElement) {
if (opt_newSurface) {
// appendChild removes the node from this.dragGroup_
// appendChild removes the node from this.dragGroup
opt_newSurface.appendChild(currentBlockElement);
} else {
this.dragGroup_.removeChild(currentBlockElement);
this.dragGroup.removeChild(currentBlockElement);
}
}
this.svg_.style.display = 'none';
if (this.dragGroup_.childNodes.length) {
this.svg.style.display = 'none';
if (this.dragGroup.childNodes.length) {
throw Error('Drag group was not cleared.');
}
this.surfaceXY_ = new Coordinate(0, 0);
this.surfaceXY = new Coordinate(0, 0);
}
}