Closed Bug 1001379 Opened 6 years ago Closed 6 years ago

Add weight to JSONSnippet model

Categories

(Snippets :: Service, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giorgos, Assigned: giorgos)

References

Details

(Whiteboard: [kb=1346111] )

* Add the same weight attribute to JSON (Fennec) Snippets
 * Update the served JSON to include this information. New JSON will have the following format:

{"url": "https://mozilla.org", 
 "text": "This is text message for snippet #1. Links to mozilla.org", 
 "target_geo": "US",  # optional 
 "id": 1, 
 "icon": "data:imag..."
 "weight": 100 }

 * 'weight' will be always present in JSON and will have a default value of 100
OS: Linux → All
Hardware: x86_64 → All
No longer blocks: 999468
Blocks: 999468
Whiteboard: [kb=1346111]
Assignee: nobody → giorgos
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
This is great!

Giorgos, let's hold any deploy of this until :dria or :margaret confirm that the client can handle the new JSON.

I updated the Snippet docs to include the data spec for this. Let's keep it up to date and/or improve it as this resource gets richer. https://wiki.mozilla.org/Firefox/Projects/Firefox_Start/Snippet_Service#Data_Specification
Flags: needinfo?(margaret.leibovic)
Adding an extra field to the snippets JSON won't break the client, so it should be fine to deploy that, but it would be good to test that before deploying.

I just filed bug 1002567 to add this support to the client.
Flags: needinfo?(margaret.leibovic)
Verified on Fennec Release using snippet stage: Adding weight doesn't break the client. Pushing to prod
Prod is up-to-date and Fennec Release still working. Yay!
Awesome! I also landed bug 1002567 on Nightly, so weights should work on Nightly now (Firefox 32).
You need to log in before you can comment on or make changes to this bug.