Textbox context menu should have "Add to Search Bar..."

NEW
Unassigned

Status

()

Firefox
Search
P4
enhancement
Rank:
45
13 years ago
11 days ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
firefox-backlog -
blocking-firefox2 -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-fennec][fxsearch])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

13 years ago
I should be able to add Feedster to the search bar from http://www.feedster.com/
by right-clicking the textbox and selecting "Add to Search Bar...".  This would
be more convinient than going to mycroft to install a search plugin.

"Add to Search Bar" would appear in the same situations that "Add a Keyword for
this Search" appears.  It would use the page's favicon as the icon in the search
bar, or some default icon if the page doesn't have an icon.

Comment 1

13 years ago
(In reply to comment #0)
> I should be able to add Feedster to the search bar from http://www.feedster.com/
> by right-clicking the textbox and selecting "Add to Search Bar...".  This would
> be more convinient than going to mycroft to install a search plugin.
> 
> "Add to Search Bar" would appear in the same situations that "Add a Keyword for
> this Search" appears.  It would use the page's favicon as the icon in the search
> bar, or some default icon if the page doesn't have an icon.

Adding search plugins is not as simple as that.
http://mycroft.mozdev.org/contribute.html

Mozilla currently only supports plugins that work with the GET method. Also,
each search plugin has to go through a validation process to make sure it works
properly.
*** Bug 309862 has been marked as a duplicate of this bug. ***
"Keywords searches" and search engines will be one and the same, with the new search service.
Assignee: p_ch → gavin.sharp
Depends on: 317107
Target Milestone: --- → Firefox 2 alpha2
Status: NEW → ASSIGNED
Priority: -- → P4
Version: unspecified → 2.0 Branch
Whiteboard: [swag: 1d]

Updated

12 years ago
Flags: blocking-firefox2+

Updated

12 years ago
Blocks: 329842
(In reply to comment #3)
> "Keywords searches" and search engines will be one and the same, with the new
> search service.

That is the plan, anyways. I have a short amount of time left to get my search work completed, and "making the search service handle bookmark keywords" is lower priority than the management UI (bug 232272) and other search service bugs. That said, the actual "add to search bar" context menu option isn't very difficult to add (basically just need to call nsIBrowserSearchService::addEngineWithDetails).
Created attachment 219645 [details] [diff] [review]
wip

This adds an "Add to Search Bar..." context menu item. Needs better error handling (needs to deal with failure) and better UI (a dialog to pick the name?).
Created attachment 219647 [details] [diff] [review]
real wip

oops, wrong diff
Attachment #219645 - Attachment is obsolete: true

Updated

12 years ago
Blocks: 335435
Target Milestone: Firefox 2 alpha2 → Firefox 2 beta1

Comment 7

11 years ago
Enchancement - linkrel will solve much of this so taking off the blocker list
Flags: blocking-firefox2+ → blocking-firefox2-
Priority: P4 → --
Whiteboard: [swag: 1d]
Target Milestone: Firefox 2 beta1 → Firefox 3
Version: 2.0 Branch → Trunk
*** Bug 344538 has been marked as a duplicate of this bug. ***
*** Bug 351089 has been marked as a duplicate of this bug. ***

Comment 10

11 years ago
some notes about the patch:
1) only "successful controls" should be submitted in a form (see http://www.w3.org/TR/html4/interact/forms.html#successful-controls). A check whether the form element has a name and is not disabled should be added.

2) IMO the first submit button in the form should be submitted as well. This is done when you press enter in a single line text box and I guess there are pages that depend on this behavior.

3) The name of an engine should be user-definable. Imagine you were on https://addons.mozilla.org/ or http://en.wikipedia.org/ and wanted to add the search to the search box. The titles "Firefox Add-ons | Mozilla Corporation" and "Main Page - Wikipedia, the free encyclopedia" are not what you'd like to have as the name of the search engine. "Firefox Add-ons" and "Wikipedia" would be much better. Asking the user (with the page's title as default) would be much better. If there were the option to use a custom icon for the engine in that dialog would be nice as well.

4) Line 3050 of browser.js (83 in the patch) is wrong. It should look like this:
addedEngine.addParam(el.name, el.options[j].value);
Created attachment 246878 [details] [diff] [review]
updated patch

Thanks for the comments, Malte. I've updated the patch to address them. However, this is far from being "finished". It has at least the following issues:

- Doesn't deal with trying to install an engine with the same name as a current engine
- Prompting for a name sucks, we should support renaming (bug 335102)
- If this is going to co-exist with "add a keyword for this search" (which is something else I'm not sure of), it should share the form-input getting code
Attachment #219647 - Attachment is obsolete: true
*** Bug 233110 has been marked as a duplicate of this bug. ***
we were just discussing how awesome this would be if when adding a keyword search, the add bookmark/place dialog had a checkbox to add the search to the list of available search engines. When selected, adding the bookmark/place would also add the favicon from the site to the search engine. The newly created search engine should pull the name from the bookmark name to not bombard the user with another pointless dialog.

I think this behavior would be preferable to another menu item on text fields.
Assignee: gavin.sharp → nobody
Status: ASSIGNED → NEW
Target Milestone: Firefox 3 → ---

Comment 14

9 years ago
Any progress on this one? Currently, users still have to browse through tons of search plug-ins at addons.mozilla.org and if they are lucky, they find what they are looking for. It would be much simpler to have "add search" in the context menu of a search field.
No longer blocks: 335435
Duplicate of this bug: 461985

Updated

7 years ago
Blocks: 565512
Flags: firefox-backlog?
Whiteboard: [parity-fennec]
Flags: firefox-backlog? → firefox-backlog-

Comment 16

3 years ago
"Add as search engine" is very useful on mobile.
Mycroft is great but not user friendly for everyone.

Could the functionality of the Add to Search Bar Add-On be added?
https://addons.mozilla.org/en-US/firefox/addon/add-to-search-bar/

Updated

3 years ago
Duplicate of this bug: 1106626
(Reporter)

Updated

3 years ago
Blocks: 648398

Updated

2 years ago
No longer blocks: 648398

Updated

2 years ago
Depends on: 236587
Priority: -- → P4

Updated

2 years ago
Whiteboard: [parity-fennec] → [parity-fennec][fxsearch]

Updated

2 years ago
Rank: 45
Duplicate of this bug: 1216898
I've opened the bug 1271945 to implement WebExtensions-based addon like the feature.
You need to log in before you can comment on or make changes to this bug.