-
Notifications
You must be signed in to change notification settings - Fork 336
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
Conversation
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.
Some minor comments. This is awesome!
packages/devtools_app/lib/src/debugger/debugger_controller.dart
Outdated
Show resolved
Hide resolved
} | ||
|
||
@override | ||
List<SourceToken> matchesForSearch(String search) { |
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.
Can we adjust this to search across lines?
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.
do you mean search for a query like 'hello world' where 'hello' is on line 1 and 'world' is on line 2?
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.
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.
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.
The IDEs don't support this type of search either, so I think it's on par if we leave as is.
Added tests for search matching logic. |
tests are passing except for flakes like 0.00% golden image diffs unrelated to this PR. Landing. |
cmd+f / ctrl+f opens the search bar. Pressing escape or clicking the 'x' button hides the search bar and clears search results.