← Back to team overview

ubuntu-appstore-developers team mailing list archive

Re: Minimizing icon and screenshot transfer size

 

On Tue, Apr 22, 2014 at 11:47 AM, Michał Sawicz
<michal.sawicz@xxxxxxxxxxxxx> wrote:
> On 22.04.2014 16:40, Alejandro J. Cura wrote:
>> Now, what would be the best place in our software stack to choose
>> among the available icon sizes?
>> We do not want the webservice to be sending the list of all available
>> icon urls with each result, and we don't want the scope or dash to
>> have hardcoded icon sizes to choose from, so my suggestion is:
>>
>> - the dash tells the scope the requested width when doing a search
>> - the scope passes that to the webservice
>> - the webservice uses that as a hint to select the next-biggest size
>> and return the appropriate url.
>
> I'm afraid that's not an option. The UI only knows the size of the image
> needed when creating the delegate for it, since it doesn't know what
> will the layout be when searching. I agree pushing the whole set of
> available sizes isn't good, either.

How is that size calculated, and how many possible sizes there are for
a given device?
Looking at http://bit.ly/scopes-json I'm hopeful that there are a few
("small", "medium" (default), "large"), and that we calculate them
when changing the device orientation or the output screen, and can
pass all three of them in the search hints.
Though I see that they may change on category-layout (they already do
for vertical-journal), and in that case this is not feasible either.

The other option I see is adding a call from the scope to the dash to
fetch the icon sizes for a given json.

> I think the best way would be for the requested size to actually be part
> of the URL that the UI can then mangle to include the minimum size it
> wants the image to be - the webservice would then return the next-bigger
> size.

What does the webservices team think of this option?
The problem our team sees with this is that this mangling will depend
on each type of scope, so the url mangling for the app store will be
different than the one for the wikipedia scope, etc.

cheers,
-- 
alecu


Follow ups

References