Bug 191575 - Web Inspector: Styles: shift-clicking on a property should extend selection
Summary: Web Inspector: Styles: shift-clicking on a property should extend selection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
: 191125 (view as bug list)
Depends on: 191435
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-12 18:22 PST by Nikita Vasilyev
Modified: 2018-11-14 14:29 PST (History)
4 users (show)

See Also:


Attachments
Patch (11.13 KB, patch)
2018-11-12 18:36 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Animated GIF] With patch applied (72.44 KB, image/gif)
2018-11-12 18:38 PST, Nikita Vasilyev
no flags Details
Patch (11.29 KB, patch)
2018-11-13 13:59 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (11.77 KB, patch)
2018-11-13 16:27 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (11.70 KB, patch)
2018-11-13 17:17 PST, Nikita Vasilyev
hi: review+
Details | Formatted Diff | Diff
Patch (11.79 KB, patch)
2018-11-14 14:12 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2018-11-12 18:22:59 PST
When there's at least one property is selected, shift-clicking another property of the same rule should extend the selection.

This behavior should be similar to the one in macOS Finder.
Comment 1 Radar WebKit Bug Importer 2018-11-12 18:23:20 PST
<rdar://problem/46012855>
Comment 2 Nikita Vasilyev 2018-11-12 18:36:52 PST
Created attachment 354619 [details]
Patch
Comment 3 Nikita Vasilyev 2018-11-12 18:38:11 PST
Created attachment 354620 [details]
[Animated GIF] With patch applied
Comment 4 Nikita Vasilyev 2018-11-12 18:41:21 PST
This doesn't patch depends on Bug 191435 - Web Inspector: Styles: Command-A should select all properties.
It doesn't apply to master.
Comment 5 Nikita Vasilyev 2018-11-13 13:59:09 PST
Created attachment 354700 [details]
Patch
Comment 6 Nikita Vasilyev 2018-11-13 16:27:37 PST
Created attachment 354725 [details]
Patch

I implemented Shift-ArrowUp/ArrowDown keys, too. It was only two lines of code :)
Comment 7 Nikita Vasilyev 2018-11-13 17:17:56 PST
Created attachment 354732 [details]
Patch

Fix assertions.
Comment 8 Nikita Vasilyev 2018-11-13 17:22:49 PST
*** Bug 191125 has been marked as a duplicate of this bug. ***
Comment 9 Devin Rousso 2018-11-14 13:42:05 PST
Comment on attachment 354732 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354732&action=review

r=me, with some design feedback/changes

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:57
> +    set focusIndex(value)

It seems odd that setting the `focusIndex` would automatically select something.  I'd rather you extend/rework `selectProperties` to assume `_anchorIndex` when not supplied, or just provide a way for callers to access `_anchorIndex`.

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:476
> +        window.addEventListener("click", this._handleWindowMouseUp.bind(this), {capture: true, once: true});

Please rename this to `_handleWindowClick`
Comment 10 Nikita Vasilyev 2018-11-14 14:12:01 PST
Created attachment 354851 [details]
Patch
Comment 11 WebKit Commit Bot 2018-11-14 14:28:59 PST
Comment on attachment 354851 [details]
Patch

Clearing flags on attachment: 354851

Committed r238201: <https://trac.webkit.org/changeset/238201>
Comment 12 WebKit Commit Bot 2018-11-14 14:29:00 PST
All reviewed patches have been landed.  Closing bug.