Skip to content

Fix selection and block highlight on workspace search - #725

Merged
lawsie merged 1 commit into
flipcomputing:mainfrom
lawsie:fix-ws-search-bug
Jul 28, 2026
Merged

Fix selection and block highlight on workspace search#725
lawsie merged 1 commit into
flipcomputing:mainfrom
lawsie:fix-ws-search-bug

Conversation

@lawsie

@lawsie lawsie commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug where clicking on a search result block would result in it turning fully yellow.
Sets the first result as the current selection to avoid weird cursor behaviour/confusing highlights.

AI usage

Claude Opus 5 used throughout. Plan created by me. Realised the previous implementation was not a good idea and changed it.

Summary by CodeRabbit

  • New Features

    • Mobile workspace search now supports Arrow Up and Arrow Down navigation while keeping focus in the search field.
    • Search results stay synchronized when blocks are selected in the workspace.
  • Bug Fixes

    • Improved current-match highlighting across desktop and low-vision themes.
    • Updated low-vision search highlights for clearer visibility.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1794c446-4e53-4783-a55c-c339f33c9066

📥 Commits

Reviewing files that changed from the base of the PR and between f519ae1 and 417d59e.

📒 Files selected for processing (2)
  • main/blocklyinit.js
  • style/blockly.css

📝 Walkthrough

Walkthrough

Mobile workspace search gains ArrowUp/ArrowDown navigation, synchronizes its current result with Blockly selection, and updates desktop and low-vision match highlighting to use Blockly-selected paths.

Changes

Workspace search interaction

Layer / File(s) Summary
Search navigation and selection synchronization
main/blocklyinit.js
Mobile search handles arrow-key navigation, current matches use Blockly block selection, and selected-block events update the search cursor.
Search match styling
style/blockly.css
Desktop matches use pale yellow fill, while low-vision matches use dashed white outlines on paths that are not selected.

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

Sequence Diagram(s)

sequenceDiagram
  participant MobileSearchInput
  participant workspaceSearch
  participant BlocklyWorkspace
  MobileSearchInput->>workspaceSearch: next() or previous()
  workspaceSearch->>BlocklyWorkspace: select current block
  BlocklyWorkspace->>workspaceSearch: selected block change
  workspaceSearch->>workspaceSearch: update current result
Loading

Possibly related PRs

Suggested reviewers: tracygardner

🚥 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 clearly summarizes the workspace search selection and block highlight fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@lawsie
lawsie merged commit e3aac85 into flipcomputing:main Jul 28, 2026
3 checks passed
@lawsie
lawsie deleted the fix-ws-search-bug branch July 28, 2026 09:54
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