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

Add search in file functionality to the debugger code view. #2931

Merged
merged 5 commits into from
Apr 23, 2021

Conversation

kenzieschmoll
Copy link
Member

@kenzieschmoll kenzieschmoll commented Apr 22, 2021

cmd+f / ctrl+f opens the search bar. Pressing escape or clicking the 'x' button hides the search bar and clears search results.
debugger-search

Copy link
Member

@grouma grouma left a comment

Choose a reason for hiding this comment

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

Some minor comments. This is awesome!

}

@override
List<SourceToken> matchesForSearch(String search) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we adjust this to search across lines?

Copy link
Member Author

@kenzieschmoll kenzieschmoll Apr 22, 2021

Choose a reason for hiding this comment

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

do you mean search for a query like 'hello world' where 'hello' is on line 1 and 'world' is on line 2?

Copy link
Member

Choose a reason for hiding this comment

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

The latter. hello on line 1 and world on line two. I thought Chrome supported this but that doesn't seem to be the case. This is probably fine regardless.

Copy link
Member Author

Choose a reason for hiding this comment

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

The IDEs don't support this type of search either, so I think it's on par if we leave as is.

@kenzieschmoll
Copy link
Member Author

Added tests for search matching logic.

@kenzieschmoll
Copy link
Member Author

tests are passing except for flakes like 0.00% golden image diffs unrelated to this PR. Landing.

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.

2 participants