DXR UI Refresh: Difference between revisions

Jump to navigation Jump to search
Refactor feedback some more. Rank feedback items by MXR retirement blocking. Add plans & priorities. Move TOC to top.
mNo edit summary
(Refactor feedback some more. Rank feedback items by MXR retirement blocking. Add plans & priorities. Move TOC to top.)
Line 1: Line 1:
== History ==
Once upon a time, [[User:SchalkNeethling|Schalk Neethling]] surveyed the userbase and heuristically analyzed the UI, resulting in [[Webtools/DXR_User_Research|some nifty mockups]].
Once upon a time, [[User:SchalkNeethling|Schalk Neethling]] surveyed the userbase and heuristically analyzed the UI, resulting in [[Webtools/DXR_User_Research|some nifty mockups]].


Line 7: Line 8:
* Making a few improvements to the multi-tree story
* Making a few improvements to the multi-tree story


Then Erik [https://groups.google.com/forum/#!topic/mozilla.dev.platform/TW8If68UYZw mailed dev-platform] and got tons of feedback about what they need from DXR and what their usage patterns are, and he realized that the textual query interface cannot be discarded; it is just too handy for custom keyword searches and search-box plugins. Erik, Schalk, Jonas, and rhelmer got together at the Santa Clara Mozilla Summit, chewed through all the dev-platform feedback and that from the DXR Innovation Fair booth, and came to these conclusions:
Then Erik [https://groups.google.com/forum/#!topic/mozilla.dev.platform/TW8If68UYZw mailed dev-platform] and got tons of feedback about what they need from DXR and what their usage patterns are, and he realized that the textual query interface cannot be discarded; it is just too handy for custom keyword searches and search-box plugins. Erik, Schalk, Jonas, and rhelmer got together at the Santa Clara Mozilla Summit, chewed through all the dev-platform feedback and that from the DXR Innovation Fair booth, and came to the conclusions under [[#Plans_And_Priorities]]. The raw feedback is categorized and sorted under [[#Feedback]].
 
== Plans And Priorities ==


* We'll write a search query parser that supports Python-style quoting for regexes and everything else. Use double quotes or single quotes. Each can contain the other. If you really need to go crazy, you can backslash-escape the kind of quote you're using.
* We'll write a search query parser that supports Python-style quoting for regexes and everything else. Use double quotes or single quotes. Each can contain the other. If you really need to go crazy, you can backslash-escape the kind of quote you're using.
Line 13: Line 16:
* Advanced search on a separate page OR modally mutually exclusive with textual search (so we don't immediately need a JS query parser, though we could add one later and remove the modality). We'll have examples of what each advanced field takes in dimmed text in the field, demonstrating a few of the interesting features: for instance, '"main(const int, ...)"'. Upon submitting an advanced search, you'll get a search results page with the equivalent textual search, a la Google. That'll teach you the textual syntax so you can go faster next time. (It also saves display space, which our users are rabid about.)
* Advanced search on a separate page OR modally mutually exclusive with textual search (so we don't immediately need a JS query parser, though we could add one later and remove the modality). We'll have examples of what each advanced field takes in dimmed text in the field, demonstrating a few of the interesting features: for instance, '"main(const int, ...)"'. Upon submitting an advanced search, you'll get a search results page with the equivalent textual search, a la Google. That'll teach you the textual syntax so you can go faster next time. (It also saves display space, which our users are rabid about.)
* Improve our filter names so they're shorter and more memorable ("subclass" vs. "derived").
* Improve our filter names so they're shorter and more memorable ("subclass" vs. "derived").
* Take the "l" out of URL fragments. It looks like a 1. You can just start them with numbers.
* Take the "l" out of line-number URL fragments. It looks like a 1. You can just start them with numbers.
 
Our next step is to comb through [[#Feedback]] and design product changes around them for Q4. We're looking for quickly deliverable improvements that will advance us toward retiring MXR.
 
== Feedback ==
 
Here we've collected user feedback, largely from the [https://groups.google.com/forum/#!topic/mozilla.dev.platform/TW8If68UYZw dev-platform thread]. We use the following numbers (and letter) to rank items with regard to MXR retireability. These express nothing about difficulty. Order of attack will of course take this and other factors into account.
 
# Must have. Everybody will be mad otherwise. Not having would be silly. MXR retirement blocker.
# Must have for >= 10% of the audience. Maybe MXR blocker.
# Can wait but should get to to feel proud of the project. Might be able to turn off MXR without it.
# A useful thing for later
# Not that important or a rare edge case
 
B: Behind the scenes. A non-user-visible change that will enable other changes.
 
=== More Trees, More Often ===
 
* (1) Index multiple trees (starting with comm-central and mozilla-aurora, the most commonly used ones on MXR. The UX branch has been requested, too.) (some impact from IT, possibly) - this is a blocker for turning off MXR
* (3) "Right now I think mxr updates from mozilla-central faster than daily. I've used that on a number of occasions to figure out what has broken my build/patch."
 
=== Search ===
 
* (1) Move to a line-based search, as proposed in https://github.com/mozilla/dxr/pull/161#issuecomment-25201532.
* (2) A way to semantically include double quotes in the search string: the parser shouldn't always eat them.
* (3) Just typing a filename (or path segment?) without a path: specifier should find files by name or path.
** [Should be solved by ^^] Trying to find files is hard. (Still haven't figured out how to get easily from the main page to Navigator.cpp on dom/base)
** [Should be solved by ^^] A basic "file:" keyword hint with simple wildcard globing could do most of it well enough, I think... "file:*.css", "file:nsILogin*", "file:/test*". (We already search for "path" matches as unanchored substrings. We just need to add the globbing. Why this isn't super slow I don't know.)
** [Should be solved by ^^] As a jump point when I know a filename (eg, "nsILogin", click search, click the particular IDL I wanted).
* (3) Better ranking: if you type an exact identifier name, put the definition at the top. (If we implement "id:", this is easy.)
* (3) Stop differentiating between macros, functions, consts, etc.: just find me an *anything* called "fred". People coming up to the booth were confused that they had to know the kind of target.
* (4) Search just within strings, for error messages and such.
* (4) Let us structurally query stuff that gets #ifdef'd out on x86, like ARM stuff.


Our next step is to comb through [[#Other_Considerations_.26_Use_Cases]] and pick out what to do for Q4. We're looking for quickly deliverable improvements that will advance us toward retiring MXR.
=== Indexing ===
 
* (3) Better support for JS, Python, etc.
** Remove the C++ assumptions from the core so we can support structured queries on other languages. Python keeps coming up. Java and Scala did once as well. People mentioned JS a long time ago.
* (4) Merge multiple build configuration databases somehow.
** The code base is compiled for multiple platforms. Currently I cannot find the functions which are defined on ARM unless we use a search as we used to do on MXR.
* (4) Include Doxygen/Javadocs-like documentation. For C, C++, IDL, Java, JS, etc.
* (5) Support for generated files in indexing
 
=== Blame/VCS integration ===
 
* (4) Diff between trees
* (4 - Does MXR offer this now?) Be able to refer to specific revisions of code somehow, so links don't rot.
* (4) Be able to refer to certain ranges of code.
* (5 - Shouldn't we delegate to hgweb or github for this?) Blame integrated into main file view
** Be able to navigate blame history better, stepping back and back in time until we find the change we were looking for.
 
=== Other ===
 
* (4) Support for image browsing would be super helpful for front-end stuff.
* Compare http://dxr.mozilla.org/mozilla-central/source/toolkit/themes/windows/global/icons with http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/windows/global/icons/
* (5) DXR gives a nice contextual navigation, but the size of the code base is overwhelming to have a clear understanding of what is going on. One of the thing that I am looking at in general is to understand the conditionals which are giving a particular result, or the consequences of a statement. Such overview is hard to get when you have ~30 DXR tabs opened. I would love to have a graph overview of these relations, as well as seeing the conditionals/guards as part of the graph.
* (huh?) "cycleCollection" on the right side may or may not do something useful. In most cases it just ignores all the stuff, so it might be better to not have it at all.
 
=== UI/UX ===
 
* (1) Docs (mostly user-facing) about how the query language is spelled and what it means
* (1) Don't require delimiters around a regex when entered into the Advanced Search Regex field
* (1) In the new UI, keep a text-only representation or some other way to be usable from custom search plugins or URL-bar keywords.
* (1) Optional case sensitivity
* (1) The Navigation pane, also something which shows up apparently at random, should be more predictable and should have whatever kind of disclosure control we decide upon for the Advanced Search form.
* (2) Mook (and Dave Townsend) switches trees a lot while looking at a single file in MXR. He'd like to be able to do that without losing his scroll position, as it typically lands him at a similar-enough place in the code that he can reorient himself. We'll add a tree switcher to the navigation panel, which appears when a file is being viewed. The nav panel will be pinned.
* (2) When navigating down the directory/file tree, it keeps autofocusing the search field, which is super-annoying if you're using keyboard-only navigation (with quickfind and enter) to do the traversal.
* (3) Enable integration with IDEs. I'm scoping to not include writing any plugins, but we should at least expose a well-documented public API. Then we can see what develops. We've had interest from a couple directions on this.
* (3) Change line-number fragment from #l5 to just #5. Lowercase Ls look like ones. (easy)
* (3) More obviously indicate when the search results are out of date. Dim them?
* (4) Count of search results, so we can use DXR to gather continuous metrics
* (4) Direct results: some love them, some hate them (because they just want to see the file pathname (don't we show that with the file? Is it bothersome because it's slow to load?))
* (4) Show context around results (with a clickable control? by saying "context:3[lines]" in the query? show the entire statement?)
* A way to load ALL results (other than holding Cmd+Down) (Why? Ask jruderman.)
 
=== Just Bugs ===
 
* (1) Clicking on macros seem to lead to some results, but definitely not the one I'd expect - the definition of the macro.
* (3) Fix redundant "mozilla-central/search?tree=mozilla-central"
* (4) I find the call graph information to be wrong some of the time, I have never been able to tell why. See this query for example: http://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3A%22mozilla%3A%3AAudioNodeStream%3A%3ASetDoubleParameter%28uint32_t%2C+double%29%22. Do you have any idea what the source of these problems is, and if yes, is that on track to get fixed?


'''As a result of the above, search UI in the following wireframes is out of date at the moment.'''
'''As a result of the above, search UI in the following wireframes is out of date at the moment.'''
Line 48: Line 128:
== File View ==
== File View ==
[[File:Dxr_file_view.png]]
[[File:Dxr_file_view.png]]
== Other Considerations & Use Cases ==
* The Navigation pane, also something which shows up apparently at random, should be more predictable and should have whatever kind of disclosure control we decide upon for the Advanced Search form.
* Mook (and Dave Townsend) switches trees a lot while looking at a single file in MXR. He'd like to be able to do that without losing his scroll position, as it typically lands him at a similar-enough place in the code that he can reorient himself. We'll add a tree switcher to the navigation panel, which appears when a file is being viewed. The nav panel will be pinned.
==== More Trees, More Often ====
* Index multiple trees (starting with comm-central and mozilla-aurora, the most commonly used ones on MXR. The UX branch has been requested, too.) (some impact from IT, possibly) - this is a blocker for turning off MXR
* "Right now I think mxr updates from mozilla-central faster than daily. I've used that on a number of occasions to figure out what has broken my build/patch."
==== Searching ====
* A way to semantically include double quotes in the search string: the parser shouldn't always eat them.
* Docs (mostly user-facing)
* Remove the C++ assumptions from the core so we can support structured queries on other languages. Python keeps coming up. Java and Scala did once as well. People mentioned JS a long time ago.
* Let us structurally query stuff that gets #ifdef'd out on x86, like ARM stuff.
* Search for substrings or patterns of file paths. Even just typing a  filename (or path segment?) without a file: specifier should find files  by name or path.
** [Should be solved by ^^] Trying to find files is hard. (Still haven't figured out how to get easily from the main page to Navigator.cpp on dom/base)
** [Should be solved by ^^] A basic "file:" keyword hint with simple wildcard globing could do most  of it well enough, I think... "file:*.css", "file:nsILogin*",  "file:/test*"
* Limiting searches to a particular file type. (eg, "image" in CSS files)
* As a jump point when I know a filename (eg, "nsILogin", click search, click the particular IDL I wanted).
*  Stop differentiating between macros, functions, consts, etc.: just find  me an *anything* called "fred". People coming up to the booth were confused that they had to know the kind of target.
* Better ranking: if you type an exact identifier name, put the definition at the top.
* Move to a line-based search, as proposed in https://github.com/mozilla/dxr/pull/161#issuecomment-25201532.
==== Blame/VCS integration ====
* Blame integrated into main file view
** Be able to navigate blame history better, stepping back and back in time until we find the change we were looking for.
* Diff between trees
* Linking to particular versions/revisions
==== Other ====
* Merge multiple build configuration databases somehow.
** The code base is compiled for multiple platforms.  Currently I cannot  find the functions which are defined on ARM unless we use a search as we  used to do on MXR.
* Include Doxygen/Javadocs-like documentation. For C, C++, IDL, Java, JS, etc.
* Support for generated files in indexing
* Better support for JS, Python, etc.
* Support for image browsing would be super helpful for front-end stuff.
* Compare http://dxr.mozilla.org/mozilla-central/source/toolkit/themes/windows/global/icons with http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/windows/global/icons/
* DXR gives a nice contextual navigation, but the size of the code base is overwhelming to have a clear understanding of what is going on.  One of the thing that I am looking at in general is to understand the conditionals which are giving a particular result, or the consequences of a statement. Such overview is hard to get when you have ~30 DXR tabs opened.  I would love to have a graph overview of these relations, as well as seeing the conditionals/guards as part of the graph.
* "cycleCollection" on the right side may or may not do something useful. In most cases it just ignores all the stuff, so it might be better to not have it at all.
==== UI/UX ====
* More obviously indicate that the search results are out of date. Dim them?
* Show context around results (after a click? by saying "context:3[lines]" in the query?)
* Be able to refer to specific revisions of code somehow, so links don't rot.
* Count of search results, so we can use DXR to gather continuous metrics
* Direct results: some love them, some hate them (because they just want to see the file pathname (don't we show that with the file? Is it bothersome because it's slow to load?)
* I find the call graph information to be wrong some of the time, I have never been able to tell why. See this query for example: <http://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3A%22mozilla%3A%3AAudioNodeStream%3A%3ASetDoubleParameter%28uint32_t%2C+double%29%22>. Do you have any idea what the source of these problems is, and if yes, is that on track to get fixed?
* In the new UI, keep a text-only representation or some other way to be usable from custom search plugins or URL-bar keywords.
* Needing to put delimiters around a regex even when entered into the Advanced Search Regex field
* Optional case sensitivity
* easily switch between related trees e.g. mozilla-central and mozilla-aurora
* When navigating down the  directory/file tree, it keeps autofocusing the search field, which is  super-annoying if you're using keyboard-only navigation (with quickfind  and enter) to do the traversal.
==== Just Bugs ====
* Clicking on macros seem to lead to some results, but definitely not the one I'd expect - the definition of the macro.


== Drill-Down Advanced Search: A Dead End? ==
== Drill-Down Advanced Search: A Dead End? ==
Confirmed users
574

edits

Navigation menu