User:David Regev/Firefox Search, Revamped: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (Grammar fixes (and added highlighting))
(→‎The Desired Features: Added link to bug 565552.)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Firefox Search, Revamped:<br>How to make Firefox’s search capabilities more ''helpful''==
==Firefox Search, Revamped: <br>How to make Firefox’s search capabilities more ''helpful''==


The following is a workflow that I would like to see made possible in Firefox. The idea here is for Firefox to be as helpful as possible without getting in the way. The goal is to increase efficiency when searching (and, more importantly, finding). I am assuming [http://labs.mozilla.com/projects/ubiquity/ <span title="Mozilla Labs » Ubiquity">Ubiquity</span>] is being used for conducting searches, as it is already far more efficient than the standard search mechanisms (such as the Search bar).
The following is a workflow that I would like to see made possible in Firefox. The idea here is for Firefox to be as helpful as possible without getting in the way. The goal is to increase efficiency when searching (and, more importantly, finding). I will presume that [http://mozillalabs.com/ubiquity/ <span title="Mozilla Labs » Ubiquity">Ubiquity</span>] is being used for conducting searches, as it is already far more efficient than the standard search mechanisms (such as the Search bar).


===The Desired Workflow===
===The Desired Workflow===


<ol>
# Bob searches Google for [<code>foo bar</code>].
<li>Bob searches Google for [<code>foo bar</code>].</li>
# Bob clicks on one of the search results.
<li>Bob clicks on one of the search results.</li>
# The following '''Magic''' happens: <ol type="a"><li>The page scrolls down swiftly to the first instance of either <code>foo</code> or <code>bar</code>, placing said instance centred in the window and highlighting it uniquely.</li><li>All instances of <code style="background-color: yellow;">foo</code> and <code style="background-color: aqua;">bar</code> get highlighted, each term with its own colour (''a la'' Google Cache).</li><li>The Find bar slides into view, with [<code>foo bar</code>] as its text, allowing Bob to find other instances of <code>foo</code> and <code>bar</code> easily.</li><li>The highlighting slowly fades away, followed by the Find bar sliding away, thus returning the page to normal after 15 seconds or so.</li></ol> ''This allows Bob to concentrate on the information Firefox has now helped him locate more quickly.''
<li>The following '''Magic''' happens:</li>
# Bob continues browsing, eventually clicking Back until he finds himself back at the search results page.
<ol type="a">
# Bob middle-clicks on a different result, putting him in a new tab.
<li>The page scrolls down swiftly to the first instance of either <code>foo</code> or <code>bar</code>, placing said instance centred in the window.</li>
# Magic occurs for the ''second'' time.
<li>All instances of <code style="background-color: yellow;">foo</code> and <code style="background-color: aqua;">bar</code> get highlighted, each term with its own colour (''a la'' Google Cache).</li>
# Bob changes the Find bar text to ["<code>foo bar</code>"].
<li>The highlighting slowly fades away, returning the page to normal after 15 seconds or so. ''This allows Bob to concentrate on the information Firefox has now helped him locate more quickly.''</li>
# Magic occurs for that phrase. Specifically, Firefox conducts a ''lazy'' search on the phrase as one search term, ignoring punctuation and diacritics. ''E.g.'', even ‘<code>foö, bár</code>’ is matched.
</ol>
# Bob switches back to the previous tab and brings up the find dialogue.
<li>Bob continues browsing, eventually clicking Back until he finds himself back at the search results page.</li>
# The find text still shows [<code>foo bar</code>], since that text is tab-specific.
<li>Bob middle-clicks on a different result, putting him in a new tab.</li>
# Bob conducts a navigational search on Wikipedia for [<code>foobar</code>].
<li>Magic occurs for the ''second'' time.</li>
# Bob lands directly on the [http://en.wikipedia.org/wiki/Foobar <span title="foobar - Wikipedia, the free encyclopedia">foobar</span>] page, bypassing any search results altogether. Magic ''does not'' occur.
<li>Bob brings up the Find dialogue with Ctrl+F.</li>
# Bob opens the Find dialogue, revealing [<code>foobar</code>] as it text.
<li>The dialogue already has [<code>foo bar</code>] as its text.</li>
<li>Bob changes the text to [<code>"foo bar"</code>].</li>
<li>Magic occurs in the following manner:</li>
<ol type="a">
<li>Firefox conducts a ''lazy'' search on the phrase as one search term, ignoring punctuation and diacritics. ''E.g.'', even ‘<code>foö, bár</code>’ is matched.</li>
<li>The next occurrence of the phrase is centred and highlighted in the standard Find manner.</li>
<li>The standard Magic occurs on the phrase.</li>
</ol>
<li>Bob switches back to the previous tab and brings up the find dialogue.</li>
<li>The find text still shows [<code>foo bar</code>] (since that text is tab-specific).</li>
<li>Bob conducts a navigational search on Wikipedia for [<code>foobar</code>].</li>
<li>Bob lands directly on the [http://en.wikipedia.org/wiki/Foobar <span title="foobar - Wikipedia, the free encyclopedia">foobar</span>] page, bypassing any search results altogether. Magic ''does not'' occur.</li>
<li>Bob opens the Find dialogue, revealing [<code>foobar</code>] as it text.</li>
</ol>


Note how much is done to help Bob find what he seeks with as little extra work for him as possible, all without getting in the way of his goals. In order to make this workflow possible, certain features must be implemented.
Note how much is done to help Bob find what he seeks with as little extra work for him as possible, all without getting in the way of his goals. In order to make this workflow possible, certain features must be implemented.
Line 37: Line 23:
===The Desired Features===
===The Desired Features===


<ol>
# When one submits a search (whether via GET or POST), it should be detected automatically and the search text copied to the Find dialogue. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=270310 <span title="Bug 270310 – automatically update the searchbox words when you're searching directly in the search engine.">bug 270310</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=264123 <span title="Bug 264123 – Auto populates find toolbar from search bar.">bug 264123</span>].'' <ul><li>This should occur only on submission, and not when the search results page is incidentally revisited (via Back/Forward).</li><li>This should require no configuration.</li><li>[http://code.google.com/p/searchboxsync/ <span title="searchboxsync - Google Code">SearchBox Sync</span>] does this partially for the Search bar.</li></ul>
<li>When one submits a search (whether via GET or POST), it should be detected automatically and the search text copied to the Find dialogue. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=270310 <span title="Bug 270310 – automatically update the searchbox words when you're searching directly in the search engine.">bug 270310</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=264123 <span title="Bug 264123 – Auto populates find toolbar from search bar.">bug 264123</span>].''</li>
# Whenever a search result is chosen, '''Magic''' occurs: <ol type="a"><li>The page automatically starts scrolling down swiftly to the first instance of a search term, until that term is centred in the window and is uniquely highlighted. This scrolling may be interrupted by the user. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=171237 <span title="Bug 171237 – Scroll view a few lines beyond occurrence of found search term with type ahead find and toolkit find to show more context instead of last line/bottom of page">bug 171237</span>].''</li><li>Every instance of the search terms is highlighted, each term a different colour. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=240432 <span title="Bug 240432 – Highlight search terms">bug 240432</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=342101 <span title="Bug 342101 – Find bar: Auto-highlight all matches in page">bug 342101</span>].''</li><li>The Find bar slides into view immediately.</li><li>This highlighting gradually fades away, with the fade taking approximately 15 seconds to complete. At the same point, the Find bar also slides away. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=325234 <span title="Bug 325234 - Auto hide search bar after a period of inactivity">bug 325234</span>].''</li></ol> <ul><li>The fade countdown gets reset if the Find dialogue is used, restarting as soon as the dialogue is inactive again.</li><li>This should occur only on a search result link being clicked, not when a result page is incidentally revisited (via Back/Forward).</li><li>This occurs only on the page after a search results page and not on any other page, nor after navigational searches (such as on Wikipedia).</li><li>[http://code.google.com/p/searchwp/ <span title="searchwp - Google Code">SearchWP</span>] does this highlighting for the Search bar.</li></ul>
<ul>
# Similarly, whenever the Find dialogue is called, Magic also occurs. The page does not scroll, however, until the Find text is modified.<ul><li>This would make highlighting completely automatic. The modal ‘Highlight all’ button would be obsolete. So would the Find bar’s Close button.</li></ul>
<li>This should occur only on submission, and not when the search results page is incidentally revisited (via Back/Forward).</li>
# Find should perform a ''lazy'' search: <ol type="a"><li>Any term matches (like with a Google search), rather than the exact string being used. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=343118 <span title="Bug 343118 – Highlight by words, not by phrases">bug 343118</span>].''</li><li>Phrases in quotes match only when together (as one term).</li><li>Punctuation and diacritics are always ignored, even in phrase searches. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=442070 <span title="Bug 442070 – the Find Toolbar can't find a word with accents">bug 442070</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=202251 <span title="Bug 202251 – Find/FindAsYouType will not find text if entered with diacritics (&quot;nikud&quot;) in Hebrew, or accented characters in other languages">bug 202251</span>].''</li><li>This can be overridden by a strict mode that matches for the exact string in a case-sensitive manner. This mode replaces the current ‘Match case’ mode. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=269442 <span title="Bug 269442 – Add Find Whole Word/ Find Exact String Option to Find Toolbar">bug 269442</span>].''</li></ol>
<li>This should require no configuration.</li>
# The Find text should be tab-specific (to retain search context). ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=248955 <span title="Bug 248955 – search box should be tab-specific (content should not persist when switching tabs)">bug 248955</span>].'' <ul><li>A spawned tab, however, copies over its parent’s Find text.</li></ul>
<li>[http://code.google.com/p/searchboxsync/ <span title="searchboxsync - Google Code">SearchBox Sync</span>] does this partially for the Search bar.</li>
# '''Nice to have:''' Double-clicking on a search term should centre the next instance of that term. <ul><li>[http://code.google.com/p/searchwp/ <span title="searchwp - Google Code">SearchWP</span>] does something like this for the Search bar.</li></ul>
</ul>
'''Note:''' I have also summarized these features in ''[https://bugzilla.mozilla.org/show_bug.cgi?id=565552#c4 <span title="Bug 565552 –  &quot;Find in page&quot; needs to be improved">bug 565552</span>]''.
<li>Whenever a search result is chosen, '''Magic''' occurs:</li>
<ol type="a">
<li>The page automatically starts scrolling down swiftly to the first instance of a search term, until that term is centred in the window. This scrolling may be interrupted by the user.</li>
<li>Every instance of the search terms is highlighted, each term a different colour. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=240432 <span title="Bug 240432 – Highlight search terms">bug 240432</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=342101 <span title="Bug 342101 – Find bar: Auto-highlight all matches in page">bug 342101</span>].''</li>
<li>This highlighting gradually fades away, with the fade taking approximately 15 seconds to complete.</li>
</ol>
<ul>
<li>This should occur only on a search result link being clicked, not when a result page is incidentally revisited (via Back/Forward).</li>
<li>This occurs only on the page after a search results page and not on any other page, nor after navigational searches (such as on Wikipedia).</li>
</ul>
<li>When a Find is conducted, Magic also occurs.</li>
<ul>
<li>The next instance of the search terms (the standard find result) would be highlighted differently from the other instances.</li>
<li>The fade begins only after the Find dialogue is no longer being used. It also resets whenever the text is modified.</li>
</ul>
<li>Find should perform a ''lazy'' search:</li>
<ol type="a">
<li>Any term matches (like with a Google search), rather than the exact string being used. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=343118 <span title="Bug 343118 – Highlight by words, not by phrases">bug 343118</span>].''</li>
<li>Phrases in quotes match only when together (as one term).</li>
<li>Punctuation and diacritics are always ignored, even in phrase searches. ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=442070 <span title="Bug 442070 – the Find Toolbar can't find a word with accents">bug 442070</span>] and [https://bugzilla.mozilla.org/show_bug.cgi?id=202251 <span title="Bug 202251 – Find/FindAsYouType will not find text if entered with diacritics (&quot;nikud&quot;) in Hebrew, or accented characters in other languages">bug 202251</span>].''</li>
<li>This can be overridden by a strict mode that matches for the exact string in a case-sensitive manner. This mode replaces the current ‘Match case’ mode.</li>
</ol>
<li>The Find text should be tab-specific (to retain search context). ''See [https://bugzilla.mozilla.org/show_bug.cgi?id=248955 <span title="Bug 248955 – search box should be tab-specific (content should not persist when switching tabs)">bug 248955</span>].''</li>
<ul>
<li>A spawned tab, however, copies over its parent’s Find text.</li>
</ul>
<li>'''Nice to have:''' Find’s ‘Highlight all’ should perform Magic.</li>
<ul>
<li>The next instance of a term is centred every time this function is executed (like ‘Find again’).</li>
<li>A nice consequence of this is that ‘Highlight all’ would be less modal.</li>
<li>[http://code.google.com/p/searchwp/ <span title="searchwp - Google Code">SearchWP</span>] does this partially for the Search bar.</li>
</ul>
<li>'''Nice to have:''' Double-clicking on a search term should centre the next instance of that term.</li>
<ul>
<li>[http://code.google.com/p/searchwp/ <span title="searchwp - Google Code">SearchWP</span>] does something like this for the Search bar.</li>
</ul>
</ol>

Latest revision as of 20:35, 24 May 2010

Firefox Search, Revamped:
How to make Firefox’s search capabilities more helpful

The following is a workflow that I would like to see made possible in Firefox. The idea here is for Firefox to be as helpful as possible without getting in the way. The goal is to increase efficiency when searching (and, more importantly, finding). I will presume that Ubiquity is being used for conducting searches, as it is already far more efficient than the standard search mechanisms (such as the Search bar).

The Desired Workflow

  1. Bob searches Google for [foo bar].
  2. Bob clicks on one of the search results.
  3. The following Magic happens:
    1. The page scrolls down swiftly to the first instance of either foo or bar, placing said instance centred in the window and highlighting it uniquely.
    2. All instances of foo and bar get highlighted, each term with its own colour (a la Google Cache).
    3. The Find bar slides into view, with [foo bar] as its text, allowing Bob to find other instances of foo and bar easily.
    4. The highlighting slowly fades away, followed by the Find bar sliding away, thus returning the page to normal after 15 seconds or so.
    This allows Bob to concentrate on the information Firefox has now helped him locate more quickly.
  4. Bob continues browsing, eventually clicking Back until he finds himself back at the search results page.
  5. Bob middle-clicks on a different result, putting him in a new tab.
  6. Magic occurs for the second time.
  7. Bob changes the Find bar text to ["foo bar"].
  8. Magic occurs for that phrase. Specifically, Firefox conducts a lazy search on the phrase as one search term, ignoring punctuation and diacritics. E.g., even ‘foö, bár’ is matched.
  9. Bob switches back to the previous tab and brings up the find dialogue.
  10. The find text still shows [foo bar], since that text is tab-specific.
  11. Bob conducts a navigational search on Wikipedia for [foobar].
  12. Bob lands directly on the foobar page, bypassing any search results altogether. Magic does not occur.
  13. Bob opens the Find dialogue, revealing [foobar] as it text.

Note how much is done to help Bob find what he seeks with as little extra work for him as possible, all without getting in the way of his goals. In order to make this workflow possible, certain features must be implemented.

The Desired Features

  1. When one submits a search (whether via GET or POST), it should be detected automatically and the search text copied to the Find dialogue. See bug 270310 and bug 264123.
    • This should occur only on submission, and not when the search results page is incidentally revisited (via Back/Forward).
    • This should require no configuration.
    • SearchBox Sync does this partially for the Search bar.
  2. Whenever a search result is chosen, Magic occurs:
    1. The page automatically starts scrolling down swiftly to the first instance of a search term, until that term is centred in the window and is uniquely highlighted. This scrolling may be interrupted by the user. See bug 171237.
    2. Every instance of the search terms is highlighted, each term a different colour. See bug 240432 and bug 342101.
    3. The Find bar slides into view immediately.
    4. This highlighting gradually fades away, with the fade taking approximately 15 seconds to complete. At the same point, the Find bar also slides away. See bug 325234.
    • The fade countdown gets reset if the Find dialogue is used, restarting as soon as the dialogue is inactive again.
    • This should occur only on a search result link being clicked, not when a result page is incidentally revisited (via Back/Forward).
    • This occurs only on the page after a search results page and not on any other page, nor after navigational searches (such as on Wikipedia).
    • SearchWP does this highlighting for the Search bar.
  3. Similarly, whenever the Find dialogue is called, Magic also occurs. The page does not scroll, however, until the Find text is modified.
    • This would make highlighting completely automatic. The modal ‘Highlight all’ button would be obsolete. So would the Find bar’s Close button.
  4. Find should perform a lazy search:
    1. Any term matches (like with a Google search), rather than the exact string being used. See bug 343118.
    2. Phrases in quotes match only when together (as one term).
    3. Punctuation and diacritics are always ignored, even in phrase searches. See bug 442070 and bug 202251.
    4. This can be overridden by a strict mode that matches for the exact string in a case-sensitive manner. This mode replaces the current ‘Match case’ mode. See bug 269442.
  5. The Find text should be tab-specific (to retain search context). See bug 248955.
    • A spawned tab, however, copies over its parent’s Find text.
  6. Nice to have: Double-clicking on a search term should centre the next instance of that term.
    • SearchWP does something like this for the Search bar.

Note: I have also summarized these features in bug 565552.