Skip to content

Rename accessible blocks and only show option for project with blocks#55

Closed
microbit-grace wants to merge 2 commits intoblockly-12from
rename-accessible-blocks
Closed

Rename accessible blocks and only show option for project with blocks#55
microbit-grace wants to merge 2 commits intoblockly-12from
rename-accessible-blocks

Conversation

@microbit-grace
Copy link
Collaborator

@microbit-grace microbit-grace commented May 28, 2025

  • Rename "accessible blocks" -> "keyboard controls"
  • Only show keyboard controls help and keyboard controls on/off settings menu items for projects with blocks

TODO after blockly 12 + keyboard nav plugin update PR is merged

  • Rename "accessible blocks" in the code base

@cloudflare-workers-and-pages
Copy link

Deploying review-pxt with  Cloudflare Pages  Cloudflare Pages

Latest commit: 28e7bcc
Status: ✅  Deploy successful!
Preview URL: https://fae45fe0.review-pxt.pages.dev
Branch Preview URL: https://rename-accessible-blocks.review-pxt.pages.dev

View logs

Comment on lines +86 to +90
const languageRestriction = pkg.mainPkg?.config?.languageRestriction;
const pyOnly = languageRestriction === pxt.editor.LanguageRestriction.PythonOnly;
const noBlocks = languageRestriction === pxt.editor.LanguageRestriction.NoBlocks;
const tsOnly = languageRestriction === pxt.editor.LanguageRestriction.JavaScriptOnly;
return !pyOnly && !tsOnly && !noBlocks && !!pkg.mainEditorPkg().files[pxt.MAIN_BLOCKS];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This logic is taken from https://github.com/microbit-matt-hillsdon/pxt/blob/blockly-12/webapp/src/container.tsx#L541 so that when the blocks toggle is visible, the keyboard controls would be visible. Not sure if this is the best way of doing it, suggestions welcomed!

@microbit-grace
Copy link
Collaborator Author

Close this PR as there's already one opened against master

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.

1 participant