Closed
Bug 774788
Opened 12 years ago
Closed 12 years ago
free text search across all scripts
Categories
(DevTools :: Debugger, defect, P2)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 17
People
(Reporter: zpao, Assigned: vporof)
References
Details
(Whiteboard: [fixed-in-fx-team])
Attachments
(2 files, 13 obsolete files)
99.00 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
99.00 KB,
patch
|
Details | Diff | Splinter Review |
It's possible to search within the currently selected file with a magical operator, but I have no idea which file I need to scope my search due to files being combined with nondescript filenames.
IRC discussion leaned towards a new operator, but the operator is really undiscoverable and we can do better. I think we could maybe surface this by having a dropdown radio menu off the magnifier to specify which search type, which would also get reflected in the placeholder text.
* filename
* search current file
* search all files
Assignee | ||
Comment 1•12 years ago
|
||
We could start with the operator first and add a dropdown menu for all the search methods in a followup. Does that sound ok?
Reporter | ||
Comment 2•12 years ago
|
||
Sounds fine to me, just wanted to get all my thoughts out so they didn't get lost. Thanks Victor!
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•12 years ago
|
||
Filed bug 779732.
Assignee | ||
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Comment 4•12 years ago
|
||
WIP.
Assignee | ||
Comment 5•12 years ago
|
||
Basically works. Needs more functionality. I like it.
Attachment #649992 -
Attachment is obsolete: true
Attachment #650134 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Rebased, fixed failing tests, monospace all the things.
Attachment #650134 -
Attachment is obsolete: true
Attachment #650134 -
Flags: feedback?(rcampbell)
Attachment #650197 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 8•12 years ago
|
||
Much, much faster.
Attachment #650159 -
Attachment is obsolete: true
Assignee | ||
Comment 9•12 years ago
|
||
Created a search job pool to speed things up even more.
Clicking on matches jumps the editor to the appropriate file/line and adds a selection around the match.
Pressing ENTER will automatically jump to the first/next match.
Bounce animations!
Speed-wise, this is as fast as I can get it to be.
I also think this is ready UX/UI-wise. Need to write a test and we're done.
Rob, what do you think?
Attachment #650197 -
Attachment is obsolete: true
Attachment #650382 -
Attachment is obsolete: true
Attachment #650197 -
Flags: feedback?(rcampbell)
Attachment #650520 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 10•12 years ago
|
||
Assignee | ||
Comment 11•12 years ago
|
||
Heh. Chrome does a trick thing when searching: it only shows matches for a single script, and collapses all the other stuff.
Searching is pretty fast with the current implementation in this patch, however creating the UI takes quite a while and it's the only bottleneck. If I'd also automatically collapse everything except the first results (like Chrome does), then the performance improvement would be quite significant!
I'll give this a shot.
Comment 12•12 years ago
|
||
some feedback:
Maybe hold off on search and display until the user's stopped typing. (100ms should be enough).
Search results don't scroll when hitting Enter to go to next search result.
NICE!
Assignee | ||
Comment 13•12 years ago
|
||
Optimized the optimizations yo! Addressed rob's comments regarding delayed search.
Scroll into view needs work.
Attachment #650520 -
Attachment is obsolete: true
Attachment #650520 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 14•12 years ago
|
||
Fixed text failures. Cleaned up. Polished. Shaved.
Rob, is there any beachballing going on?
Attachment #650594 -
Attachment is obsolete: true
Attachment #650849 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 15•12 years ago
|
||
Search results now scroll when hitting Enter to go to next search result.
Also, scrolling now automatically expands any collapsed search results that are brought into view.
Writing tests for all this stuff is going to be FUN.
FUN.
Attachment #650849 -
Attachment is obsolete: true
Attachment #650849 -
Flags: feedback?(rcampbell)
Comment 16•12 years ago
|
||
beautiful. I do think we should expand the results by default rather than force a user to click them.
*time passes*
... victor replies with a solution to auto-expand search results when scrolled into view, thereby saving some milliseconds on initial results population...
Assignee | ||
Comment 17•12 years ago
|
||
This is it.
I think I may add another test just to make sure the coverage is super high, but this is definitely reviewable.
Attachment #650900 -
Attachment is obsolete: true
Attachment #652760 -
Flags: review?(rcampbell)
Assignee | ||
Comment 18•12 years ago
|
||
Moar tests.
Attachment #652760 -
Attachment is obsolete: true
Attachment #652760 -
Flags: review?(rcampbell)
Attachment #652871 -
Flags: review?(rcampbell)
Assignee | ||
Comment 19•12 years ago
|
||
Minor changes, reworded some weirdly named events, fixed a potential race condition between clearing the global search view and the scripts cache in the frontend. Try looks green so far.
Reporter | ||
Comment 20•12 years ago
|
||
<3
There's more where that came from when some UI comes together :)
Assignee | ||
Comment 21•12 years ago
|
||
Comment on attachment 650521 [details]
ui
Ping shorlander for feedback.
Video of the thing in action: https://dl.dropbox.com/u/2388316/global-search.webm
Attachment #650521 -
Flags: feedback?(shorlander)
Assignee | ||
Comment 22•12 years ago
|
||
Green on try: https://tbpl.mozilla.org/?tree=Try&rev=0f43a3b906f7
Comment 23•12 years ago
|
||
_onScriptsCleared is gone from debugger-controller.js after bug 783393. Do we need to do our cleanup elsewhere now?
Depends on: 783393
Assignee | ||
Comment 24•12 years ago
|
||
(In reply to Rob Campbell [:rc] (:robcee) from comment #23)
> _onScriptsCleared is gone from debugger-controller.js after bug 783393. Do
> we need to do our cleanup elsewhere now?
No it's not... It's called manually in handleTabNavigation. It has been called manually since forever actually, since the scriptscleared event was never implemented in the prototcol. Development is fun.
Assignee | ||
Comment 25•12 years ago
|
||
Qrefed a failing hunk and rebased on top of THE BUG.
Attachment #650521 -
Attachment is obsolete: true
Attachment #652871 -
Attachment is obsolete: true
Attachment #652911 -
Attachment is obsolete: true
Attachment #650521 -
Flags: feedback?(shorlander)
Attachment #652871 -
Flags: review?(rcampbell)
Attachment #654543 -
Flags: review?(rcampbell)
Assignee | ||
Comment 26•12 years ago
|
||
Comment 27•12 years ago
|
||
Comment on attachment 654543 [details] [diff] [review]
v5.3
Review of attachment 654543 [details] [diff] [review]:
-----------------------------------------------------------------
alright, not a lot to comment on with this. Works well, looks decent.
::: browser/devtools/debugger/debugger-controller.js
@@ +1191,4 @@
> * Additional options for showing the script. Supported options:
> * - targetLine: place the editor at the given line number.
> */
> + showScript: function SS_showScript(aScript, aOptions = {}) {
You made me look this up. Since Firefox 15?
rewrite everything.
::: browser/devtools/debugger/debugger-view.js
@@ +167,5 @@
> + this._onFetchScriptsFinished = this._onFetchScriptsFinished.bind(this);
> + this._onLineClick = this._onLineClick.bind(this);
> + this._onMatchClick = this._onMatchClick.bind(this);
> + this._onResultsScroll = this._onResultsScroll.bind(this);
> + this._startSerach = this._startSerach.bind(this);
TYYYPPPOOOO!!!!
@@ +258,5 @@
> +
> + /**
> + * Starts searching for a token in all the scripts.
> + */
> + _startSerach: function DVGS__startSearch() {
typo. (oh no, he's doing it again)
@@ +668,5 @@
> + /**
> + * Scrolls a match into view.
> + * @param nsIDOMElement aTarget
> + */
> + _scrollMatchIntoViewIfNeeded: function DVGS__scrollMatchIntoViewIfNeeded(aTarget) {
did you try using the version of this in shared/LayoutHelpers.jsm?
This is simpler, and I do like that, but we should reuse code where possible.
Attachment #654543 -
Flags: review?(rcampbell) → review+
Assignee | ||
Comment 28•12 years ago
|
||
(In reply to Rob Campbell [:rc] (:robcee) from comment #27)
> Comment on attachment 654543 [details] [diff] [review]
> v5.3
>
> Review of attachment 654543 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> alright, not a lot to comment on with this. Works well, looks decent.
>
> ::: browser/devtools/debugger/debugger-controller.js
> @@ +1191,4 @@
> > * Additional options for showing the script. Supported options:
> > * - targetLine: place the editor at the given line number.
> > */
> > + showScript: function SS_showScript(aScript, aOptions = {}) {
>
> You made me look this up. Since Firefox 15?
>
> rewrite everything.
Can I start with Tilt?
>
> ::: browser/devtools/debugger/debugger-view.js
> @@ +167,5 @@
> > + this._onFetchScriptsFinished = this._onFetchScriptsFinished.bind(this);
> > + this._onLineClick = this._onLineClick.bind(this);
> > + this._onMatchClick = this._onMatchClick.bind(this);
> > + this._onResultsScroll = this._onResultsScroll.bind(this);
> > + this._startSerach = this._startSerach.bind(this);
>
> TYYYPPPOOOO!!!!
I'll make a Sublime plugin.
>
> @@ +258,5 @@
> > +
> > + /**
> > + * Starts searching for a token in all the scripts.
> > + */
> > + _startSerach: function DVGS__startSearch() {
>
> typo. (oh no, he's doing it again)
>
:(
> @@ +668,5 @@
> > + /**
> > + * Scrolls a match into view.
> > + * @param nsIDOMElement aTarget
> > + */
> > + _scrollMatchIntoViewIfNeeded: function DVGS__scrollMatchIntoViewIfNeeded(aTarget) {
>
> did you try using the version of this in shared/LayoutHelpers.jsm?
>
I tried, doesn't work at all.
> This is simpler, and I do like that, but we should reuse code where possible.
I like simple code.
Assignee | ||
Comment 29•12 years ago
|
||
Fixed typo.
Assignee | ||
Updated•12 years ago
|
Whiteboard: [land-in-fx-team]
Assignee | ||
Comment 30•12 years ago
|
||
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 31•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•