Support providing fallback images
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
Alejandro J. Cura | ||
| | thumbnailer (Ubuntu) |
High
|
James Henstridge | ||
| | unity-scopes-api (Ubuntu) |
Undecided
|
Michi Henning | ||
| | unity-scopes-shell (Ubuntu) |
Undecided
|
Unassigned | ||
| | unity8 (Ubuntu) |
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:/
It might also be useful for remote scopes using http: URIs for result icons.
Related branches
- Michi Henning (community): Approve on 2016-02-05
- PS Jenkins bot: Approve (continuous-integration) on 2016-02-05
-
Diff: 606 lines (+152/-134)19 files modifieddata/CMakeLists.txt (+0/-8)
data/thumbnailer.in (+1/-6)
debian/control (+2/-11)
debian/thumbnailer-common.install (+0/-2)
debian/thumbnailer-service.install (+1/-0)
plugins/Ubuntu/Thumbnailer.0.1/albumartgenerator.cpp (+3/-11)
plugins/Ubuntu/Thumbnailer.0.1/artistartgenerator.cpp (+3/-11)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailerimageresponse.cpp (+13/-19)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailerimageresponse.h (+4/-10)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailgenerator.cpp (+2/-29)
tests/image-provider/image-provider_test.cpp (+82/-0)
tests/qml/CMakeLists.txt (+4/-0)
tests/qml/Fixture.qml (+8/-10)
tests/qml/tst_albumart.qml (+13/-14)
tests/qml/tst_photo.qml (+1/-1)
tests/testsetup.h.in (+0/-1)
tests/utils/artserver.cpp (+0/-1)
tests/utils/testutils.cpp (+11/-0)
tests/utils/testutils.h (+4/-0)
- Michi Henning (community): Approve on 2016-01-13
- PS Jenkins bot: Approve (continuous-integration) on 2016-01-12
- James Henstridge: Pending requested 2015-06-29
-
Diff: 606 lines (+152/-134)19 files modifieddata/CMakeLists.txt (+0/-8)
data/thumbnailer.in (+1/-6)
debian/control (+2/-11)
debian/thumbnailer-common.install (+0/-2)
debian/thumbnailer-service.install (+1/-0)
plugins/Ubuntu/Thumbnailer.0.1/albumartgenerator.cpp (+3/-11)
plugins/Ubuntu/Thumbnailer.0.1/artistartgenerator.cpp (+3/-11)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailerimageresponse.cpp (+13/-19)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailerimageresponse.h (+4/-10)
plugins/Ubuntu/Thumbnailer.0.1/thumbnailgenerator.cpp (+2/-29)
tests/image-provider/image-provider_test.cpp (+82/-0)
tests/qml/CMakeLists.txt (+4/-0)
tests/qml/Fixture.qml (+8/-10)
tests/qml/tst_albumart.qml (+13/-14)
tests/qml/tst_photo.qml (+1/-1)
tests/testsetup.h.in (+0/-1)
tests/utils/artserver.cpp (+0/-1)
tests/utils/testutils.cpp (+11/-0)
tests/utils/testutils.h (+4/-0)
- Paweł Stołowski: Approve on 2015-01-08
- Michał Sawicz: Approve on 2015-01-08
- Facundo Batista (community): Approve on 2015-01-08
- PS Jenkins bot: Approve (continuous-integration) on 2015-01-08
-
Diff: 201 lines (+57/-15)6 files modifiedCMakeLists.txt (+1/-1)
RELEASE_NOTES.md (+12/-0)
debian/changelog (+14/-0)
include/unity/scopes/PreviewWidget.h (+4/-2)
src/scopes/CategoryRenderer.cpp (+17/-9)
src/scopes/PreviewWidget.cpp (+9/-3)
- Andrea Cimitan (community): Approve on 2015-05-29
- PS Jenkins bot: Needs Fixing (continuous-integration) on 2015-05-08
- Michi Henning (community): Approve on 2015-05-06
-
Diff: 360 lines (+151/-8)9 files modifiedplugins/Dash/CardCreator.js (+8/-0)
qml/Components/ZoomableImage.qml (+1/-0)
qml/Dash/Previews/PreviewHeader.qml (+6/-0)
qml/Dash/Previews/PreviewImageGallery.qml (+14/-0)
qml/Dash/Previews/PreviewZoomableImage.qml (+13/-0)
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml (+30/-0)
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml (+22/-2)
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml (+27/-6)
tests/qmltests/Dash/tst_Card.qml (+30/-0)
| 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 |
| Changed in unity8: | |
| assignee: | nobody → Unity UI Team (unity-ui-team) |
| James Henstridge (jamesh) wrote : | #1 |
| Changed in unity8 (Ubuntu): | |
| assignee: | nobody → Unity UI Team (unity-ui-team) |
| importance: | Undecided → High |
| status: | New → Triaged |
| no longer affects: | unity8 |
| affects: | unity-scopes-api → unity-scopes-api (Ubuntu) |
| Changed in unity8 (Ubuntu): | |
| assignee: | Unity UI Team (unity-ui-team) → nobody |
| no longer affects: | unity-scopes-shell |
| Thomas Strehl (strehl-t) wrote : | #2 |
Michi: what was the proposed solution here? Providing a default fallback, with the scope being able to override the fallback per category?
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:/
>
> 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:/
> albumart/
>
> It might also be useful for remote scopes using http: URIs for result
> icons.
>
> To manage notifications about this bug go to:
> https:/
| Changed in unity-scopes-api (Ubuntu): | |
| assignee: | nobody → Michi Henning (michihenning) |
| status: | New → In Progress |
| Michi Henning (michihenning) wrote : | #4 |
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.
| Michi Henning (michihenning) wrote : | #5 |
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.
| Michi Henning (michihenning) wrote : | #6 |
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.
| Michi Henning (michihenning) wrote : | #7 |
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?
| James Henstridge (jamesh) wrote : | #8 |
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?
| Michał Sawicz (saviq) wrote : | #9 |
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 |
| Launchpad Janitor (janitor) wrote : | #10 |
This bug was fixed in the package unity8 - 8.10+15.
---------------
unity8 (8.10+15.
[ 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 |
| Michi Henning (michihenning) wrote : | #11 |
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) |
| Launchpad Janitor (janitor) wrote : | #12 |
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 |


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