Skip to content

Commit 41b7e93

Browse files
authored
chore: merge develop into add-screen-reader
chore: merge develop into add-screen-reader Merge pull request #9352 from google/develop
2 parents 4be1ddf + 2c46686 commit 41b7e93

File tree

149 files changed

+1498
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1498
-389
lines changed

.github/workflows/appengine_deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
# Checks-out the repository under $GITHUB_WORKSPACE.
1717
# When running manually this checks out the master branch.
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- name: Prepare demo files
2121
# Install all dependencies, then copy all the files needed for demos.
@@ -36,13 +36,13 @@ jobs:
3636
needs: prepare
3737
steps:
3838
- name: Download prepared files
39-
uses: actions/download-artifact@v4
39+
uses: actions/download-artifact@v5
4040
with:
4141
name: appengine_files
4242
path: _deploy/
4343

4444
- name: Deploy to App Engine
45-
uses: google-github-actions/[email protected].5
45+
uses: google-github-actions/[email protected].7
4646
# For parameters see:
4747
# https://github.com/google-github-actions/deploy-appengine#inputs
4848
with:

.github/workflows/browser_test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ name: Run browser manually
55

66
on:
77
workflow_dispatch:
8+
schedule:
9+
- cron: '0 6 * * 1' # Runs every Monday at 06:00 UTC
810

911
permissions:
1012
contents: read
1113

1214
jobs:
1315
build:
14-
timeout-minutes: 10
16+
timeout-minutes: 120
1517
runs-on: ${{ matrix.os }}
1618

1719
strategy:
@@ -24,7 +26,7 @@ jobs:
2426
# https://nodejs.org/en/about/releases/
2527

2628
steps:
27-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
2830
with:
2931
persist-credentials: false
3032

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
# TODO (#2114): re-enable osx build.
1919
# os: [ubuntu-latest, macos-latest]
2020
os: [ubuntu-latest]
21-
node-version: [18.x, 20.x, 22.x]
21+
node-version: [18.x, 20.x, 22.x, 24.x]
2222
# See supported Node.js release schedule at
2323
# https://nodejs.org/en/about/releases/
2424

2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
with:
2828
persist-credentials: false
2929

@@ -54,7 +54,7 @@ jobs:
5454
timeout-minutes: 5
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
5858

5959
- name: Use Node.js 20.x
6060
uses: actions/setup-node@v4
@@ -71,7 +71,7 @@ jobs:
7171
timeout-minutes: 5
7272
runs-on: ubuntu-latest
7373
steps:
74-
- uses: actions/checkout@v4
74+
- uses: actions/checkout@v5
7575

7676
- name: Use Node.js 20.x
7777
uses: actions/setup-node@v4

.github/workflows/keyboard_plugin_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525

2626
steps:
2727
- name: Checkout core Blockly
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
path: core-blockly
3131

3232
- name: Checkout keyboard navigation plugin
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
with:
3535
repository: 'google/blockly-keyboard-experimentation'
3636
ref: 'add-screen-reader-support-experimental'

.github/workflows/welcome_new_contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
permissions:
1010
pull-requests: write
1111
steps:
12-
- uses: actions/first-interaction@v2
12+
- uses: actions/first-interaction@v3
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
pr-message: >

appengine/app.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ handlers:
7070
# Blockly files.
7171
- url: /static
7272
static_dir: static
73+
http_headers:
74+
Access-Control-Allow-Origin: "*"
7375
secure: always
7476

7577
# Storage API.

core/block.ts

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -501,22 +501,32 @@ export class Block {
501501
// Detach this block from the parent's tree.
502502
this.previousConnection.disconnect();
503503
}
504-
const nextBlock = this.getNextBlock();
505-
if (opt_healStack && nextBlock && !nextBlock.isShadow()) {
506-
// Disconnect the next statement.
507-
const nextTarget = this.nextConnection?.targetConnection ?? null;
508-
nextTarget?.disconnect();
509-
if (
510-
previousTarget &&
511-
this.workspace.connectionChecker.canConnect(
512-
previousTarget,
513-
nextTarget,
514-
false,
515-
)
516-
) {
517-
// Attach the next statement to the previous statement.
518-
previousTarget.connect(nextTarget!);
519-
}
504+
505+
if (!opt_healStack) return;
506+
507+
// Immovable or shadow next blocks need to move along with the block; keep
508+
// going until we encounter a normal block or run off the end of the stack.
509+
let nextBlock = this.getNextBlock();
510+
while (nextBlock && (nextBlock.isShadow() || !nextBlock.isMovable())) {
511+
nextBlock = nextBlock.getNextBlock();
512+
}
513+
if (!nextBlock) return;
514+
515+
// Disconnect the next statement.
516+
const nextTarget =
517+
nextBlock.previousConnection?.targetBlock()?.nextConnection
518+
?.targetConnection ?? null;
519+
nextTarget?.disconnect();
520+
if (
521+
previousTarget &&
522+
this.workspace.connectionChecker.canConnect(
523+
previousTarget,
524+
nextTarget,
525+
false,
526+
)
527+
) {
528+
// Attach the next statement to the previous statement.
529+
previousTarget.connect(nextTarget!);
520530
}
521531
}
522532

@@ -1116,7 +1126,7 @@ export class Block {
11161126
/**
11171127
* Returns a generator that provides every field on the block.
11181128
*
1119-
* @yields A generator that can be used to iterate the fields on the block.
1129+
* @returns A generator that can be used to iterate the fields on the block.
11201130
*/
11211131
*getFields(): Generator<Field, undefined, void> {
11221132
for (const input of this.inputList) {

core/block_svg.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,9 @@ export class BlockSvg
19241924
/** See IFocusableNode.onNodeFocus. */
19251925
onNodeFocus(): void {
19261926
this.select();
1927+
this.workspace.scrollBoundsIntoView(
1928+
this.getBoundingRectangleWithoutChildren(),
1929+
);
19271930
}
19281931

19291932
/** See IFocusableNode.onNodeBlur. */

core/bubbles/bubble.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,10 @@ export abstract class Bubble implements IBubble, ISelectable, IFocusableNode {
710710
onNodeFocus(): void {
711711
this.select();
712712
this.bringToFront();
713+
const xy = this.getRelativeToSurfaceXY();
714+
const size = this.getSize();
715+
const bounds = new Rect(xy.y, xy.y + size.height, xy.x, xy.x + size.width);
716+
this.workspace.scrollBoundsIntoView(bounds);
713717
}
714718

715719
/** See IFocusableNode.onNodeBlur. */

core/clipboard/block_paster.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export function moveBlockToNotConflict(
8383
block: BlockSvg,
8484
originalPosition: Coordinate,
8585
) {
86+
if (block.workspace.RTL) {
87+
originalPosition.x = block.workspace.getWidth() - originalPosition.x;
88+
}
8689
const workspace = block.workspace;
8790
const snapRadius = config.snapRadius;
8891
const bumpOffset = Coordinate.difference(

0 commit comments

Comments
 (0)