Replace the search indicator with a real editable field - #85
Open
alvst wants to merge 1 commit into
Open
Conversation
The previous search UI was a synthetic pill built from captured keystrokes — appended-only, no cursor, no click-to-edit, no text selection or IME support. NativeBarSearchField is a real NSTextField edited through the normal AppKit responder chain (kept mounted even in its compact zero-width state, so the bar's key monitor can focus it synchronously and hand off the very first keystroke without losing it). BarInputMode tracks whether focus belongs to the field or the clip strip, so the monitor and the field agree on who owns a given key without probing the first-responder chain from every call site.
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.
The search UI was a synthetic pill assembled from captured keystrokes: append-only, with no cursor, no click-to-edit, no selection, and no IME. This replaces it with a real
NSTextFieldedited through the normal AppKit responder chain.What changed
NativeBarSearchFieldis a real text field: cursor, click-to-edit, text selection, ⌘A/⌘X/⌘C/⌘V, and IME/dead-key input all work.BarInputModetracks whether the field or the clip strip owns focus, so the key monitor and the field agree on who handles a given key instead of probing the responder chain from every call site.Screenshots
Before:

After:

Notes for review
alvie/pr-27-space-preview-with-searchexists because this branch andalvie/pr-quicklookinteract — a focused field would otherwise swallow Space-to-preview. That's fixed in its own PR, not here; nothing in this branch regresses on its own.This feature should be bundled into v2.
Part of #80.