commit | 1ec0c93ca9d8460413516de65b1c4956f4576c9a | [log] [tgz] |
---|---|---|
author | Kayce Basques <[email protected]> | Tue Apr 30 18:38:53 2019 |
committer | Commit Bot <[email protected]> | Tue Apr 30 18:38:53 2019 |
tree | 429dd6d628d8f2ff39109eca5322720e5b35dcfd | |
parent | 1fe1d884f0a1ac6e71bb11ff853cc15503f87804 [diff] [blame] |
DevTools: Add links to the storage docs This CL adds links from the storage panes to the official DevTools storage documentation by means of a new `appendLink()` method on `EmptyWidget`. I added the `appendLink()` method because I plan on repeating this pattern as much as possible wherever `EmptyWidget` is used. `EmptyWidget` is a good surface for linking out to the documentation because it's often the first thing that users see while exploring the DevTools UI. All of the panes on the Application panel reuse a single `EmptyWidget` instance so I had to add some logic to conditionally display the link. Bug: 956639 Change-Id: I5ee17c5f10ef85b8ae2957c93ee7d0d7edf32e81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588758 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Kayce Basques <[email protected]> Auto-Submit: Kayce Basques <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#655288} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: ef2f2f24b6fee8e721a53adb6e244133645f2821
diff --git a/front_end/ui/EmptyWidget.js b/front_end/ui/EmptyWidget.js index c35c254..9ac0493 100644 --- a/front_end/ui/EmptyWidget.js +++ b/front_end/ui/EmptyWidget.js
@@ -52,6 +52,14 @@ } /** + * @param {string} link + * @return {!Node} + */ + appendLink(link) { + return this._contentElement.appendChild(UI.XLink.create(link, 'Learn more')); + } + + /** * @param {string} text */ set text(text) {