Bug 144297

Summary: Web Inspector: Add new tab button to make it easy to bring a closed tab back
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Screenshot of New Tab View
none
Patch joepeck: review+, timothy: commit-queue-

Timothy Hatcher
Reported 2015-04-27 17:19:36 PDT
The tab bar should have a new tab button.
Attachments
Patch (24.71 KB, patch)
2015-04-27 17:21 PDT, Timothy Hatcher
no flags
Screenshot of New Tab View (107.78 KB, image/png)
2015-04-27 17:21 PDT, Timothy Hatcher
no flags
Patch (27.34 KB, patch)
2015-04-27 19:41 PDT, Timothy Hatcher
joepeck: review+
timothy: commit-queue-
Timothy Hatcher
Comment 1 2015-04-27 17:21:23 PDT
Timothy Hatcher
Comment 2 2015-04-27 17:21:57 PDT
Created attachment 251793 [details] Screenshot of New Tab View
Timothy Hatcher
Comment 3 2015-04-27 17:25:53 PDT
Comment on attachment 251792 [details] Patch I need to tweak this to work with JSContext inspection.
Timothy Hatcher
Comment 4 2015-04-27 19:41:56 PDT
Joseph Pecoraro
Comment 5 2015-04-27 19:51:05 PDT
Comment on attachment 251807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251807&action=review r=me! > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css:26 > + > + Style: Double newline oops. > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js:33 > + this._allowedNewTabs = [{image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type}, > + {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type}]; Style: Would read cleaner on their own lines. > Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js:58 > + var boxElement = document.createElement("div"); > + boxElement.classList.add("box"); > + > + var imageElement = document.createElement("img"); > + imageElement.src = info.image; > + > + var labelElement = document.createElement("label"); > + labelElement.textContent = info.title; > + > + boxElement.appendChild(imageElement); > + tabItemElement.appendChild(boxElement); > + tabItemElement.appendChild(labelElement); Style: I still prefer just inlining the appendChilds, it saves so many lines, and you know the element is always inserted. Exceptions are "this.element.appendChild".
Timothy Hatcher
Comment 6 2015-04-28 06:06:08 PDT
Note You need to log in before you can comment on or make changes to this bug.