Skip to content

Conversation

@maribethb
Copy link
Collaborator

Merges main in to keep feature branch up to date and pull in new features & fixes.

maribethb and others added 18 commits August 7, 2025 18:10
* chore: rearrange html to be a little nicer

* fix: dont show shortcuts with no keys

* fix: update shortcuts shown in dialog

* fix: i18n for keyboard help header

* fix: fix return type
Fixes #686

This updates the GH pages workflow to:
- Automatically deploy with changes to both `main` and `add-screen-reader-support-experimental` (the screen reader experimental branch--see RaspberryPiFoundation/blockly#9283).
- Upload the screen reader version of the playground to a new `/screenreader` subdirectory in the plugin repo's GitHub pages deployment.

This will approximately double the amount of time needed for the GH pages deployment since it requires building two distinct copies of core Blockly and the plugin (tip-of-tree versions and the screen reader experimentation versions).

Conveniently, this will act as a fast way to see screen reader changes since they will go live a few minutes after a change to the plugin. Unfortunately, that does not reciprocate for changes to core Blockly (where most of the screen reader changes will actually occur), so oftentimes a manual run of the workflow will be needed (which should suffice in those cases).

Note that this needs to be approached in this way (building and uploading both projects for changes to either branch) since the action being used for deployment doesn't support partial deployment. See: actions/deploy-pages#349.
…dates (#683)

Bumps the npm_and_yarn group with 2 updates in the / directory: [on-headers](https://github.com/jshttp/on-headers) and [compression](https://github.com/expressjs/compression).


Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](jshttp/on-headers@v1.0.2...v1.1.0)

Updates `compression` from 1.8.0 to 1.8.1
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](expressjs/compression@1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: RoboErikG <[email protected]>
* fix(tests): Restore window size after scroll tests

* docs(tests): "Selenium" -> "WebdriverIO"

  We aren't using Selenium, so we shouldn't be saying we do.

* chore(tests): Make timeout(0) calls only when PAUSE_TIME is nonzero

  With PAUSE_TIME set to zero, on my relatively fast laptop none of
  these tests run slow enough to fail due to the default 2s timeous, and
  even with PAUSE_TIME set to 50ms the slowest test is 1024ms (of which
  700ms is spent in brower.pause calls inside sendKeyAndWait).

  We do want to disable timeouts when debugging tests, both because we
  might set PAUSE_TIME to a larger value and because we might use the
  debugger to pause things entirely, but we don't need to disable
  timeouts when running tests just to check their results.

* fix(tests): Set PAUSE_TIME to 0

  It's very useful to be able to make tests run more slowly so you
  can watch them, but they should run as fast as possible by default.

  This cuts total test execution time on a 2021 MacBook Pro M1
  approximately in half, from 42s to 22s.

* refactor(tests): Use sendKeyAndWait where appropriate

  In most places we were already following browser.keys with a
  browser.pause(PAUSE_TIME), so using sendKeysAndWait is more
  succinct; in other places we didn't have the pause but it is
  not harmful to add a pause (especially now the default PAUSE_TIME
  is zero) and could be helpful when watching tests run with a
  non-zero PAUSE_TIME.

* fix(tests): Make tabNavigateToWorkspace idempotent

  Previously this function would just send a bunch of tabs, which
  depended on focus state being as-on-document-load.  Some tests
  (notably the ones in basic_test.ts) that have only a suiteSetup
  and not a (per-test) setup method were only were only passing
  because of the combination of:

  * Due to issue #632, pressing tab when the workspace is focused
    (and there are no further focusable elements on the page)
    incorrectly causes focus to move to the first focusable element
    on the page instead of (as would normally be the case) to the
    browser controls, and
  * The fact that the index.html had exactly one additional focusable
    div on the page, preceding the injection div.

  This meant that calling tabNavigateToWorkspace when the workspace
  was already focused would, only by sheer coincidence, result in the
  focus remaining on the workspace.

  By explicitly focusing a known element, tabNavigateToWorkspace
  should work correctly regardless of how many focusable elements
  are on the page and which one (if any) was focused before the call.

* chore(tests): Remove unneeded tabNavigateToWorkspace calls

  Any time a tabNavigateToWorkspace call is followed by a call to
  focusOnBlock the former can be removed with no discernable effect
  except to make tests run slightly faster and with less flashing
  of the flyout.

* fix(tests): Increase timeout for certain slow tests

* docs(tests): Fix typo

* chore(tests): Add missing timeout(0) calls (when PAUSE_TIME is nonzero)

  These two files were inadvertently omitted from commit 14d619c.

* fix(tests): Lint

* fix(tests): Add missing import
* chore: Added context menu item tests.

* Maybe clicking a different location fixes the github test failure.

* Assigned the expected actions to constants at top of context menu test.

* Fix shadow block action test in github action.

* Fix shadow block action test in github action attempt 2.
The focusOnBlock function moves focus to the workspace regardless
of where it was previously, so there's no need to call
tabNavigateToWorkspace first.
* test(MoveActions): Test starting move using keyboard shortcuts

  Fixes #695.

* refactor(tests): Make sendKeyAndWait faster if PAUSE_TIME === 0

  Making a single webdriverio call is much faster when sending
  repeating keypresses; do that if we don't need to pause.
* refactor(tests): Rename move test blocks to move start test blocks

  Also remove an unnecessary round trip through JSON.stringify + JSON.parse.

* test(Mover): Introduce test blocks and suite for statement move tests

  Introduce moveStatementTestBlocks and suite 'Statement move tests',
  for testing movement of statement blocks.

  Move the existing test for constrained movement following
  unconstrained movement to the new suite.

* test(Mover): Test constrained move of simple stack block left/right

* refactor(tests): Refactor simple stack block move left/right

  Introduce a new helper function, testMove, that encapsulates
  the work needed to test moving a block through a constrained
  move, checking candidate connections and final position.

  Use this helper to reimplement the move left/right test as
  two separate tests.

* test(Mover): Test constrained move of simple stack block up/down

* docs(tests): Improve documentation of getFocusedNeighbourInfo

* test(Mover): Also check index of candidateConnection.local

  Modify getConnectionCandidate to also return the index of
  candidateConnection.local in the list of connections returned
  from block.getConnections_(true), so we can check wich connection
  on the moving block is being used to connect.

  For the simple mover case this is not very interesting (it's
  normally index 0, for the previous connection, occasionally
  index 1 if the moving block will be the new top block in a stack)
  but this will be more important for tests involving moving more
  complexly-shaped blocks.

* chore(tests): Add block with statment inputs to statement test blocks

  Add a new, E-shaped block with ID complex_mover to
  moveStatementTestBlocks, and update expected test results for
  statement move tests.

* test(Mover): Test constrained move of stack block with statement inputs

  Note that this test verifies current behaviour which, due to
  bug #702, does not conform to the desired behaviour.  There are
  TODOs to update tests to desired behaviour when bug is fixed.

* docs(tests): Correct copied comment
* fix(tests): Suppress tsc unintentional comparison error

  When PAUSE_TIME is set to a value other than 0 the comparison
  in sendKeyAndWait generates a TS unintentionl comparison error.

* refactor(tests): Simplify moveTest

  Simplify moveTest (and the tests that use it) by assuming that
  the move always finishes in the same location it started in.

  We will leave testing various move end scenarios (e.g. healing)
  for a separate suite of move-finishing tests, akin to existing
  move start tests.

* fix(tests): eslint-disable to ignore @ts-igonre

* test(Mover): Introduce test blocks and suite for value move tests

  Introduce moveValueTestBlocks and a suite 'Value expression move
  tests' for each of two renderers (geras, zelos) to test constrained
  movement of value blocks.

* test(Mover): Add value expression right/left move tests

  Moving value blocks left/right behaves as expected when using
  geras, but in zelos there is a bug where external inputs
  are not visited in the expected order (not that external inputs
  _look_ external when using geras, but still it is a possible
  configuration and should behave as expected).

  Note that two of these tests fail due to a bug; this will be dealt
  with in the next commit.

* refactor(tests): Use text_join, nested suites

  Refactor the simple value expression move tests as follows:

  - Use text_join rather than text_count, as the former is a more
    plausible example of an value block with multiple external
    inputs.
  - Use common outer suite with nested suites for each of the
    different renderers, moving common constants to outer suite.

* feat(tests): Add blocks for complex value block move tests

* refactor(tests): Further organise with nested suites

* test(Mover): Add value row (no free inputs) right/left tests

* test(Mover): Add unary expression right/left tests

* chore(tests): Skip failing zelos value block move tests due to #707.

* chore(tests): Skip failing unary move right tests due to #709

* fix(tests): Remove debugging console.log

* fix(tests): Ignore unhelpful lint error
* chore: Update Blockly dependency to 12.3.0.

* release: bump version to 3.0.0

* chore: Update Blockly peer dependency to 12.3.0.

* release: bump version to 3.0.1
… move tests (#711)

* feat(tests): Introduce appendBlock test helper

  Creaet a new test helper appendBlock, that will create a new block
  from JSON and connect it as requested.

* refactor(tests): Use appendBlock in statement move tests

  This means the test blocks don't need to include the block(s) to be
  moved.

* refactor(tests): Use appendBlock in value move tests

  This means the test blocks don't need to include the block(s) to be
  moved, which considerably simplifies adding several more test cases.

* chore(tests): Improve value move tests checking vs. unconnected block

  Use an unconnected (top-level) block with two empty value inputs,
  to allow us to better compare order of visiting inputs vs. outputs
  of top-level blocks.

* test(Mover): Add complex expression right/left move tests
* chore: Make the default test page include advanced playground features.

* chore: Remove unused import.

* fix: Fix registration exceptions on reinjection.
* chore: fix a bug in flaky move test

* chore: add assert to make sure context menu is selected

* chore: try using keyboard to start move

* chore: lint

* Revert "chore: lint"

This reverts commit c906f12.

* Revert "chore: try using keyboard to start move"

This reverts commit 6a474f7.

* fix: add class to move indicator bubble

* chore: minor refactor
@maribethb maribethb requested a review from a team as a code owner September 12, 2025 18:05
@maribethb maribethb requested review from RoboErikG and removed request for a team September 12, 2025 18:05
Copy link
Contributor

@RoboErikG RoboErikG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the workflows were changed to run against main instead of the local branch. Should that piece be reverted?

push:
branches:
- add-screen-reader-support-experimental
- main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the branch names get changed?

@maribethb
Copy link
Collaborator Author

It looks like the workflows were changed to run against main instead of the local branch. Should that piece be reverted?

Thanks, this is fixed now that Christopher updated main again.

@maribethb maribethb merged commit a86068b into add-screen-reader-support-experimental Sep 15, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants