RESOLVED FIXED Bug 190299
Web Inspector: Table should support select all (Cmd-A)
https://bugs.webkit.org/show_bug.cgi?id=190299
Summary Web Inspector: Table should support select all (Cmd-A)
Matt Baker
Reported 2018-10-04 18:09:17 PDT
Unlike deselectAll, this will require an architectural change to Table so that uncached rows can be flagged as selected.
Attachments
Patch (5.90 KB, patch)
2018-11-08 14:22 PST, Matt Baker
no flags
Archive of layout-test-results from ews100 for mac-sierra (2.68 MB, application/zip)
2018-11-08 15:13 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.69 MB, application/zip)
2018-11-08 15:45 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews117 for mac-sierra (3.32 MB, application/zip)
2018-11-08 16:16 PST, EWS Watchlist
no flags
Patch (4.88 KB, patch)
2018-11-13 08:41 PST, Matt Baker
no flags
Patch for landing (5.40 KB, patch)
2018-11-13 11:47 PST, Matt Baker
no flags
Patch for landing (5.41 KB, patch)
2018-11-13 12:05 PST, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2018-10-04 18:09:44 PDT
Matt Baker
Comment 2 2018-11-08 14:22:22 PST
EWS Watchlist
Comment 3 2018-11-08 15:13:33 PST
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9913683 New failing tests: inspector/table/table-selection.html
EWS Watchlist
Comment 4 2018-11-08 15:13:35 PST
Created attachment 354281 [details] Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Matt Baker
Comment 5 2018-11-08 15:18:07 PST
(In reply to Build Bot from comment #4) > Created attachment 354281 [details] > Archive of layout-test-results from ews100 for mac-sierra > > The attached test failures were seen while running run-webkit-tests on the > mac-ews. > Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6 Depends on https://bugs.webkit.org/show_bug.cgi?id=189718.
EWS Watchlist
Comment 6 2018-11-08 15:45:11 PST
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9914098 New failing tests: inspector/table/table-selection.html
EWS Watchlist
Comment 7 2018-11-08 15:45:13 PST
Created attachment 354285 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 8 2018-11-08 16:16:33 PST
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9914115 New failing tests: inspector/table/table-selection.html
EWS Watchlist
Comment 9 2018-11-08 16:16:36 PST
Created attachment 354287 [details] Archive of layout-test-results from ews117 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-sierra Platform: Mac OS X 10.12.6
Devin Rousso
Comment 10 2018-11-08 23:17:32 PST
Comment on attachment 354275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354275&action=review > Source/WebInspectorUI/UserInterface/Views/Table.js:397 > + this._selectedRowIndex = this._selectedRows.size - 1; One interesting thing I noticed in Finder is that after selecting all items with ⌘A, shift-clicking will set the "anchor" as the middle item in the list. Not sure if we care about mirroring that, but it's something to consider. > Source/WebInspectorUI/UserInterface/Views/Table.js:1295 > + if (this._keyboardShortcutCommandA.matchesEvent(event)) { Creating a `WI.KeyboardShortcut` for the purpose of checking if it matches seems very wasteful. I'd rather you follow the approach of <https://webkit.org/b/191435> (once it lands).
Matt Baker
Comment 11 2018-11-13 08:41:08 PST
Devin Rousso
Comment 12 2018-11-13 09:42:27 PST
Comment on attachment 354671 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354671&action=review r=me, one thing I'm "concerned" about is that ⌘-a will only work if the focused/receiving element is within the `WI.Table` (e.g. if the user tries to ⌘-a on the cookies view immediately after opening the tab, would it still select all?). It's fair to say that the owner of the `WI.Table` should be responsible for that, but we might want to think about how to make this better (assuming it's actually an issue). > Source/WebInspectorUI/UserInterface/Views/Table.js:1301 > + if (event.key === "a" && event.metaKey) { Please add a FIXME for `event.commandOrControlKey`, as this will not work right on non-mac platforms. > LayoutTests/inspector/table/table-selection.html:156 > + InspectorTest.expectEqual(table.selectedRows.length, 0, "Should have no selected rows."); I think this test would be more demonstrative if you had an initially selected row (e.g. 1), called `selectAll`, and then checked that the only selected row was the one initially selected (e.g. 1) > LayoutTests/inspector/table/table-selection.html:170 > + InspectorTest.expectEqual(table.selectedRows.length, table.numberOfRows, "Should have selected all rows."); Ditto (156), but you'd instead have the check that you have now
Matt Baker
Comment 13 2018-11-13 11:47:21 PST
Created attachment 354687 [details] Patch for landing
WebKit Commit Bot
Comment 14 2018-11-13 11:48:20 PST
Comment on attachment 354687 [details] Patch for landing Rejecting attachment 354687 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 354687, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=354687&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=190299&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Processing patch 354687 from bug 190299. Fetching: https://bugs.webkit.org/attachment.cgi?id=354687 Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Parsed 5 diffs from patch file(s). patching file Source/WebInspectorUI/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebInspectorUI/UserInterface/Views/Table.js Hunk #2 FAILED at 1298. 1 out of 2 hunks FAILED -- saving rejects to file Source/WebInspectorUI/UserInterface/Views/Table.js.rej patching file LayoutTests/ChangeLog patching file LayoutTests/inspector/table/table-selection-expected.txt patching file LayoutTests/inspector/table/table-selection.html Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: https://webkit-queues.webkit.org/results/9975717
Matt Baker
Comment 15 2018-11-13 12:05:31 PST
Created attachment 354688 [details] Patch for landing
WebKit Commit Bot
Comment 16 2018-11-13 12:44:43 PST
Comment on attachment 354688 [details] Patch for landing Clearing flags on attachment: 354688 Committed r238140: <https://trac.webkit.org/changeset/238140>
WebKit Commit Bot
Comment 17 2018-11-13 12:44:45 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.