RESOLVED FIXED230600
Web Inspector: add a pinned [+] button to the tab bar to make it easier to re-open closed tabs
https://bugs.webkit.org/show_bug.cgi?id=230600
Summary Web Inspector: add a pinned [+] button to the tab bar to make it easier to re...
Devin Rousso
Reported 2021-09-22 00:51:54 PDT
.
Attachments
Patch (15.43 KB, patch)
2021-09-22 00:52 PDT, Devin Rousso
bburg: review+
Patch (15.42 KB, patch)
2021-09-22 20:38 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2021-09-22 00:52:20 PDT
Patrick Angle
Comment 2 2021-09-22 08:40:01 PDT
Comment on attachment 438930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438930&action=review Nice! Much more discoverable. Provision r+ from me. > Source/WebInspectorUI/UserInterface/Views/TabBar.js:770 > + contextMenu.show(); Aside: It's unfortunate I still haven't let us provide a coordinate at which to show the menu so it can be more neatly aligned below the tab bar item.
Blaze Burg
Comment 3 2021-09-22 08:52:57 PDT
Comment on attachment 438930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438930&action=review r=me > Source/WebInspectorUI/ChangeLog:23 > + Drive-by: Remove `_handleTabContainerClick` as tabs can only be removed from the contextmenu. s/from/by using/ So in other words, this is dead code. Right? I wasn't able to trigger the previous behavior of "option-click to delete" in a build without this change.
Devin Rousso
Comment 4 2021-09-22 20:37:41 PDT
Comment on attachment 438930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438930&action=review >> Source/WebInspectorUI/ChangeLog:23 >> + Drive-by: Remove `_handleTabContainerClick` as tabs can only be removed from the contextmenu. > > s/from/by using/ > > So in other words, this is dead code. Right? I wasn't able to trigger the previous behavior of "option-click to delete" in a build without this change. Correct. I wasn't even able to get this event listener to fire. I think some other things may be `stopPropagation`. >> Source/WebInspectorUI/UserInterface/Views/TabBar.js:770 >> + contextMenu.show(); > > Aside: It's unfortunate I still haven't let us provide a coordinate at which to show the menu so it can be more neatly aligned below the tab bar item. Heh yeah that would be nice to have. I could imagine using that in a bunch of places to simulate the behavior of a `<select>` where the text in the page lines up with the text inside the contextmenu. Would love to see it =D We probably just need another method along the lines of `InspectorFrontendHost::dispatchEventAsContextMenuEvent` that takes an `EventTarget` (or even just `float x, float y`) and does all the logic from there . Frankly the fact that we require a `MouseEvent` is quite arbitrary (other than having a mouse location).
Devin Rousso
Comment 5 2021-09-22 20:38:43 PDT
EWS
Comment 6 2021-09-22 21:08:35 PDT
Committed r282905 (242033@main): <https://commits.webkit.org/242033@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439008 [details].
Radar WebKit Bug Importer
Comment 7 2021-09-22 21:09:19 PDT
Note You need to log in before you can comment on or make changes to this bug.