-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
highlight search query in 'Open Quickly' results #1790
highlight search query in 'Open Quickly' results #1790
Conversation
58dfff4
to
4314f7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the change, just 2 more small things
- Created `OpenQuicklySearchResult` struct to store fuzzy search results (file urls and matched characters). This replaces the `openQuicklyFiles` variable which only stored the file urls. - Updated `QuickSearchResultLabel` to receive the matched characters to be highlighted instead of computing it within the struct. Also created `nsLabelName` property to help display `QuickActionsView` results. - Updated `QuickActionsViewModel` to compute its highlighted characters within the struct.
Visuals for Before: before-visuals.for.remove.flickering.commit.movAfter: after-visuals.for.remove.flickering.commit.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one more issue. I need help with it. Instead of over explaining, I'll just drop visuals. I'm thinking It can also have its own PR to separate concerns, since its technically not in the scope of this PR. CodeEdit: codeedit-example.movXcode: xcode-example.mov |
@plbstl it may have something to do with this if statement reloading the view:
But I think this PR is large enough to fix that in a different one and merge this now. |
Ah I see, nice. I'll check it out later. I'm on mobile right now. |
Description
This PR highlights the searched text in each result, when searching for files in Open Quickly
Related Issues
Checklist
Screenshots
Before:
After:
open.quickly-affter.pr.changes.3.mov
After requested changes:
after-visuals.for.remove.flickering.commit.mov