Support providing fallback images

Bug #1324142 reported by James Henstridge
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Alejandro J. Cura
thumbnailer (Ubuntu)
Fix Released
High
James Henstridge
unity-scopes-api (Ubuntu)
Fix Released
Undecided
Michi Henning
unity-scopes-shell (Ubuntu)
Invalid
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
High
Albert Astals Cid

Bug Description

If the URI for a scope result icon can not be loaded, the scope result is not easily visible.

To counter this, the shell should replace the result image with a fallback image if the Image QML component changes to the Error state. At a minimum a single standard fallback image would be sufficient, but letting the scope pick a custom fallback via the category renderer template would be better.

One reason I'd like to see this is so we can switch the album art image provider to stop returning a fallback image. This has been requested by the music-app guys, and seems sensible since we might want different fallbacks in different contexts:

https://code.launchpad.net/~jamesh/thumbnailer/no-fallback-albumart/+merge/219460

It might also be useful for remote scopes using http: URIs for result icons.

Related branches

Michał Sawicz (saviq)
Changed in unity8:
status: New → Triaged
importance: Undecided → High
summary: - Shell should use a fallback icon if the icon specified for a scope
- result could not be loaded
+ Support providing fallback images
Michał Sawicz (saviq)
Changed in unity8:
assignee: nobody → Unity UI Team (unity-ui-team)
Revision history for this message
James Henstridge (jamesh) wrote :

When this is fixed, we'll need to remove the fixed fallback in the artist art image provider too.

Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
assignee: nobody → Unity UI Team (unity-ui-team)
importance: Undecided → High
status: New → Triaged
Michał Sawicz (saviq)
no longer affects: unity8
affects: unity-scopes-api → unity-scopes-api (Ubuntu)
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
assignee: Unity UI Team (unity-ui-team) → nobody
Pete Woods (pete-woods)
no longer affects: unity-scopes-shell
Revision history for this message
Thomas Strehl (strehl-t) wrote :

Michi: what was the proposed solution here? Providing a default fallback, with the scope being able to override the fallback per category?

Revision history for this message
Michi Henning (michihenning) wrote : Re: [Bug 1324142] Support providing fallback images

Hmmm... I guess it'll need to happen as part of the category renderer template, so the scope can nominate a preferred fallback image. The rest of it (making sure the fallback image is displayed when album art or some such can't be retrieved, or substituting a default fallback image if the scope hasn't specified one) is up to the shell.

I can work on this next week, if you like. I don't think it'll be difficult. I left this alone mainly because the bulk of the work could be done by the shell already. All it needs to do is display *something* when a request to retrieve artwork fails. Allowing the scope to specify a custom fallback image is just icing on the cake…

Cheers,

Michi.

On 11 Dec 2014, at 20:47 , Thomas Strehl <email address hidden> wrote:

> Michi: what was the proposed solution here? Providing a default
> fallback, with the scope being able to override the fallback per
> category?
>
> --
> You received this bug notification because you are subscribed to unity-
> scopes-api in Ubuntu.
> https://bugs.launchpad.net/bugs/1324142
>
> Title:
> Support providing fallback images
>
> Status in Thumbnail generator for all kinds of files:
> New
> Status in unity-scopes-api package in Ubuntu:
> New
> Status in unity-scopes-shell package in Ubuntu:
> New
> Status in unity8 package in Ubuntu:
> Triaged
>
> Bug description:
> If the URI for a scope result icon can not be loaded, the scope result
> is not easily visible.
>
> To counter this, the shell should replace the result image with a
> fallback image if the Image QML component changes to the Error state.
> At a minimum a single standard fallback image would be sufficient, but
> letting the scope pick a custom fallback via the category renderer
> template would be better.
>
> One reason I'd like to see this is so we can switch the album art
> image provider to stop returning a fallback image. This has been
> requested by the music-app guys, and seems sensible since we might
> want different fallbacks in different contexts:
>
> https://code.launchpad.net/~jamesh/thumbnailer/no-fallback-
> albumart/+merge/219460
>
> It might also be useful for remote scopes using http: URIs for result
> icons.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/thumbnailer/+bug/1324142/+subscriptions

Changed in unity-scopes-api (Ubuntu):
assignee: nobody → Michi Henning (michihenning)
status: New → In Progress
Revision history for this message
Michi Henning (michihenning) wrote :

It looks like all that's really needed on the scopes side is a documentation update. I've documented a "art-fallback" in the "components" dictionary of the category renderer. That allows a scope to specify a category-specific fallback image. I think this should be enough of a hook, but the shell will need to actually use the field if it cannot retrieve the artwork for a particular result. If no fallback image is specified, or the URI for the fallback image cannot be resolved, I guess the shell should display some universal placeholder image, so there is at least something on screen, instead of nothing at all.

Revision history for this message
Michi Henning (michihenning) wrote :

It looks like, over time, a number of additional fields have crept into the JSON, most likely because scope authors and the shell have made gentlemen's agreements. This includes (at least), mascot, emblem, attributes, summary, background, and overlay-color. It also looks like there are result-specific settings (such as mascot) that are undocumented, and for which there is no accessor/setter in the Result or SearchResult classes.

We need to construct a definitive list of which fields are used by the shell, both per-category and per-result, so we can document them. Otherwise, all these features will remain inaccessible to outside scope authors.

As discussed with Saviq on IRC, he'll find someone who can construct this list by inspecting the shell code, so we can update the scopes documentation accordingly.

In future, whenever the shell interprets something new in the JSON, or changes the meaning of an existing entry, we'll need to raise a bug with scopes-api so we can update the doc.

Revision history for this message
Michi Henning (michihenning) wrote :

Saviq just told me the following: "art", "summary", "background", "title", "mascot", "emblem", "subtitle", "attributes".

"attributes" looks like a dictionary, so we'll need to document the settings it has as well.

Revision history for this message
Michi Henning (michihenning) wrote :

OK, turns out that these were actually documented. I expected to see something in the tutorial, but it's actually documented in detail in the CategoryRenderer doc.

I've added mascot-fallback and emblem-fallback.

Saviq, can you please check the doc for CategoryRenderer and let me know whether the field names I used are OK?

Revision history for this message
James Henstridge (jamesh) wrote :

Currently "art" can either be a string giving the field holding the art URI, or a dictionary with "field" and "aspect-ratio" keys. Perhaps it would make sense to handle fallbacks in this second form as a third key?

Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, just commented to the same note on the MP.

Changed in unity-scopes-api (Ubuntu):
status: In Progress → Fix Committed
Changed in unity-scopes-api (Ubuntu):
status: Fix Committed → Fix Released
Changed in unity8 (Ubuntu):
assignee: nobody → Albert Astals Cid (aacid)
Changed in unity8 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.10+15.10.20150618-0ubuntu1

---------------
unity8 (8.10+15.10.20150618-0ubuntu1) wily; urgency=medium

  [ Albert Astals Cid ]
  * Refactor QmlTest.cmake module so that all tests can go through it.
    Also a bit of cleanup around tests.
  * Support fallback images for dash card and preview widgets (LP:
    #1324142)

  [ CI Train Bot ]
  * New rebuild forced.
  * Resync trunk.

  [ Daniel d'Andrada ]
  * Fix Shell tests

  [ Josh Arenson ]
  * Refactor greeter emulator to unlock the greeter via dbus

  [ Lukáš Tinkl ]
  * respect target window's devicePixelRatio in MouseTouchAdaptor

  [ Michael Zanetti ]
  * Refactor QmlTest.cmake module so that all tests can go through it.
    Also a bit of cleanup around tests.

  [ Michał Sawicz ]
  * Refactor QmlTest.cmake module so that all tests can go through it.
    Also a bit of cleanup around tests.

  [ handsome_feng ]
  * Forbid closing apps during the edge gesture. (LP: #1445572)
  * Removed the horizonal rule on pin unlock screen. (LP: #1368798)

  [ handsome_feng<email address hidden> ]
  * Forbid closing apps during the edge gesture. (LP: #1445572)

 -- CI Train Bot <email address hidden> Thu, 18 Jun 2015 19:40:06 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Michi Henning (michihenning) wrote :

The thumbnailer cannot remove support for fallback images until after all the scopes and apps that depend on it have been updated. We are working on that.

Changed in thumbnailer:
status: New → In Progress
Changed in thumbnailer:
importance: Undecided → High
Changed in thumbnailer (Ubuntu):
importance: Undecided → High
status: New → In Progress
no longer affects: thumbnailer
Changed in thumbnailer (Ubuntu):
assignee: nobody → James Henstridge (jamesh)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-scopes-shell (Ubuntu):
status: New → Confirmed
Changed in unity-scopes-shell (Ubuntu):
status: Confirmed → Invalid
Changed in thumbnailer (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: New → Fix Committed
importance: Undecided → High
milestone: none → ww08-2016
Changed in canonical-devices-system-image:
assignee: nobody → Alejandro J. Cura (alecu)
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers