← Back to team overview

touch-packages team mailing list archive

[Bug 1381092] [NEW] Multiline attributes break (center flush) on return from preview

 

Public bug reported:

We have a scope that uses attributes to provide three lines of text.

The result layout is correct until a user clicks a result and navigates
to a preview and then returns.  After this, the second and third lines
are not left flush.

I'll attach screenshots.

JSON renderer:

{
    "schema-version": 1,
    "template": {
        "category-layout": "grid",
        "card-size": "small",
        "card-layout": "horizontal"
    },  
    "components": {
        "title": "title",
        "subtitle": "subtitle",
        "mascot": "art",
        "attributes": {
            "field": "attributes",
            "max-count": 6
        }
    }   
}

Query code:

    VariantBuilder builder;
    builder.add_tuple({
        {"value", Variant(strong(week_no).toStdString())}
    });
    builder.add_tuple({
        {"value", Variant("")}
    });
    builder.add_tuple({
        {"value", Variant(strong(QString("%1: %2").arg(sunrise).arg(sunrise_time)).toStdString())}
    });
    builder.add_tuple({
        {"value", Variant("")}
    });

    builder.add_tuple({
        {"value", Variant(strong(QString("%1: %2").arg(sunset).arg(sunset_time)).toStdString())}
    });
    builder.add_tuple({
        {"value", Variant("")}
    });
    date_res["attributes"] = builder.end();

** Affects: savilerow
     Importance: High
         Status: New

** Affects: unity8 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1381092

Title:
  Multiline attributes break (center flush) on return from preview

Status in The Savilerow project:
  New
Status in “unity8” package in Ubuntu:
  New

Bug description:
  We have a scope that uses attributes to provide three lines of text.

  The result layout is correct until a user clicks a result and
  navigates to a preview and then returns.  After this, the second and
  third lines are not left flush.

  I'll attach screenshots.

  JSON renderer:

  {
      "schema-version": 1,
      "template": {
          "category-layout": "grid",
          "card-size": "small",
          "card-layout": "horizontal"
      },  
      "components": {
          "title": "title",
          "subtitle": "subtitle",
          "mascot": "art",
          "attributes": {
              "field": "attributes",
              "max-count": 6
          }
      }   
  }

  Query code:

      VariantBuilder builder;
      builder.add_tuple({
          {"value", Variant(strong(week_no).toStdString())}
      });
      builder.add_tuple({
          {"value", Variant("")}
      });
      builder.add_tuple({
          {"value", Variant(strong(QString("%1: %2").arg(sunrise).arg(sunrise_time)).toStdString())}
      });
      builder.add_tuple({
          {"value", Variant("")}
      });

      builder.add_tuple({
          {"value", Variant(strong(QString("%1: %2").arg(sunset).arg(sunset_time)).toStdString())}
      });
      builder.add_tuple({
          {"value", Variant("")}
      });
      date_res["attributes"] = builder.end();

To manage notifications about this bug go to:
https://bugs.launchpad.net/savilerow/+bug/1381092/+subscriptions


Follow ups

References