Quite often I have to file bugreports, where caching headers and varnish IDs and dates and cookies and basically everything that might remotely influence your session is important. Most of this information (with the exception of cookies, which is bug 16531) is available to me right there in the response section of the request. But if I want to use it, I have to select each individual value and copy and past it somewhere else. This leads to a routine of "Type name of header (faster than copying it from inspector), copy value, repeat". After 2 headers i'm annoyed that I have to do it like this, after 8 headers i'm cursing :) JoePeck> thedj: hmm, our DataGrid class doesn't yet have multiple-selection, so that would require some implementation work JoePeck> thedj: we have a context menu for "Copy Row" maybe a "Copy All Rows" would be a reasonable short term hack"
<rdar://problem/24576302>
It was easy to add a "Copy Table" context menu item here, which includes the DataGrid header names and then all the copyable row data. I'll test this a bit more and put up a patch.
Created attachment 270956 [details] [PATCH] Proposed Fix There are other enhancement requests around copying requests as cURL and getting more exportable data about requests/responses. However a quick fix for this, which makes sense elsewhere as well, is to add a "Copy Table" context menu to any DataGrid that has copyable data. This patch adds it to rows and headers.
Comment on attachment 270956 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=270956&action=review > Source/WebInspectorUI/UserInterface/Views/DataGrid.js:1250 > + var fields = []; > + for (var identifier of this.orderedColumns) let
Comment on attachment 270956 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=270956&action=review >> Source/WebInspectorUI/UserInterface/Views/DataGrid.js:1250 >> + for (var identifier of this.orderedColumns) > > let Actually, couldn't you just use an Array.prototype.map() here? let fields = this.orderedColumns.map(item => this.headerTableHeader(identifier).textContent);
Comment on attachment 270956 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=270956&action=review >>> Source/WebInspectorUI/UserInterface/Views/DataGrid.js:1250 >>> + for (var identifier of this.orderedColumns) >> >> let > > Actually, couldn't you just use an Array.prototype.map() here? > let fields = this.orderedColumns.map(item => this.headerTableHeader(identifier).textContent); I like it. Used this for both this and the other similar method.
Created attachment 270960 [details] [PATCH] For Landing
> > Actually, couldn't you just use an Array.prototype.map() here? > > let fields = this.orderedColumns.map(item => this.headerTableHeader(identifier).textContent); s/item/identifier/ Also we were avoiding arrow functions that used `this` in their body because the implicit lexical this binding was flakey until recently. But from what I understand this is working well now, and I tested this case and it worked well. So, onward with arrow functions!
Comment on attachment 270960 [details] [PATCH] For Landing Clearing flags on attachment: 270960 Committed r196348: <http://trac.webkit.org/changeset/196348>
Super useful change, I've already used it twice today !