Add in-preview find with match highlighting and navigation - #33
Merged
Conversation
Replaces VirtualTable's basic row filter with an editor-style find shared by the table previews and the VCF preview. Ctrl/Cmd+F opens a find bar; matches are highlighted in place with next/previous navigation (Enter / Shift+Enter / F3), a match count, a case-sensitivity toggle, and an optional filter-to-matches mode. Matching rows are scrolled into view and the active match row is emphasised. Adds a shared useTableFind hook, a highlightMatches helper, and a presentational FindBar, wired into VirtualTable (covering the table previews) and VcfPreview (alongside its structured filter bar). Includes unit and component tests for the highlighter, the hook (match counting, navigation wrapping, filter mode), and the bar.
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
Upgrades preview search from a plain row filter to an editor-style find, shared across the 13
VirtualTablepreviews and the VCF preview. This is the biggest interactive-UX gap:VirtualTableonly filtered, and VCF had no text find at all.What's new
Ctrl/Cmd+Fopens a find bar in the preview;Esccloses.<mark>across visible cells (the editor model), rather than filtering rows away.Enter/Shift+Enter(andF3/Shift+F3) cycle matches; the list scrolls to the active match and the row is emphasised. A "3 / 27" counter shows position.Design
useTableFindhook owns query/options/active-match state and computes matching rows over the loaded set (debounced); a presentationalFindBarand ahighlightMatcheshelper are reused by both hosts. This mirrors the diagnostics-context pattern.Testing
highlight.test.tsx— empty/no-match passthrough, case sensitivity, multiple occurrences.useTableFind.test.tsx— debounced match counting, next/prev wrapping, filter-to-matches, zero-match state.FindBar.test.tsx— open/closed render, position/"No results" label, button + Enter/Shift+Enter wiring, disabled nav.Follow-ups (not in this PR)