Emblem attribute of a previewWidget of type header does not work

Bug #1543806 reported by ric silva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-js-scopes
Invalid
High
Alexandre Abreu

Bug Description

I am trying to use the 'emblem' attribute on a previewWidget of type 'header'.

According to the C++ API docs, this type of previewWidget should accept an 'emblem' attribute with a URI as a value. However, when I use it with a valid URI, nothing is displayed in the widget.

If I try the exact same URI as the source for the 'mascot' attribute, the widget shows me the image in the mascot position. However, the emblem position does not seem to work.

var my_uri = "some_valid_URI"
var header = new scopes.lib.PreviewWidget("header", "header");
header.add_attribute_mapping("title", "title");
header.add_attribute_value("mascot", my_uri) // this works OK
header.add_attribute_value("emblem", my_uri) // this does not work

Changed in unity-js-scopes:
assignee: nobody → Alexandre Abreu (abreu-alexandre)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

This is a bug in the docs, since the preview header widget in unity8 does not support "emblem" as an attribute,

see https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1424720

"emblem" works in a categoryrenderer though,

I added a bug in unity-scopes-api

https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1544688

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

To add a bit on the comment above for a CategoryRenderer you can have a category description with 'emblem' in the components list, with an id of "emblem", e.g.

      \"components\": { \
        \"title\": \"title\", \
        \"emblem\": \"emblem\", \
        \"art\" : { \
          \"field\": \"art\" \
        }, \
        \"subtitle\": \"artist\" \
      } \

and have it display the emblem while adding a result:

    categorised_result.set("emblem", your_uri);

Changed in unity-js-scopes:
status: In Progress → Invalid
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

To be noted, the Unity8 bug mentioned above is soon to be fixed:

https://code.launchpad.net/~aacid/unity8/emblemInPreviews/+merge/286038

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.