RESOLVED FIXED 201470
Web Inspector: unify the interaction of show/hide status icons in Sources and Canvas
https://bugs.webkit.org/show_bug.cgi?id=201470
Summary Web Inspector: unify the interaction of show/hide status icons in Sources and...
Devin Rousso
Reported 2019-09-04 13:17:06 PDT
Rather than "fading" the tree element's text when the underlying represented object is disabled/blackboxed, we should just "fade" the icon. The "fade" shouldn't change when the tree element is selected, unless the user is hovering directly over the status eye (this helps convey the idea that clicking the status eye is like a checkbox). The image of the status eye also shouldn't change depending on whether the underlying represented object is disabled/blackboxed, as it being visible/"faded" is already enough of an indicator. It should also be possible to toggle the disabled/blackboxed state via the context menu.
Attachments
Patch (11.47 KB, patch)
2019-09-04 13:17 PDT, Devin Rousso
no flags
Patch (11.16 KB, patch)
2019-09-04 18:30 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-09-04 13:17:59 PDT
Joseph Pecoraro
Comment 2 2019-09-04 17:16:05 PDT
Comment on attachment 378006 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378006&action=review > Source/WebInspectorUI/UserInterface/Models/ShaderProgram.js:61 > + CanvasAgent.setShaderProgramDisabled(this._identifier, disabled, (error) => { We should set `this._disabled` immediately. Currently if someone set the state rapidly before a response was received: shaderProgram.disabled = true; shaderProgram.disabled = false; // Wouldn't do anything. Then the 2nd setting would potentially be missed and the frontend would leave the program in a disabled state, which would not be what we actually want. > Source/WebInspectorUI/UserInterface/Views/ShaderProgramTreeElement.js:57 > + super.detach(); This should be `super.ondetach()` > Source/WebInspectorUI/UserInterface/Views/ShaderProgramTreeElement.js:63 > canSelectOnMouseDown(event) > { > - return !this._statusElement.contains(event.target); > + return !this._disabledImageElement.contains(event.target); > + } Given the superclass implementation is TreeElement, maybe this should call the super class if the specific case here is not true. > Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js:141 > + populateContextMenu(contextMenu, event) > + { > + if (this._sourceCode.supportsScriptBlackboxing) { > + let isBlackboxed = WI.debuggerManager.isScriptBlackboxed(this._sourceCode); Does this show up very high in the context menu or rather low?
Devin Rousso
Comment 3 2019-09-04 18:26:04 PDT
Comment on attachment 378006 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378006&action=review >> Source/WebInspectorUI/UserInterface/Models/ShaderProgram.js:61 >> + CanvasAgent.setShaderProgramDisabled(this._identifier, disabled, (error) => { > > We should set `this._disabled` immediately. > > Currently if someone set the state rapidly before a response was received: > > shaderProgram.disabled = true; > shaderProgram.disabled = false; // Wouldn't do anything. > > Then the 2nd setting would potentially be missed and the frontend would leave the program in a disabled state, which would not be what we actually want. That's true. I really wish we had a more "concrete" way of ensuring that frontend state is in sync with backend state, and only updating the frontend in response to changes from the backend (like how Timelines/Audit/Canvas all have this idea of "starting"/"stopping" when the UI has requested something and hasn't yet received confirmation from the backend). >> Source/WebInspectorUI/UserInterface/Views/ShaderProgramTreeElement.js:57 >> + super.detach(); > > This should be `super.ondetach()` Oops. >> Source/WebInspectorUI/UserInterface/Views/ShaderProgramTreeElement.js:63 >> + } > > Given the superclass implementation is TreeElement, maybe this should call the super class if the specific case here is not true. Good call! >> Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js:141 >> + let isBlackboxed = WI.debuggerManager.isScriptBlackboxed(this._sourceCode); > > Does this show up very high in the context menu or rather low? It's basically at the very bottom, right above where the "Expand All"/"Collapse All" would be. I'll move this to `WI.appendContextMenuItemsForSourceCode` instead, right under "Create Local Override:.
Devin Rousso
Comment 4 2019-09-04 18:30:35 PDT
WebKit Commit Bot
Comment 5 2019-09-04 19:15:55 PDT
Comment on attachment 378033 [details] Patch Clearing flags on attachment: 378033 Committed r249513: <https://trac.webkit.org/changeset/249513>
WebKit Commit Bot
Comment 6 2019-09-04 19:15:56 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-09-04 19:16:18 PDT
Note You need to log in before you can comment on or make changes to this bug.