Skip to content

Conversation

@cwillisf
Copy link
Contributor

@cwillisf cwillisf commented Nov 7, 2025

See also scratchfoundation/scratch-blocks#3412

Proposed Changes

Add a new block to the Sensing category to detect whether or not the system is online (has an active Internet connection).

Reason for Changes

Scratch users have discovered ways to check for online status, most commonly by repeatedly using the Translate extension. While I applaud the ingenuity, this approach generates excess load on the Translate infrastructure. Scratchers and the Scratch Team will all have a better time if we provide a direct way to check for online status.

I'm open to feedback, including:

  • Should the label of the monitor be something other than online?
  • I definitely think this block belongs in the Sensing category, but is this (just before username) the right place for it within the category?

Test Coverage

Tested locally:
image

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Test report for scratch-vm

    1 files  ±0    770 suites  ±0   1m 5s ⏱️ ±0s
1 686 tests ±0  1 686 ✅ ±0   0 💤 ±0  0 ❌ ±0 
4 891 runs  ±0  4 861 ✅ ±0  30 💤 ±0  0 ❌ ±0 

Results for commit 031d2b7. ± Comparison against base commit 67176de.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Test report for scratch-gui

  2 files  ±0   62 suites  ±0   9m 27s ⏱️ -34s
398 tests ±0  390 ✅ ±0  8 💤 ±0  0 ❌ ±0 
416 runs  ±0  408 ✅ ±0  8 💤 ±0  0 ❌ ±0 

Results for commit 031d2b7. ± Comparison against base commit 67176de.

@CST1229
Copy link

CST1229 commented Nov 7, 2025

Should the label of the monitor be something other than online?

Honestly, I thought block monitors were always named directly after the block (so, is online?). But since that's not the case, online is also fine.

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.

4 participants