Skip to content

Block tip hint bar - #746

Merged
lawsie merged 7 commits into
flipcomputing:mainfrom
lawsie:block-tip-hint-bar
Aug 13, 2026
Merged

Block tip hint bar#746
lawsie merged 7 commits into
flipcomputing:mainfrom
lawsie:block-tip-hint-bar

Conversation

@lawsie

@lawsie lawsie commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Users are shown block hints on the top right corner of the workspace. These come from the locale files.
image

Desktop users are shown a one-time message on startup for how to hide the hints:
image

Mobile users are shown a one-time message for how to enable the hints:
image

Toggle setting appears on the tools menu
image

Summary by CodeRabbit

  • New Features

    • Added optional block hints that display helpful tooltips when selecting blocks.
    • Added Tools menu controls to show or hide block hints.
    • Added contextual guidance during loading, including the hint setting and menu location.
    • Block hints are disabled by default on mobile layouts.
  • Localization

    • Added translated hint controls for German, Spanish, French, Italian, Polish, Portuguese, and Swedish.
  • Bug Fixes

    • Improved and corrected several block tooltips, including conditional, start, jump, speed, and rotation guidance.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@lawsie, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0411745f-1d4d-449b-b261-c3099855e5cd

📥 Commits

Reviewing files that changed from the base of the PR and between 08e3f9f and e869a4b.

📒 Files selected for processing (10)
  • locale/de.js
  • locale/en.js
  • locale/es.js
  • locale/fr.js
  • locale/it.js
  • locale/pl.js
  • locale/pt.js
  • locale/sv.js
  • style.css
  • ui/blockHint.js
📝 Walkthrough

Walkthrough

The application adds selectable Blockly block hints. Hints appear for selected blocks, support localized menu messages, default to disabled on narrow layouts, and use new tooltip and localization entries.

Changes

Blockly block hints

Layer / File(s) Summary
Hint rendering and display state
ui/blockHint.js, index.html, style.css
Adds block-hint state management, safe tooltip rendering, one-off messages, clearing and hiding operations, and styled hint elements.
Selection and menu integration
main/blockhandling.js, main/main.js, main/loading.js, index.html, style.css
Displays the selected block tooltip, clears it when selection ends, and adds a Tools menu toggle with localized loading-screen guidance.
Tooltip and localization updates
blocks/control.js, locale/*.js, main/translation.js
Adds the conditional-block tooltip, block-hint labels across supported locales, and revised tooltip wording and keyword labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Blockly
  participant BlockHint
  participant ToolsMenu
  User->>Blockly: Select a block
  Blockly->>BlockHint: Pass block tooltip
  BlockHint-->>User: Display block hint
  User->>ToolsMenu: Toggle block hints
  ToolsMenu->>BlockHint: Update enabled state
  BlockHint-->>User: Show or hide hint
Loading

Possibly related PRs

  • flipcomputing/flock#698: Adds related block-hint functionality through a floating context-menu toolbar and keyboard toggle.

Suggested reviewers: tracygardner, claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a block hint bar for workspace tooltips.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 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 `@locale/en.js`:
- Around line 1105-1107: In the locale definitions, add
block_hints_menu_location_ui to locale/es.js and every staged locale file that
lacks it, translating the message with each locale’s actual menu labels rather
than relying on the English fallback. Keep the existing show_block_hints_ui and
hide_block_hints_ui entries unchanged.

In `@locale/es.js`:
- Line 550: Update the Spanish tooltip string in the jump-related localization
entry to remove the claim that jumping moves the character forward with
momentum, while retaining the height, preserved running speed, physics
requirement, and keyword text.

In `@main/translation.js`:
- Line 203: Restore the Spanish keyword label to “Palabra clave” in the dynamic
translation entry in main/translation.js:203-203 and all affected tooltip
entries in locale/es.js:250-250, 396-411, 440-548, 551-586, 596-612, 622-633,
644-674, and 685-689, covering the listed set_speed, scene, model, animation,
camera, combine, connect, control, effects, events, materials, physics, sensing,
shape, sound, speech, text, math, transform, and XR rumble tooltips.

In `@style.css`:
- Around line 615-631: Update the .block-hint style to set pointer-events to
none, ensuring the overlaid hint does not intercept workspace selection or drag
interactions.

In `@ui/blockHint.js`:
- Around line 29-32: Update setBlockHintsEnabled to retain the most recently
selected block hint and render that stored hint when enabled changes back to
true, while preserving the existing hideBlockHint behavior when disabling hints.
Ensure the selected-block handling stores the hint even when hints are disabled
so re-enabling does not depend on another Blockly.Events.SELECTED event.
🪄 Autofix

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 Plus

Run ID: 71e824b3-79c1-49e3-bc35-0946949f96dd

📥 Commits

Reviewing files that changed from the base of the PR and between bc1605e and 08e3f9f.

📒 Files selected for processing (16)
  • blocks/control.js
  • index.html
  • locale/de.js
  • locale/en.js
  • locale/es.js
  • locale/fr.js
  • locale/it.js
  • locale/pl.js
  • locale/pt.js
  • locale/sv.js
  • main/blockhandling.js
  • main/loading.js
  • main/main.js
  • main/translation.js
  • style.css
  • ui/blockHint.js

Comment thread locale/en.js
Comment thread locale/es.js Outdated
Comment thread main/translation.js Outdated
Comment thread style.css
Comment thread ui/blockHint.js
@lawsie
lawsie requested a review from tracygardner August 11, 2026 15:19
@lawsie

lawsie commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@tracygardner I've requested your review for this one because it's not on the list, so feel free to not merge it if you don't like it. I went to start making a project and I was trying to figure out what one of the camera blocks did, so I thought it might be handy to be able to see the already existing tooltips more prominently.

@lawsie
lawsie merged commit 5a53533 into flipcomputing:main Aug 13, 2026
3 checks passed
@lawsie
lawsie deleted the block-tip-hint-bar branch August 13, 2026 10:28
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