Bug 1613486 - Removed empty Pocket tab from DevTools r=thecount

Differential Revision: https://phabricator.services.mozilla.com/D62085

--HG--
extra : moz-landing-system : lando
This commit is contained in:
emcminn 2020-02-07 20:14:20 +00:00
Родитель 441a09145b
Коммит 85534d2d2e
3 изменённых файлов: 0 добавлений и 73 удалений

Просмотреть файл

@ -1199,34 +1199,6 @@ export class ASRouterAdminInner extends React.PureComponent {
return "n/a";
}
renderPocketStory(story) {
return (
<tr className="message-item" key={story.guid}>
<td className="message-id">
<span>
{story.guid} <br />
</span>
</td>
<td className="message-summary">
<pre>{JSON.stringify(story, null, 2)}</pre>
</td>
</tr>
);
}
renderPocketStories() {
const { rows } =
this.props.Sections.find(Section => Section.id === "topstories") || {};
return (
<table>
<tbody>
{rows && rows.map(story => this.renderPocketStory(story))}
</tbody>
</table>
);
}
renderDiscoveryStream() {
const { config } = this.props.DiscoveryStream;
@ -1525,13 +1497,6 @@ export class ASRouterAdminInner extends React.PureComponent {
</table>
</React.Fragment>
);
case "pocket":
return (
<React.Fragment>
<h2>Pocket</h2>
{this.renderPocketStories()}
</React.Fragment>
);
case "ds":
return (
<React.Fragment>
@ -1599,9 +1564,6 @@ export class ASRouterAdminInner extends React.PureComponent {
<li>
<a href="#devtools-groups">Message Groups</a>
</li>
<li>
<a href="#devtools-pocket">Pocket</a>
</li>
<li>
<a href="#devtools-ds">Discovery Stream</a>
</li>

Просмотреть файл

@ -1716,24 +1716,6 @@ class ASRouterAdminInner extends react__WEBPACK_IMPORTED_MODULE_4___default.a.Pu
return "n/a";
}
renderPocketStory(story) {
return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("tr", {
className: "message-item",
key: story.guid
}, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("td", {
className: "message-id"
}, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("span", null, story.guid, " ", react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("br", null))), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("td", {
className: "message-summary"
}, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("pre", null, JSON.stringify(story, null, 2))));
}
renderPocketStories() {
const {
rows
} = this.props.Sections.find(Section => Section.id === "topstories") || {};
return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("table", null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("tbody", null, rows && rows.map(story => this.renderPocketStory(story))));
}
renderDiscoveryStream() {
const {
config
@ -1878,9 +1860,6 @@ class ASRouterAdminInner extends react__WEBPACK_IMPORTED_MODULE_4___default.a.Pu
onChange: this.toggleGroups
})), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("td", null, this._getGroupImpressionsCount(id, frequency)), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("td", null, JSON.stringify(frequency, null, 2))))));
case "pocket":
return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_4___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("h2", null, "Pocket"), this.renderPocketStories());
case "ds":
return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_4___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("h2", null, "Discovery Stream"), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(DiscoveryStreamAdmin, {
state: {
@ -1917,8 +1896,6 @@ class ASRouterAdminInner extends react__WEBPACK_IMPORTED_MODULE_4___default.a.Pu
}, "Targeting")), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("li", null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("a", {
href: "#devtools-groups"
}, "Message Groups")), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("li", null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("a", {
href: "#devtools-pocket"
}, "Pocket")), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("li", null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("a", {
href: "#devtools-ds"
}, "Discovery Stream")), react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("li", null, react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("a", {
href: "#devtools-errors"

Просмотреть файл

@ -107,18 +107,6 @@ describe("ASRouterAdmin", () => {
"Targeting Utilities"
);
});
it("should render a pocket section for pocket route", () => {
wrapper = shallow(
<ASRouterAdminInner location={{ routes: ["pocket"] }} Sections={[]} />
);
assert.equal(
wrapper
.find("h2")
.at(0)
.text(),
"Pocket"
);
});
it("should render a DS section for DS route", () => {
wrapper = shallow(
<ASRouterAdminInner