Integrate blockly kb controls#625
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughRefactors the Blockly event selection handler with optional chaining for safer parent-chain traversal and enhances CSS styling for keyboard navigation focus states across comment text, color field selection, and toolbox/flyout containers. ChangesBlockly focus behavior
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
main/blocklyinit.js (1)
505-505:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the speculative comment about Blockly toasts.
The comment "// Assuming Blockly 13 has removed toasts, this is not needed" is incorrect—Blockly 13 did not remove the Toast API. The Toast namespace and class remain part of Blockly's public API. Additionally, the comment violates the coding guideline that comments should reflect the current state of code only, not assumptions. Remove this comment entirely.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@main/blocklyinit.js` at line 505, Remove the incorrect speculative comment "// Assuming Blockly 13 has removed toasts, this is not needed" that appears next to the DOM creation of the block element (the const block = document.createElement("block") line) in main/blocklyinit.js; simply delete that comment so the code and comments reflect only factual state (no replacement text needed), ensuring no other code relies on the removed comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@style/blockly.css`:
- Around line 169-170: The CSS rule that forces comment textarea text to black
(the global "color: black !important;" on comment textareas) can make text
unreadable in dark themes; update the stylesheet to pair the forced black text
with a light background for the unfocused state (or add theme-specific overrides
for dark, dark-contrast, low-vision) so comment text remains readable when not
focused—modify the same selector that currently sets "color: black !important;"
and ensure it also sets a contrasting background-color (or adds selectors scoped
to dark-theme classes) consistent with the focused-state rules around lines
177-181.
---
Outside diff comments:
In `@main/blocklyinit.js`:
- Line 505: Remove the incorrect speculative comment "// Assuming Blockly 13 has
removed toasts, this is not needed" that appears next to the DOM creation of the
block element (the const block = document.createElement("block") line) in
main/blocklyinit.js; simply delete that comment so the code and comments reflect
only factual state (no replacement text needed), ensuring no other code relies
on the removed comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5618f958-d6be-4b97-afb1-0d298713315d
📒 Files selected for processing (2)
main/blocklyinit.jsstyle/blockly.css
Summary
Tasks for #357
AI usage
Claude Sonnet 4.6 used throughout, colours and decisions made by a human and all code changes individually approved.
Summary by CodeRabbit
Bug Fixes
Style