Bug 181145

Summary: Web Inspector: Styles: Toggle selected properties by pressing Space or Command+/
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
bburg: review+
[Animated GIF] With patch applied
none
Patch none

Nikita Vasilyev
Reported 2017-12-23 15:27:22 PST
Cmd+/ should comment out CSS property when focused on a property name or property value. Cmd+/ should uncomment CSS property when it is commented out [1]. Cmd+/ should comment out all CSS properties of the rule when focused on a selector. Cmd+/ should uncomment CSS properties if all of them are commented out. [1]: currently there is no way to focus on the commented out property, i.e. Tab/Shift-Tab skips disabled properties. We probably want to make <div class=property> focusable. I see this as the trickiest part of this task.
Attachments
Patch (12.29 KB, patch)
2018-10-31 23:11 PDT, Nikita Vasilyev
bburg: review+
[Animated GIF] With patch applied (59.01 KB, image/gif)
2018-10-31 23:12 PDT, Nikita Vasilyev
no flags
Patch (12.38 KB, patch)
2018-11-01 11:20 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2017-12-23 15:27:37 PST
Nikita Vasilyev
Comment 2 2018-10-31 20:29:17 PDT
When a property is selected, pressing Space should also toggle it.
Nikita Vasilyev
Comment 3 2018-10-31 23:11:57 PDT
Nikita Vasilyev
Comment 4 2018-10-31 23:12:43 PDT
Created attachment 353583 [details] [Animated GIF] With patch applied
Blaze Burg
Comment 5 2018-11-01 09:26:32 PDT
Comment on attachment 353582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353582&action=review r=me > Source/WebInspectorUI/ChangeLog:25 > + Make `update` method public. No other chanches were made. Nit: changes
Devin Rousso
Comment 6 2018-11-01 09:31:58 PDT
Comment on attachment 353582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353582&action=review > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:240 > + get selectionRange() Nice! > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:535 > + } else if (event.code === "Space" || (event.key === "/" && event.metaKey)) { Do we wan't to prevent other "special" keys as well (e.g. not while holding shift).
Nikita Vasilyev
Comment 7 2018-11-01 11:20:46 PDT
WebKit Commit Bot
Comment 8 2018-11-01 11:57:35 PDT
Comment on attachment 353622 [details] Patch Clearing flags on attachment: 353622 Committed r237692: <https://trac.webkit.org/changeset/237692>
WebKit Commit Bot
Comment 9 2018-11-01 11:57:36 PDT
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.