Closed Bug 1480504 Opened 7 years ago Closed 7 years ago

Add @amazon and @google as internal search keywords

Categories

(Firefox :: New Tab Page, enhancement, P1)

60 Branch
enhancement

Tracking

()

VERIFIED FIXED
Firefox 63
Iteration:
63.4 - Aug 20
Tracking Status
firefox62 --- verified
firefox63 --- verified

People

(Reporter: tspurway, Assigned: mkaply)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [fxsearch])

Attachments

(2 files)

We can do this by adding additional 'aliasMatches', which would allow us to add our keywords and would not collide with user defined search keywords. The one edge case will will still need to take care of here would be if the user removes the actual search provider.
Priority: P1 → P2
Needs implemented by the fxsearch team, not AS.
Whiteboard: [fxsearch]
Iteration: --- → 63.4 - Aug 20
> The one edge case will will still need to take care of here would be if the user removes the actual search provider. The user can't remove them, they can only hide them, and I think the aliases should still work in that case.
(In reply to Mike Kaply [:mkaply] from comment #2) > The user can't remove them, they can only hide them Aha! That would simplify things. Any suggestions for a good way to convert existing search plugins to have the internal alias? We probably only want to do this for default/packaged plugins as potentially there could be alias conflicts if someone installed 2+ amazon search engines.
We can know if a search engine is built in, so we can check for that specifically. And there can't be another engine named Google. I think what we should do is setup Google as is (since it will just work). For Amazon, loop through all the engines, look for a built in engine whose name begins with "Amazon" and set the alias to that one. I don't mind coding this up really quick. I had already been messing around with this.
Attached patch First passSplinter Review
Here's a quick first pass. I didn't reuse _addEngine because we don't need the priorityMatches code. I verified this works even when Google or Amazon is hidden. If we wanted to make this more generic, we could have a mapping of some sort: [ "Google": "@google", "Amazon": "@amazon", "eBay": "@ebay", ] and then just match the first part of the left side against a search engine and add the right side as an alias.
I just pushed a more clever version that we can easily add new engines to. There's probably a better way to create the initial map, but I couldn't thnk of anything in the moment. It matches against the beginning of the engine name would should cover us for most cases.
Looks like the approach here should also fix bug 1480509 where this bug was made for existing profiles and the other bug is for a new profile, yeah?
Assignee: nobody → mozilla
Blocks: 1480509
This adds the internal shortcuts, but I think bug 1480509 is about adding the actual tiles, right?
Priority: P2 → P1
Comment on attachment 8997157 [details] Bug 1480504 - Add internal aliases for common engines. Ed Lee :Mardak has approved the revision. https://phabricator.services.mozilla.com/D2681
Attachment #8997157 - Flags: review+
Pushed by mozilla@kaply.com: https://hg.mozilla.org/integration/autoland/rev/2ab02d99fe7e Add internal aliases for common engines. r=Mardak
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Blocks: 1482125
See Also: → 1294387
Blocks: 1482398
Flags: qe-verify+
There are some extra scenarios that could affect this feature: - if a user wants to search for the "@amazon" or "@google" strings is there any way to cancel it out? *the user would have to open the search engine and re-input the strings; - with "@amazon" or "@google" in the awesome-bar pressing CTRL+ENTER brings up the log in to the site(with username) confirmation window; Do we consider any of these 2 blockers for the current implementation or should we treat them in separate threads/bugs?
Flags: needinfo?(mozilla)
Depends on: 1484631
Depends on: 1484661
Depends on: 1484663
Verified on MacOS 10.9, Ubuntu 16.04LTS, Win 10x64 for both 62.0b18 and 63.0a1 (2018-08-19). Would address the issues in their own threads + the extra one.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
No longer depends on: 1484663
No longer depends on: 1484661
No longer depends on: 1484631
These issues are addressed in separate bugs.
Flags: needinfo?(mozilla)
Depends on: 1527389
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: