Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js

Issue 2693193006: DevTools: Show docs link on empty manifest landing page (Closed)
Patch Set: just set textContent on change. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
index ceab6867f34566a8e6034a6f57e5ce3022798e8f..5872f2a912373b0c80ce00d02934587b130b043a 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
@@ -10,7 +10,11 @@ Resources.AppManifestView = class extends UI.VBox {
super(true);
this.registerRequiredCSS('resources/appManifestView.css');
- this._emptyView = new UI.EmptyWidget(Common.UIString('No web app manifest'));
+ this._emptyView = new UI.EmptyWidget(Common.UIString('No manifest detected'));
+ var p = this._emptyView.appendParagraph();
+ var linkElement = UI.createExternalLink('https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/?utm_source=devtools',
+ Common.UIString('Read more about the web manifest'));
+ p.appendChild(UI.formatLocalized('A web manifest allows you to control how your app behaves when launched and displayed to the user. %s', [linkElement]));
this._emptyView.show(this.contentElement);
this._emptyView.hideWidget();
@@ -28,14 +32,6 @@ Resources.AppManifestView = class extends UI.VBox {
addToHomeScreen.addEventListener(UI.ToolbarButton.Events.Click, this._addToHomescreen, this);
toolbar.appendToolbarItem(addToHomeScreen);
- this._manifestlessSection = this._reportView.appendSection(Common.UIString('No manifest detected'));
- var p = createElement('p');
- p.textContent = 'A web manifest allows you to control how your app behaves when launched and displayed to the user. ';
- p.appendChild(UI.createExternalLink('https://developers.google.com/web/progressive-web-apps/?utm_source=devtools',
- Common.UIString('Read more on developers.google.com')));
- this._manifestlessSection.element.appendChild(p);
- this._manifestlessSection.element.classList.add('hidden');
-
this._presentationSection = this._reportView.appendSection(Common.UIString('Presentation'));
this._iconsSection = this._reportView.appendSection(Common.UIString('Icons'));
@@ -111,12 +107,8 @@ Resources.AppManifestView = class extends UI.VBox {
UI.createLabel(error.message, error.critical ? 'smallicon-error' : 'smallicon-warning'));
}
- var manifestDataFound = !!data;
- this._manifestlessSection.element.classList.toggle('hidden', manifestDataFound);
- this._presentationSection.element.classList.toggle('hidden', !manifestDataFound);
- this._iconsSection.element.classList.toggle('hidden', !manifestDataFound);
- this._identitySection.element.classList.toggle('hidden', !manifestDataFound);
- if (!data) return;
+ if (!data)
+ return;
var parsedManifest = JSON.parse(data);
this._nameField.textContent = stringProperty('name');
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698