Skip to content
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

Merged
merged 17 commits into from
Jul 7, 2024

Conversation

plbstl
Copy link
Contributor

@plbstl plbstl commented Jul 2, 2024

Description

This PR highlights the searched text in each result, when searching for files in Open Quickly

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Before:

open-quickly-codeedit

open-quickly-codeedit-2

After:

open quickly-affter pr changes

open quickly-affter pr changes 2

open.quickly-affter.pr.changes.3.mov

After requested changes:

after-visuals.for.remove.flickering.commit.mov

@plbstl plbstl force-pushed the highlight-open-quickly-results branch from 58dfff4 to 4314f7d Compare July 3, 2024 01:17
Copy link
Member

@FastestMolasses FastestMolasses left a 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

@tom-ludwig
Copy link
Member

Thank you for your work!
While your approach works well with simple queries like the ones you demonstrated, it becomes misleading with fuzzy queries. Please note that our fuzzy search also returns the matched ranges, which should be highlighted.

Here is an example:
Expected Result: ActivityViewer.swift
Actual Result:
Screenshot 2024-07-03 at 10 21 29 AM

@plbstl
Copy link
Contributor Author

plbstl commented Jul 3, 2024

Visuals for 125d76a (#1790)

Before:

before-visuals.for.remove.flickering.commit.mov

After:

after-visuals.for.remove.flickering.commit.mov

Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I suggested one quick change that makes selected rows' highlighted text color white for more contrast. Can approve asap after that.

Before:
Screenshot 2024-07-03 at 7 33 14 PM

After:
Screenshot 2024-07-03 at 7 32 42 PM
Dark mode stays the same:
Screenshot 2024-07-03 at 7 33 25 PM

@thecoolwinter thecoolwinter mentioned this pull request Jul 4, 2024
6 tasks
@plbstl
Copy link
Contributor Author

plbstl commented Jul 4, 2024

There is one more issue. I need help with it. Instead of over explaining, I'll just drop visuals.

I'm thinking NSTableViewWrapper.updateNSView is where to start looking. The view is reloaded, and then a selection is made.

It can also have its own PR to separate concerns, since its technically not in the scope of this PR.

CodeEdit:

codeedit-example.mov

Xcode:

xcode-example.mov

@thecoolwinter
Copy link
Collaborator

@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.

@plbstl
Copy link
Contributor Author

plbstl commented Jul 4, 2024

@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.

@thecoolwinter thecoolwinter merged commit a220b38 into CodeEditApp:main Jul 7, 2024
2 checks passed
@austincondiff austincondiff added the enhancement New feature or request label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Open Quickly does not highlight search query
5 participants