Need a way to record, store, and serve "exhibits" (banners, featured items)

Bug #809016 reported by Matthew Paul Thomas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Medium
Michael Nelson

Bug Description

Making Ubuntu Software Center an interesting place to visit partly involves making it change in interesting ways over time.

A museum has both permanent and temporary exhibits. A magazine has both permanent columns and one-off features. In the same way, we would like USC to have not just permanent categories and popularity charts, but also temporary features.

These exhibits would be a mixture of two forms: a temporary promotion for an existing individual application, and a collection of applications on a particular theme.

For the banner that would promote either kind of exhibit, I think that we would need:
* an image for the banner
* coordinates for where to present localized text on the banner
* which font and color should be used to present the name of the exhibit.

Exhibits in the form of individual applications would also need a package name. USC would derive the application title from the package name, and use that as the text of the banner.

Exhibits in the form of collections would also need:
* an image for the top of the exhibit screen
* a background color for the remainder of the exhibit screen
* a series of package names
* a localized (!) title for the exhibit as a whole (e.g. "Learn a new language", "Hobbies & Crafts")
* coordinates for where to display that title over top of the background image.

As with these server-side features in general, there would need to be:
1. an interface for the editor to upload/specify this data
2. storage for the data
3. an API for USC to retrieve the data.

QA Notes:
 * Go to /exhibits/ - you will not be allowed unless you have the add_exhibit permission (ask someone to give you that perm)
 * Click on "Create a new exhibit"
 * Fill in the details (note, you should only be able to include a title if you list multiple package names etc.)
 * Once saved, [mvo to update?] view the exhibit(s) using USC trunk.

Changed in software-center-agent:
status: New → Confirmed
importance: Undecided → Medium
tags: added: kb-feature sp-1
Changed in software-center-agent:
assignee: nobody → Michael Nelson (michael.nelson)
status: Confirmed → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Just a few questions as I'm going through:

Would the image for either type be the same size, and if not, should either have an enforced size (so that a quality image at set size is uploaded and you're not doing any resizing when displaying etc?).

We could make fields like background colour and the title simply optional. If the title is not present when USC grabs the data, it would just use the title of the first package in the list of packages (which must have a length >= 1) and displays it with the given (pixel?) coordinates.

The other option, would be to present two separate options (perhaps individual and group exhibits?) which enforce which fields are required appropriately.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Also, what would sensible defaults for background colour, font name, font colour be? (#ffffff, Ubuntu, #000000 ?)

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I'm adding a 'published' attribute (True by default) to the exhibits, assuming that you'll want to have a number of exhibits published at a time, so that USC can use various exhibits in different contexts (or in a cycle). Is this correct?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Image size: I imagine the banners will be a consistent size, but I don't think we would get any benefit from enforcing a particular value. The images for the exhibit screens themselves probably will vary in size.

Background color: I'm fine making this optional, but I don't think it should have a default. If the curator provides no color value, the server shouldn't publish a color value either. That way USC knows it can follow its usual theme.

Title: If possible, it's probably better to prohibit it for single-application exhibits, and require it for multi-application ones, rather than making it optional. That will catch certain mistakes on the curator's part.

Published: At the moment we envision showing up to four-ish exhibits at a time, slowly cycling through them while you're on USC's home screen. I suppose if the server publishes too many for whatever reason, USC could just ignore the overflow. I don't see the harm in having an attribute for whether an exhibit should be published immediately, but probably it should be on by default.

Thanks!

Changed in software-center-agent:
status: In Progress → Fix Committed
tags: added: sp-2
removed: sp-1
Revision history for this message
Michael Nelson (michael.nelson) wrote :

QA notes: mvo has tested this on the VPS, creating exhibits and accessing them via the API (and landed the code in trunk that uses this), although, while testing the functionality, he and mpt found further requirements which are describes in bug 813497, bug 813498 and bug 813496.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Actually, I'd mis-understood... I'm trying to enable mvo to test the exhibits now, but it seems the vps is starved of resources (I can nolonger ssh in, or access the admin).

Revision history for this message
Michael Nelson (michael.nelson) wrote :

{{{
11:20 < noodles> mvo: no it's only on the VPS.
11:32 < mvo> noodles: ok (sorry for the delay), I will prepare trunk to work against that then. did you add some exhibits already?
11:37 < noodles> mvo: Oh, I'd assumed you had when you were testing the other day... Let's get you setup so you can add them there (if you're not already).
11:39 < noodles> mvo: *sigh*, although the vps seems to be suffering from a resource shortage again... which requires achuni to sort out (I can't ssh in atm)
11:41 < mvo> noodles: ok, I did create a single exihibit, if that is good enough it should be fine
11:42 < noodles> mvo: and you accessed it via the api etc?
11:43 < mvo> noodles: yeah
}}}

description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

Tt should be testable with:
$ SOFTWARE_CENTER_BUY_HOST=http://sc.staging.ubuntu.com ./software-center-gtk3

There are two default banners in the source and any additional banners will come from the exhibit system. This requires a downgrade of python-httplib2 to the natty version as otherwise it will fail with authentication issues because of the self signed certs.

Revision history for this message
Michael Vogt (mvo) wrote :
Changed in software-center-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.