Bug 1561694 - Switching hardcoded layout to `3-col-7-row-octr` (#5130)
This commit is contained in:
Родитель
5fbf7b06bf
Коммит
d98df717b0
|
@ -1072,10 +1072,11 @@ this.DiscoveryStreamFeed = class DiscoveryStreamFeed {
|
|||
}
|
||||
};
|
||||
|
||||
// Hardcoded version of layout_variant `3-col-7-row-octr`
|
||||
defaultLayoutResp = {
|
||||
"spocs": {
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/unique-spocs",
|
||||
"spocs_per_domain": 1,
|
||||
"spocs_per_domain": 1
|
||||
},
|
||||
"layout": [
|
||||
{
|
||||
|
@ -1084,11 +1085,11 @@ defaultLayoutResp = {
|
|||
{
|
||||
"type": "TopSites",
|
||||
"header": {
|
||||
"title": "Top Sites",
|
||||
"title": "Top Sites"
|
||||
},
|
||||
"properties": {},
|
||||
},
|
||||
],
|
||||
"properties": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
|
@ -1100,14 +1101,14 @@ defaultLayoutResp = {
|
|||
"subtitle": "",
|
||||
"link_text": "How it works",
|
||||
"link_url": "https://getpocket.com/firefox/new_tab_learn_more",
|
||||
"icon": "resource://activity-stream/data/content/assets/glyph-pocket-16.svg",
|
||||
"icon": "resource://activity-stream/data/content/assets/glyph-pocket-16.svg"
|
||||
},
|
||||
"properties": {},
|
||||
"styles": {
|
||||
".ds-message": "margin-bottom: -20px",
|
||||
},
|
||||
},
|
||||
],
|
||||
".ds-message": "margin-bottom: -20px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
|
@ -1115,189 +1116,74 @@ defaultLayoutResp = {
|
|||
{
|
||||
"type": "CardGrid",
|
||||
"properties": {
|
||||
"items": 3,
|
||||
"items": 21
|
||||
},
|
||||
"header": {
|
||||
"title": "",
|
||||
"title": ""
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?version=3&consumer_key=$apiKey&locale_lang=en-US",
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?version=3&consumer_key=$apiKey&locale_lang=en-US&count=30"
|
||||
},
|
||||
"spocs": {
|
||||
"probability": 1,
|
||||
"positions": [
|
||||
{
|
||||
"index": 2,
|
||||
"index": 2
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Health & Fitness 💪",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=4&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
"spocs": {
|
||||
"probability": 1,
|
||||
"positions": [
|
||||
{
|
||||
"index": 2,
|
||||
"index": 4
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Tech 💻",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=5&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Entertainment 🍿",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=8&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
"spocs": {
|
||||
"probability": 1,
|
||||
"positions": [
|
||||
{
|
||||
"index": 3,
|
||||
"index": 11
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Personal Finance 💰",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=2&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Business 💼",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=1&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"width": 12,
|
||||
"components": [
|
||||
{
|
||||
"type": "CardGrid",
|
||||
"header": {
|
||||
"title": "Science 🔬",
|
||||
},
|
||||
"feed": {
|
||||
"embed_reference": null,
|
||||
"url": "https://getpocket.cdn.mozilla.net/v3/firefox/global-recs?topic_id=7&end_time_offset=172800&version=3&consumer_key=$apiKey&locale_lang=en-US&feed_variant=OptimalCuratedLinksForLocaleFeed&model_id=external_time_live",
|
||||
},
|
||||
"properties": {
|
||||
"items": 4,
|
||||
"has_numbers": false,
|
||||
"has_images": true,
|
||||
},
|
||||
"styles": {
|
||||
".ds-header": "margin-top: 4px;",
|
||||
},
|
||||
"spocs": {
|
||||
"probability": 1,
|
||||
"positions": [
|
||||
{
|
||||
"index": 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
"index": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
{
|
||||
"type": "Navigation",
|
||||
"properties": {
|
||||
"alignment": "left-align",
|
||||
"links": [
|
||||
{
|
||||
"name": "Must Reads",
|
||||
"url": "https://getpocket.com/explore/must-reads?src=fx_new_tab"
|
||||
},
|
||||
{
|
||||
"name": "Productivity",
|
||||
"url": "https://getpocket.com/explore/productivity?src=fx_new_tab"
|
||||
},
|
||||
{
|
||||
"name": "Health",
|
||||
"url": "https://getpocket.com/explore/health?src=fx_new_tab"
|
||||
},
|
||||
{
|
||||
"name": "Finance",
|
||||
"url": "https://getpocket.com/explore/finance?src=fx_new_tab"
|
||||
},
|
||||
{
|
||||
"name": "Technology",
|
||||
"url": "https://getpocket.com/explore/technology?src=fx_new_tab"
|
||||
},
|
||||
{
|
||||
"name": "More Recommendations ›",
|
||||
"url": "https://getpocket.com/explore/trending?src=fx_new_tab"
|
||||
}
|
||||
]
|
||||
},
|
||||
"header": {
|
||||
"title": "Popular Topics"
|
||||
},
|
||||
"styles": {
|
||||
".ds-navigation": "margin-top: -10px;"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const EXPORTED_SYMBOLS = ["DiscoveryStreamFeed"];
|
||||
|
|
Загрузка…
Ссылка в новой задаче