Closed Bug 899779 Opened 11 years ago Closed 11 years ago

Open search specification extension

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kgrandon, Unassigned)

References

Details

We should determine what official suggestions we want to make to augment the open search specification and suit our needs.

An example github page which describes the geolocation extension nicely: https://github.com/clarkbw/searchspot/wiki/Modern-Open-Search
Summary: Open search extension → Open search specification extension
FWIW, for my initial prototype I followed http://www.opensearch.org/Specifications/OpenSearch/Extensions/

It looks like this:
[query, [name1, name2], [description1, description2], [url1, url2]]

I added a fifth value, also an array, containing the icons URLs:
[query, [name1, name2], [description1, description2], [url1, url2], [icon1, icon2]]

This is testable over at https://marketplace-dev.allizom.org/api/v1/apps/suggest/\?q\=puzzle
Blocks: 898020
Mat - that result set is very close to what we have implemented. The only difference is that we do not yet have a description.

One decision we need to make is if this array format is the way to go long term, or if we should create a new URL item type, and leverage a full JSON object.
http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.1#JSON-formatted_search_suggestion_responses specifies that there may be four results in an array, with the following elements:

- Query String
- Completions
- Descriptions
- Query URLs

I believe what you have done works well, and we should propose this as an official open search standard. To clarifiy, this would add an icon as a fifth possible element.

- Query String
- Completions
- Descriptions
- Query URLs
- Icon

We should also decide if we should suggest a specification which allows for the specification of the icon dimensions, and perhaps returning multiple icons if desired.

Additionally we may be able to have an optional placeholder within the icon URL for specification of a desired size.

E.g., http://www.mozilla.org/logo.png?size={size}
I think letting the opensearch implementation decide which icon size to return arbitrary is good enough: this opensearch spec is fairly simple and should probably be kept that way. In a similar fashion, the spec says nothing about the length of the title and descriptions, for instance.

We could do some more clever things about icon sizes but I feel that if we do, it'd be better to move towards a full JSON object as you mentioned in your previous comment, and that is a completely different beast. For the Marketplace implementation I chose 64px as it was one of the sizes the Marketplace generates and was close enough to the size Firefox OS uses. I could switch to 128 easily if needed, of course.
I do think keeping it simple is a good way for now. Let's let this bake for a few days, and if no one has any objections, we can reach out to the folks at a9 and opensearch.org.
We're currently no longer driving this with gaia due to a change in direction. I would very much like to revive this in the future, but closing for now as it's uncertain that these features are coming back.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.