Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bb46ad5
fix: clean up shortcut help dialog (#688)
maribethb Aug 8, 2025
10d7bba
fix: Only calculate available connections once. (#690)
gonfunko Aug 8, 2025
9dac4bd
feat: Deploy GH pages with screen reader experiment (#689)
BenHenning Aug 12, 2025
e16f5aa
chore(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Aug 13, 2025
7991855
test: Make tests faster, more robust, more consistent (#692)
cpcallen Aug 19, 2025
e438ba7
chore: Added context menu item tests. (#575)
johnnesky Aug 25, 2025
ec703af
refactor(tests): Remove unneeded tabNavigateToWorkspace calls (#701)
cpcallen Aug 26, 2025
7df913d
test(MoveActions): Test starting a move using the context menu (#700)
cpcallen Aug 26, 2025
2af65b8
test(`Mover`): Add test for moving statement blocks (#704)
cpcallen Aug 27, 2025
83b8b1b
chore: Format (#705)
cpcallen Aug 27, 2025
8a59b99
test(Mover): Add test for moving value blocks right/left (#710)
cpcallen Aug 31, 2025
1ff6012
release: release version 3.0. (#708)
gonfunko Sep 2, 2025
aa8ea7f
test(Mover): Add test for moving complex expression blocks right/left…
cpcallen Sep 4, 2025
57bca48
chore: add empty workspace scenario (#716)
maribethb Sep 5, 2025
344c1bf
fix: add instructions on how to register toolbox (#715)
maribethb Sep 5, 2025
3ef37bc
chore: Add the advanced playground to the demo/test page. (#718)
gonfunko Sep 8, 2025
4b0b2cc
fix: dont start a new move when pressing m repeatedly (#717)
maribethb Sep 8, 2025
b38e758
chore: fix a bug in flaky move test (#720)
maribethb Sep 9, 2025
e4ad0d9
fix: Don't try to move blocks onto shadow block connections. (#729)
gonfunko Sep 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 46 additions & 12 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
# Runs on pushes targeting the default and experimentation branches.
push:
branches: ['main']
branches:
- main
- add-screen-reader-support-experimental

# Allows you to run this workflow manually from the Actions tab
# Allows the workflow to be manually run from the Actions tab.
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
contents: read
pages: write
Expand All @@ -26,45 +28,77 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout blockly
- name: Checkout tip-of-tree core Blockly
uses: actions/checkout@v4
with:
path: blockly
repository: google/blockly
ref: develop

- name: Checkout blockly-keyboard-experimentation
- name: Checkout add-screen-reader-support-experimental core Blockly
uses: actions/checkout@v4
with:
path: blockly-add-screen-reader-support-experimental
repository: google/blockly
ref: add-screen-reader-support-experimental

- name: Checkout tip-of-tree blockly-keyboard-experimentation
uses: actions/checkout@v4
with:
path: blockly-keyboard-experimentation

- name: Checkout add-screen-reader-support-experimental blockly-keyboard-experimentation
uses: actions/checkout@v4
with:
path: blockly-keyboard-experimentation-add-screen-reader-support-experimental
ref: add-screen-reader-support-experimental

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Build blockly
- name: Build tip-of-tree core Blockly
run: |
cd blockly
npm ci
npm run package
cd dist
npm link
cd ../..

- name: Build blockly-keyboard-experimentation
- name: Build tip-of-tree blockly-keyboard-experimentation
run: |
cd blockly-keyboard-experimentation
npm ci
npm link blockly
npm run ghpages
cd ..
mkdir ../ghpages
cp -r build/* ../ghpages/

- name: Build add-screen-reader-support-experimental core Blockly
run: |
cd blockly/dist
npm unlink -g
cd ../../blockly-add-screen-reader-support-experimental
npm ci
npm run package
cd dist
npm link

- name: Build add-screen-reader-support-experimental blockly-keyboard-experimentation
run: |
cd blockly-keyboard-experimentation-add-screen-reader-support-experimental
npm ci
npm link blockly
npm run ghpages
mkdir ../ghpages/screenreader
cp -r build/* ../ghpages/screenreader/

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload build folder
path: './blockly-keyboard-experimentation/build'
# Upload configured GH pages site files.
path: './ghpages'

deploy:
environment:
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ import {KeyboardNavigation} from '@blockly/keyboard-navigation';
// Must be done before calling Blockly.inject.
KeyboardNavigation.registerKeyboardNavigationStyles();

// Register the default toolbox. Only do this once per page-load.
// Must be done before calling Blockly.inject.
// See instructions below if you don't use the default toolbox.
KeyboardNavigation.registerNavigationDeferringToolbox();

// Inject Blockly.
const workspace = Blockly.inject('blocklyDiv', {
toolbox: toolboxCategories,
Expand All @@ -81,7 +86,7 @@ const workspace = Blockly.inject('blocklyDiv', {
const keyboardNav = new KeyboardNavigation(workspace);
```

## Add shortcuts to page
### Add shortcuts to page

In order to see the keyboard help popup when the user presses /, you need to add an empty div element to the hosting page that has the Blockly div element with the id "shortcuts". The plugin will take care of layout and formatting.

Expand All @@ -93,7 +98,20 @@ In order to see the keyboard help popup when the user presses /, you need to add
...
```

### Usage with cross-tab-copy-paste plugin
### Use with custom Toolbox implementation

If you supply your own subclass of `Toolbox`, you need to override the `onKeyDown_` method to make it a no-op. The base class has its own keyboard navigation built-in that you need to disable.

```js
class YourCustomToolbox extends Blockly.Toolbox {
protected override onKeyDown_(e: KeyboardEvent) {
// No-op, prevent keyboard handling by superclass in order to defer to
// global keyboard navigation.
}
}
```

### Use with cross-tab-copy-paste plugin

This plugin adds context menu items for copying & pasting. It also adds feedback to copying & pasting as toasts that are shown to the user upon successful copy or cut. It is compatible with the `@blockly/plugin-cross-tab-copy-paste` by following these steps:

Expand Down
Loading
Loading