Closed
Bug 340868
Opened 20 years ago
Closed 19 years ago
Offer to re-add an autodiscovered engine if user removes it
Categories
(Firefox :: Search, defect, P2)
Tracking
()
RESOLVED
FIXED
Firefox 2
People
(Reporter: pamg.bugs, Assigned: pamg.bugs)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 1 obsolete file)
|
10.01 KB,
patch
|
bugs
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
If you're viewing a page with an autodiscovered <link rel...> OpenSearch engine that you've already added to your searchbox list, you correctly won't be offered the chance to add it to that list (once bug 340122 is fixed).
However, if you remove that engine from your list using the search engine manager, you still won't be offered the chance to re-add it, and the UI won't change to show that an autodiscovered engine is available, until you reload the page.
| Assignee | ||
Updated•20 years ago
|
Assignee: nobody → pamg.bugs
| Assignee | ||
Comment 1•20 years ago
|
||
I'd appreciate your having a look at this, Gavin. I'll get module owner approval too.
Attachment #225447 -
Flags: review?(gavin.sharp)
| Assignee | ||
Updated•19 years ago
|
Flags: blocking-firefox2?
Whiteboard: [swag: 1d]
| Assignee | ||
Comment 2•19 years ago
|
||
Attachment #225447 -
Attachment is obsolete: true
Attachment #225795 -
Flags: review?(gavin.sharp)
Attachment #225447 -
Flags: review?(gavin.sharp)
| Assignee | ||
Updated•19 years ago
|
Priority: -- → P2
Comment 3•19 years ago
|
||
Would it be terrible for performance to just let the browser keep one array of the available engines, and have rebuildPopupDynamic filter out already-installed ones (by asking the search service) when it shows the popup? That'd make this code a lot simpler, but maybe the xpconnect round-tripping and frequent lookups onpopupshowing isn't such a good idea. Alternatively, maybe the search bar could keep an array of visible engine titles, kept up to date with the engine-removed/added notifications, and then use that in rebuildPopupDynamic to filter the engines added to the popup. That's be cleaner, I think, but maybe I'm missing something.
| Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #3)
> Would it be terrible for performance to just let the browser keep one array of
> the available engines, and have rebuildPopupDynamic filter out
> already-installed ones (by asking the search service) when it shows the popup?
That's a thought. Since it only has to ask about autodetected engines, which aren't common, the performance hit wouldn't be too bad. One or two queries per onpopupshowing, but only for pages with any <link> engines at all.
> Alternatively, maybe
> the search bar could keep an array of visible engine titles, kept up to date
> with the engine-removed/added notifications, and then use that in
> rebuildPopupDynamic to filter the engines added to the popup.
I'm not sure about the benefit of duplicating the whole list of engine titles. Adding and removing engines won't be common either, but the memory would be used all the time.
| Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #3)
> Would it be terrible for performance to just let the browser keep one array of
> the available engines, and have rebuildPopupDynamic filter out
> already-installed ones (by asking the search service) when it shows the popup?
> That'd make this code a lot simpler [...]
I started into this, but I don't think it'll make the code much simpler, if at all. The problem is that the search-button "addengines" attribute needs to be updated so it shows the right UI (a red magnifying glass, currently) depending on whether there are engines available to be added. That means that search.xml still needs to observe engine-added and engine-removed, and re-filter the list on each of those; and updateSearchButton() in browser.js also has to do the same filtering.
Given all that, I think it's actually simpler to let the filtering happen when the <link> is detected and only have to update it when its status changes -- that is, to stick with the current patch.
Comment 6•19 years ago
|
||
So, does this mean that if I do this:
- Remove Google (which is part of the default list that ships with the app)
that "Add Google" will show up in the menu?
| Assignee | ||
Comment 7•19 years ago
|
||
No, this is only for autodiscovered engines, ones with <link rel...> tags on the current page. It means that if you go to www.technorati.com, add the engine that shows up in the list, then remove it using the Engine Manager, you'll be offered the chance to add it again without having to reload the page.
| Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #6)
> So, does this mean that if I do this:
>
> - Remove Google (which is part of the default list that ships with the app)
>
> that "Add Google" will show up in the menu?
The case you mention is bug 334486.
Comment 9•19 years ago
|
||
Comment on attachment 225795 [details] [diff] [review]
Same code, now with more comments
r=ben@mozilla.org
Attachment #225795 -
Flags: review?(gavin.sharp) → review+
Updated•19 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
| Assignee | ||
Comment 10•19 years ago
|
||
Checked in on trunk to bake before 1.8 branch landing.
Flags: blocking-firefox2+ → blocking-firefox2?
Whiteboard: [swag: 1d]
| Assignee | ||
Updated•19 years ago
|
Attachment #225795 -
Flags: approval1.8.1?
Comment 11•19 years ago
|
||
Not a blocker, but we'll take the fix.
Flags: blocking-firefox2? → blocking-firefox2-
Updated•19 years ago
|
Attachment #225795 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 12•19 years ago
|
||
fixed-1.8-branch, fixed-on-trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•