feat: add MicroBit More tilt/pin Ruby conversion (Issue #20)#522
Merged
takaokouji merged 3 commits intodevelopfrom Jan 16, 2026
Merged
feat: add MicroBit More tilt/pin Ruby conversion (Issue #20)#522takaokouji merged 3 commits intodevelopfrom
takaokouji merged 3 commits intodevelopfrom
Conversation
…nsion Update Japanese translations for tilt gestures to use "に" instead of "へ": - "上へ傾いた" → "上に傾いた" - "下へ傾いた" → "下に傾いた" - "左へ傾いた" → "左に傾いた" - "右へ傾いた" → "右に傾いた" This aligns the MicroBit More extension labels with the original microbit extension for consistency. Refs smalruby/smalruby3-develop#20 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Implement bidirectional conversion between MicroBit More blocks and Ruby:
Block to Ruby conversions:
- whenPinConnected: microbit_more.when_pin_connected(pin)
- whenGesture(MOVED): microbit_more.when("moved")
- whenGesture(TILTED): microbit_more.when("tilted_any")
- whenGesture(TILT_UP/DOWN/LEFT/RIGHT): microbit_more.when("tilted_front/back/left/right")
- isTilted: microbit_more.tilted?(direction)
- getTiltAngle: microbit_more.tilt_angle(direction)
Ruby to Block conversions:
- All above conversions work bidirectionally
Snippet updates:
- Updated button_pressed? description to match block label
- Changed default gesture from "shake" to "moved"
- Added snippets for when_pin_connected, tilted?, tilt_angle
Fixes #20
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated package-lock.json to reference latest scratch-vm changes - Ensures compatibility with recent scratch-vm modifications 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
github-actions bot
pushed a commit
that referenced
this pull request
Jan 16, 2026
…-20-tilt-blocks feat: add MicroBit More tilt/pin Ruby conversion (Issue #20)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MicroBit More拡張機能のIssue #20 に関する以下の実装を行いました:
Implementation Details
Task 3A: Label changes (previous commit)
ja.jsandja-Hira.jslocale filesRuby Conversion (this commit)
Block to Ruby Conversions
microbit_more.when_pin_connected(0)microbit_more.when("moved")microbit_more.when("tilted_any")microbit_more.when("tilted_front/back/left/right")microbit_more.tilted?("any")microbit_more.tilt_angle("front")Snippet Updates
microbit_more.button_pressed?: description を「ボタン [A▼] が押された」に修正microbit_more.when: デフォルト値を "shake" → "moved" に変更、description を「[動いた▼] とき」に修正when_pin_connected,tilted?,tilt_angleTest Coverage
test/unit/lib/ruby-generator/microbit_more.test.jstest/unit/lib/ruby-to-blocks-converter/microbit_more.test.jstest/integration/ruby-tab/extension_microbit_more.test.jsRelated
Fixes smalruby/smalruby3-develop#20
🤖 Generated with Claude Code