Skip to content

Commit bbc742a

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Update EmptyWidget description text in application panel
This CL updates the description texts in the application panel. Screenshot: https://imgur.com/a/CXpklWK Bug: 325443331 Change-Id: Ib9acef820b76c668d6cd0480bd0716a421790861 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6169937 Commit-Queue: Kim-Anh Tran <[email protected]> Reviewed-by: Kateryna Prokopenko <[email protected]>
1 parent fbedad6 commit bbc742a

File tree

3 files changed

+74
-18
lines changed

3 files changed

+74
-18
lines changed

front_end/panels/application/ApplicationPanelSidebar.ts

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ const UIStrings = {
107107
*@description Text in Application Panel Sidebar of the Application panel
108108
*/
109109
localStorage: 'Local storage',
110+
/**
111+
*@description Text in the Application panel describing the local storage tab.
112+
*/
113+
localStorageDescription: 'On this page you can view, add, edit, and delete local storage key-value pairs.',
110114
/**
111115
*@description Text in Application Panel Sidebar of the Application panel
112116
*/
@@ -115,6 +119,10 @@ const UIStrings = {
115119
*@description Text in Application Panel if no session storage can be shown.
116120
*/
117121
noSessionStorage: 'No session storage detected',
122+
/**
123+
*@description Text in the Application panel describing the session storage tab.
124+
*/
125+
sessionStorageDescription: 'On this page you can view, add, edit, and delete session storage key-value pairs.',
118126
/**
119127
*@description Text in Application Panel Sidebar of the Application panel
120128
*/
@@ -123,6 +131,10 @@ const UIStrings = {
123131
*@description Text in Application Panel if no extension storage can be shown
124132
*/
125133
noExtensionStorage: 'No extension storage detected',
134+
/**
135+
*@description Text in the Application panel describing the extension storage tab.
136+
*/
137+
extensionStorageDescription: 'On this page you can view, add, edit, and delete extension storage key-value pairs.',
126138
/**
127139
*@description Text for extension session storage in Application panel
128140
*/
@@ -144,9 +156,13 @@ const UIStrings = {
144156
*/
145157
cookies: 'Cookies',
146158
/**
147-
*@description Text in Application Panel Sidebar if no cookies are set
159+
*@description Text in the Application Panel if no cookies are set
148160
*/
149161
noCookies: 'No cookies set',
162+
/**
163+
*@description Text for web cookies
164+
*/
165+
cookiesDescription: 'On this page you can view, add, edit, and delete cookies.',
150166
/**
151167
*@description Text in Application Panel Sidebar of the Application panel
152168
*/
@@ -163,6 +179,11 @@ const UIStrings = {
163179
*@description Text in App Manifest View of the Application panel
164180
*/
165181
noManifestDetected: 'No manifest detected',
182+
/**
183+
*@description Description text on manifests in App Manifest View of the Application panel which describes the app manifest view tab
184+
*/
185+
manifestDescription:
186+
'A manifest defines how your app appears on phone’s home screens and what the app looks like on launch.',
166187
/**
167188
*@description Text in App Manifest View of the Application panel
168189
*/
@@ -175,6 +196,10 @@ const UIStrings = {
175196
*@description Text in Application Panel if no indexedDB is detected
176197
*/
177198
noIndexeddb: 'No indexedDB detected',
199+
/**
200+
*@description Text in the Application panel describing the extension storage tab.
201+
*/
202+
indexeddbDescription: 'On this page you can view and delete indexedDB key-value pairs and databases.',
178203
/**
179204
*@description A context menu item in the Application Panel Sidebar of the Application panel
180205
*/
@@ -211,14 +236,18 @@ const UIStrings = {
211236
*@description Text in Frames View of the Application panel
212237
*/
213238
openedWindows: 'Opened Windows',
239+
/**
240+
*@description Text in Frames View of the Application panel
241+
*/
242+
openedWindowsDescription: 'On this page you can view windows opened via window\.open\(\).',
214243
/**
215244
*@description Label for plural of worker type: web workers
216245
*/
217246
webWorkers: 'Web Workers',
218247
/**
219248
*@description Label in frame tree for unavailable document
220249
*/
221-
documentNotAvailable: 'Document not available',
250+
documentNotAvailable: 'No document detected',
222251
/**
223252
*@description Description of content of unavailable document in Application panel
224253
*/
@@ -232,6 +261,10 @@ const UIStrings = {
232261
*@description Default name for worker
233262
*/
234263
worker: 'worker',
264+
/**
265+
*@description Description text for describing the dedicated worker tab.
266+
*/
267+
workerDescription: 'On this page you can view dedicated workers that are created by the parent frame.',
235268
/**
236269
* @description Aria text for screen reader to announce they can scroll to top of manifest if invoked
237270
*/
@@ -255,6 +288,10 @@ const UIStrings = {
255288
*@example {https://example.com} PH1
256289
*/
257290
thirdPartyPhaseout: 'Cookies from {PH1} may have been blocked due to third-party cookie phaseout.',
291+
/**
292+
* @description Description text in the Application Panel describing a frame's resources
293+
*/
294+
resourceDescription: 'On this page you can view the frame\'s resources.'
258295
};
259296
const str_ = i18n.i18n.registerUIStrings('panels/application/ApplicationPanelSidebar.ts', UIStrings);
260297
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -366,7 +403,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
366403
const storageSectionTitle = i18nString(UIStrings.storage);
367404
const storageTreeElement = this.addSidebarSection(storageSectionTitle, 'storage');
368405
this.localStorageListTreeElement = new ExpandableApplicationPanelTreeElement(
369-
panel, i18nString(UIStrings.localStorage), i18nString(UIStrings.noLocalStorage), '', 'local-storage');
406+
panel, i18nString(UIStrings.localStorage), i18nString(UIStrings.noLocalStorage),
407+
i18nString(UIStrings.localStorageDescription), 'local-storage');
370408
this.localStorageListTreeElement.setLink(
371409
'https://developer.chrome.com/docs/devtools/storage/localstorage/?utm_source=devtools' as
372410
Platform.DevToolsPath.UrlString);
@@ -375,7 +413,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
375413

376414
storageTreeElement.appendChild(this.localStorageListTreeElement);
377415
this.sessionStorageListTreeElement = new ExpandableApplicationPanelTreeElement(
378-
panel, i18nString(UIStrings.sessionStorage), i18nString(UIStrings.noSessionStorage), '', 'session-storage');
416+
panel, i18nString(UIStrings.sessionStorage), i18nString(UIStrings.noSessionStorage),
417+
i18nString(UIStrings.sessionStorageDescription), 'session-storage');
379418
this.sessionStorageListTreeElement.setLink(
380419
'https://developer.chrome.com/docs/devtools/storage/sessionstorage/?utm_source=devtools' as
381420
Platform.DevToolsPath.UrlString);
@@ -385,8 +424,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
385424
storageTreeElement.appendChild(this.sessionStorageListTreeElement);
386425

387426
this.extensionStorageListTreeElement = new ExpandableApplicationPanelTreeElement(
388-
panel, i18nString(UIStrings.extensionStorage), i18nString(UIStrings.noExtensionStorage), '',
389-
'extension-storage');
427+
panel, i18nString(UIStrings.extensionStorage), i18nString(UIStrings.noExtensionStorage),
428+
i18nString(UIStrings.extensionStorageDescription), 'extension-storage');
390429
this.extensionStorageListTreeElement.setLink(
391430
'https://developer.chrome.com/docs/extensions/reference/api/storage/?utm_source=devtools' as
392431
Platform.DevToolsPath.UrlString);
@@ -402,7 +441,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
402441
storageTreeElement.appendChild(this.indexedDBListTreeElement);
403442

404443
this.cookieListTreeElement = new ExpandableApplicationPanelTreeElement(
405-
panel, i18nString(UIStrings.cookies), i18nString(UIStrings.noCookies), '', 'cookies');
444+
panel, i18nString(UIStrings.cookies), i18nString(UIStrings.noCookies), i18nString(UIStrings.cookiesDescription),
445+
'cookies');
406446
this.cookieListTreeElement.setLink(
407447
'https://developer.chrome.com/docs/devtools/storage/cookies/?utm_source=devtools' as
408448
Platform.DevToolsPath.UrlString);
@@ -1138,7 +1178,8 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
11381178
const icon = IconButton.Icon.create('document');
11391179
this.setLeadingIcons([icon]);
11401180
self.onInvokeElement(this.listItemElement, this.onInvoke.bind(this));
1141-
const emptyView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noManifestDetected), '');
1181+
const emptyView = new UI.EmptyWidget.EmptyWidget(
1182+
i18nString(UIStrings.noManifestDetected), i18nString(UIStrings.manifestDescription));
11421183
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
11431184
const reportView = new UI.ReportView.ReportView(i18nString(UIStrings.appManifest));
11441185
this.view = new AppManifestView(emptyView, reportView, new Common.Throttler.Throttler(1000));
@@ -1257,7 +1298,9 @@ export class IndexedDBTreeElement extends ExpandableApplicationPanelTreeElement
12571298
private idbDatabaseTreeElements: IDBDatabaseTreeElement[];
12581299
private storageBucket?: Protocol.Storage.StorageBucket;
12591300
constructor(storagePanel: ResourcesPanel, storageBucket?: Protocol.Storage.StorageBucket) {
1260-
super(storagePanel, i18nString(UIStrings.indexeddb), i18nString(UIStrings.noIndexeddb), '', 'indexed-db');
1301+
super(
1302+
storagePanel, i18nString(UIStrings.indexeddb), i18nString(UIStrings.noIndexeddb),
1303+
i18nString(UIStrings.indexeddbDescription), 'indexed-db');
12611304
const icon = IconButton.Icon.create('database');
12621305
this.setLeadingIcons([icon]);
12631306
this.idbDatabaseTreeElements = [];
@@ -2262,8 +2305,8 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22622305
resourceType === Common.ResourceType.resourceTypes.Document ? this : this.categoryElements.get(categoryName);
22632306
if (!categoryElement) {
22642307
categoryElement = new ExpandableApplicationPanelTreeElement(
2265-
this.section.panel, resource.resourceType().category().title(), '', '', categoryName,
2266-
categoryName === 'Frames');
2308+
this.section.panel, resource.resourceType().category().title(), '', i18nString(UIStrings.resourceDescription),
2309+
categoryName, categoryName === 'Frames');
22672310
this.categoryElements.set(resourceType.name(), categoryElement);
22682311
this.appendChild(categoryElement, FrameTreeElement.presentationOrderCompare);
22692312
}
@@ -2277,7 +2320,8 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22772320
let categoryElement = this.categoryElements.get(categoryKey);
22782321
if (!categoryElement) {
22792322
categoryElement = new ExpandableApplicationPanelTreeElement(
2280-
this.section.panel, i18nString(UIStrings.openedWindows), '', '', categoryKey);
2323+
this.section.panel, i18nString(UIStrings.openedWindows), '', i18nString(UIStrings.openedWindowsDescription),
2324+
categoryKey);
22812325
this.categoryElements.set(categoryKey, categoryElement);
22822326
this.appendChild(categoryElement, FrameTreeElement.presentationOrderCompare);
22832327
}
@@ -2294,8 +2338,8 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22942338
i18nString(UIStrings.webWorkers);
22952339
let categoryElement = this.categoryElements.get(categoryKey);
22962340
if (!categoryElement) {
2297-
categoryElement =
2298-
new ExpandableApplicationPanelTreeElement(this.section.panel, categoryName, '', '', categoryKey);
2341+
categoryElement = new ExpandableApplicationPanelTreeElement(
2342+
this.section.panel, categoryName, '', i18nString(UIStrings.workerDescription), categoryKey);
22992343
this.categoryElements.set(categoryKey, categoryElement);
23002344
this.appendChild(categoryElement, FrameTreeElement.presentationOrderCompare);
23012345
}
@@ -2400,7 +2444,8 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
24002444
override onselect(selectedByUser?: boolean): boolean {
24012445
super.onselect(selectedByUser);
24022446
if (this.resource.isGenerated) {
2403-
this.panel.showCategoryView(i18nString(UIStrings.theContentOfThisDocumentHasBeen), '', '', null);
2447+
this.panel.showCategoryView(
2448+
'', i18nString(UIStrings.documentNotAvailable), i18nString(UIStrings.theContentOfThisDocumentHasBeen), null);
24042449
} else {
24052450
void this.panel.scheduleShowView(this.preparePreview());
24062451
}

front_end/panels/application/ServiceWorkerCacheTreeElement.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ const UIStrings = {
2424
*@description Text in Application Panel if no cache storage was detected.
2525
*/
2626
noCacheStorage: 'No cache storage detected',
27+
/**
28+
*@description Description text in Application Panel describing the cache storage tab
29+
*/
30+
cacheStorageDescription: 'On this page you can view and delete cache data.',
2731
/**
2832
*@description A context menu item in the Application Panel Sidebar of the Application panel
2933
*/
@@ -42,7 +46,8 @@ export class ServiceWorkerCacheTreeElement extends ExpandableApplicationPanelTre
4246

4347
constructor(resourcesPanel: ResourcesPanel, storageBucket?: Protocol.Storage.StorageBucket) {
4448
super(
45-
resourcesPanel, i18nString(UIStrings.cacheStorage), i18nString(UIStrings.noCacheStorage), '', 'cache-storage');
49+
resourcesPanel, i18nString(UIStrings.cacheStorage), i18nString(UIStrings.noCacheStorage),
50+
i18nString(UIStrings.cacheStorageDescription), 'cache-storage');
4651
const icon = IconButton.Icon.create('database');
4752
this.setLink(
4853
'https://developer.chrome.com/docs/devtools/storage/cache/?utm_source=devtools' as

front_end/panels/application/StorageBucketsTreeElement.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ const UIStrings = {
3131
* deleted independently. https://developer.chrome.com/docs/web-platform/storage-buckets.
3232
*/
3333
noStorageBuckets: 'No storage buckets detected',
34+
/**
35+
*@description Description text in the Application Panel describing the storage buckets tab.
36+
* Storage Buckets allow developers to separate site data into buckets so that they can be
37+
* deleted independently. https://developer.chrome.com/docs/web-platform/storage-buckets.
38+
*/
39+
storageBucketsDescription: 'On this page you can view and delete storage buckets, and their associated storageAPIs.'
3440
};
3541
const str_ = i18n.i18n.registerUIStrings('panels/application/StorageBucketsTreeElement.ts', UIStrings);
3642
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -40,8 +46,8 @@ export class StorageBucketsTreeParentElement extends ExpandableApplicationPanelT
4046

4147
constructor(storagePanel: ResourcesPanel) {
4248
super(
43-
storagePanel, i18nString(UIStrings.storageBuckets), i18nString(UIStrings.noStorageBuckets), '',
44-
'storage-buckets');
49+
storagePanel, i18nString(UIStrings.storageBuckets), i18nString(UIStrings.noStorageBuckets),
50+
i18nString(UIStrings.storageBucketsDescription), 'storage-buckets');
4551
const icon = IconButton.Icon.create('database');
4652
this.setLeadingIcons([icon]);
4753
this.setLink(

0 commit comments

Comments
 (0)