Skip to content

Commit

Permalink
Add new attributes to support new card design introduced by new dynam…
Browse files Browse the repository at this point in the history
…ic layouts
  • Loading branch information
waisingyiu committed Jul 22, 2024
1 parent fe4318e commit 16bae4f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 11 deletions.
43 changes: 36 additions & 7 deletions proto/blueprint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,13 @@ message Card {
optional bool mega_boosted = 38;

/**
* Proposed new attributes
* Indicate how many columns the trail image is expected to take
*/
optional bool boosted_image = 39;
optional int trail_image_size = 39;

// image aspect ratio
/**
* Define constants for each image aspect ratio supported
*/
enum ImageAspectRatio {
IMAGE_ASPECT_RATIO_UNSPECIFIED = 0;
IMAGE_LANDSCAPE_5_3 = 1;
Expand All @@ -494,18 +496,28 @@ message Card {
IMAGE_SQUARE = 4;
}

//
/**
* Indicate in what aspect ratio the trail image should be rendered
*/
optional ImageAspectRatio trail_image_aspect_ratio = 40;

/**
* Define constants for the arrangement of sublinks on a card
*/
enum SublinksArrangement {
SUBLINKS_ARRANGEMENT_UNSPECIFIED = 0;
SUBLINKS_LEFT_VERTICAL = 1;
SUBLINKS_BOTTOM_HORIZONTAL = 2;
SUBLINKS_ARRANGEMENT_VERTICAL = 1;
SUBLINKS_ARRANGEMENT_HORIZONTAL = 2;
}

/**
* Indicate how sublinks are arranged.
*/
optional SublinksArrangement sublinks_arrangement = 41;

// 24 -> 28 -> 34 -> 42?
/**
* Define different levels for headline size
*/
enum BoostedHeadline {
BOOSTED_HEADLINE_UNSPECIFIED = 0;
BOOSTED_HEADLINE_STANDARD = 1;
Expand All @@ -514,7 +526,24 @@ message Card {
BOOSTED_HEADLINE_BOOSTED_3 = 4;
}

/**
* Indicate the size of a headline
*/
optional BoostedHeadline boosted_headline = 42;

/**
* Define constants for positions to display the headline in a card.
*/
enum HeadlinePosition {
HEADLINE_POSITION_UNSPECIFIED = 0;
HEADLINE_POSITION_INLINE = 1;
HEADLINE_POSITION_TOP = 2;
}

/**
* Indictate where to display the headline.
*/
optional HeadlinePosition headline_position = 43;
}

message Column {
Expand Down
30 changes: 26 additions & 4 deletions proto/proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@
"name": "SUBLINKS_ARRANGEMENT_UNSPECIFIED"
},
{
"name": "SUBLINKS_LEFT_VERTICAL",
"name": "SUBLINKS_ARRANGEMENT_VERTICAL",
"integer": 1
},
{
"name": "SUBLINKS_BOTTOM_HORIZONTAL",
"name": "SUBLINKS_ARRANGEMENT_HORIZONTAL",
"integer": 2
}
]
Expand Down Expand Up @@ -176,6 +176,22 @@
}
]
},
{
"name": "Card.HeadlinePosition",
"enum_fields": [
{
"name": "HEADLINE_POSITION_UNSPECIFIED"
},
{
"name": "HEADLINE_POSITION_INLINE",
"integer": 1
},
{
"name": "HEADLINE_POSITION_TOP",
"integer": 2
}
]
},
{
"name": "Row.RowType",
"enum_fields": [
Expand Down Expand Up @@ -1231,8 +1247,8 @@
},
{
"id": 39,
"name": "boosted_image",
"type": "bool",
"name": "trail_image_size",
"type": "int",
"optional": true
},
{
Expand All @@ -1252,6 +1268,12 @@
"name": "boosted_headline",
"type": "BoostedHeadline",
"optional": true
},
{
"id": 43,
"name": "headline_position",
"type": "HeadlinePosition",
"optional": true
}
]
},
Expand Down

0 comments on commit 16bae4f

Please sign in to comment.