Closed Bug 513138 Opened 15 years ago Closed 15 years ago

[1.5.1] Search Engine & Results Page

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: fligtar, Assigned: wenzel)

References

()

Details

Attachments

(3 files)

Attached image mockup
Searches done from the developer hub nav bar will go to this page and show the results.

The URL for this page should be /developers/search.

See the attached mockup for the style of results. This bug is currently blocked by legal review of the search provider's TOS and Privacy Policy. I will update the bug with the appropriate code and details after that.
Whiteboard: ->fwenzel
We would like to use Google Custom Search for this, and I've setup a demo of it here: https://people.mozilla.com/~jscott/developer-hub/search.html

You can try a search like "install.rdf" or "amo" or anything add-on-related. It's pretty great. Unfortunately, it's currently blocked on legal's review, but we can start the CSS work on it since the CSS should be the same regardless of what service we use.

The widget we need is in the source of that demo page. We can apply CSS to the results with the classes Google uses.
Assignee: fligtar → fwenzel
Whiteboard: ->fwenzel
The demo is hawt.
Are we going to use the AJAX Search API (can be bound to a CSE, apparently [1])? I am not sure if the widget you use is flexible enough to be bound to the search box in our nav bar.

For now, I'll just drop that widget into the search page though and add some styles.

[1] http://code.google.com/intl/en/apis/ajaxsearch/web.html
Status: NEW → ASSIGNED
Summary: [1.5.1] Search Engine Results Page → [1.5.1] Search Engine & Results Page
Styling the search engine without implementing it didn't make much sense, so here you go.

With some fun little JavaScript magic, it's using our search field as the input to the Google custom search engine. JS is obviously required, though we could probably add a link to the "raw" engine as a noscript tag.

Another thing that's not quite awesome yet is the experience when you submit the search form empty (from a non-search page): The resulting page is basically empty. Would probably look friendlier if we encouraged people to start typing into the search box.
Attachment #398685 - Flags: review?(clouserw)
Attached image Screenshot
Awesome! Thanks Fred!

btw, we'll need to use the https:// version of the Google JS when checked in.
Comment on attachment 398685 [details] [diff] [review]
Search engine goodness

I agree it's confusing with nothing on the page with no search terms.

In addition to https you should use the noscript helper to stay consistent.

cool stuff
Attachment #398685 - Flags: review?(clouserw) → review+
(In reply to comment #7)
> In addition to https you should use the noscript helper to stay consistent.

Where do I find that?
(In reply to comment #8)
> (In reply to comment #7)
> > In addition to https you should use the noscript helper to stay consistent.
> 
> Where do I find that?

Ah, it's an element. Thanks for the hint. I'll change that, then commit.
Fligtar: Please check if it still works without an API key, or if we need to add that before this reaches production.

I https-ed the API URL, used the noscript element, and also made sure not to show the search term as HTML, so we're not inviting anyone to an XSS party. Finally, the empty page now contains a message "Please enter some search terms." (Let me know if you want that changed).

Committed to r51006, r51007, r51009, r51010.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
This is great, thanks!

Still waiting on Legal to say it's okay... hopefully we won't have to change anything.
FYI, our implementation is OK with Legal as long as we add a notice that the results are powered by Google, which I will do this afternoon.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: