Skip to content

Show appropriate flycam message on touch - #710

Merged
lawsie merged 1 commit into
flipcomputing:mainfrom
lawsie:flycam-message
Jul 16, 2026
Merged

Show appropriate flycam message on touch#710
lawsie merged 1 commit into
flipcomputing:mainfrom
lawsie:flycam-message

Conversation

@lawsie

@lawsie lawsie commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Show a more relevant message on mobile when the fly cam is activated

image

AI usage

Code and translations written by Claude Sonnet 5, supervised by a human.

Summary by CodeRabbit

  • New Features
    • Added touch-specific instructions for Fly Camera mode.
    • Fly Camera onboarding now automatically displays appropriate guidance for touch-enabled devices.
    • Added localized touch instructions across supported languages, including English, German, Spanish, French, Italian, Polish, Portuguese, and Swedish.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Touch-specific fly-camera translations were added for eight locales. Fly-mode camera-gizmo instructions now select the touch translation when touch or coarse input is detected, while retaining the existing instruction for other devices.

Changes

Touch fly-camera onboarding

Layer / File(s) Summary
Touch-specific locale messages
locale/de.js, locale/en.js, locale/es.js, locale/fr.js, locale/it.js, locale/pl.js, locale/pt.js, locale/sv.js
Each locale adds the fly_camera_instructions_touch translation for on-screen controls and drag-based camera viewing.
Touch detection and instruction selection
ui/gizmos.js
Adds isTouchDevice detection using touch support, maximum touch points, and coarse-pointer media queries; fly mode selects the touch or standard instruction accordingly.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant handleCameraGizmo
  participant isTouchDevice
  participant LocaleTranslations
  handleCameraGizmo->>isTouchDevice: detect touch or coarse input
  isTouchDevice-->>handleCameraGizmo: return device classification
  handleCameraGizmo->>LocaleTranslations: select touch or standard fly-camera instruction
  LocaleTranslations-->>handleCameraGizmo: return localized text
Loading

Suggested reviewers: tracygardner, claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: showing a touch-specific fly camera message on touch devices.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ui/gizmos.js (1)

2379-2385: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep touch fly controls enabled
_onScreenSource.pause() suspends InputManager updates, so the on-screen buttons no longer move the camera even though the hint tells touch users to use them. Either keep that source active in fly mode or update the copy to the actual available gesture.

🤖 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 `@ui/gizmos.js` around lines 2379 - 2385, Remove or avoid pausing
flock._onScreenSource when entering fly mode so InputManager continues
processing touch controls and the existing fly_camera_instructions_touch hint
remains accurate; preserve the gamepad and keyboard fly-mode setup.
🤖 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/pt.js`:
- Around line 1165-1166: Update the fly_camera_instructions_touch locale string
to use European Portuguese terminology consistently: replace the Brazilian terms
for camera, controls, and screen with the locale’s established equivalents,
while preserving the message meaning and emoji.

---

Outside diff comments:
In `@ui/gizmos.js`:
- Around line 2379-2385: Remove or avoid pausing flock._onScreenSource when
entering fly mode so InputManager continues processing touch controls and the
existing fly_camera_instructions_touch hint remains accurate; preserve the
gamepad and keyboard fly-mode setup.
🪄 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: f58e6458-8fe2-49aa-a229-1421c3b29b27

📥 Commits

Reviewing files that changed from the base of the PR and between 159de5b and 5261498.

📒 Files selected for processing (9)
  • locale/de.js
  • locale/en.js
  • locale/es.js
  • locale/fr.js
  • locale/it.js
  • locale/pl.js
  • locale/pt.js
  • locale/sv.js
  • ui/gizmos.js

Comment thread locale/pt.js
@lawsie
lawsie merged commit bfad5a3 into flipcomputing:main Jul 16, 2026
3 checks passed
@lawsie
lawsie deleted the flycam-message branch July 16, 2026 09:33
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