Bug 207587 - Web Inspector: Update resource, type, and instrument icons for light, dark, and override colors
Summary: Web Inspector: Update resource, type, and instrument icons for light, dark, a...
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: Jon Davis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-11 14:40 PST by Jon Davis
Modified: 2020-02-17 14:41 PST (History)
5 users (show)

See Also:


Attachments
Patch (219.18 KB, patch)
2020-02-11 14:46 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Sources tab in dark mode (1.67 MB, image/png)
2020-02-11 14:52 PST, Jon Davis
no flags Details
Sources tab light mode (1.67 MB, image/png)
2020-02-11 14:52 PST, Jon Davis
no flags Details
Timeline tab in dark mode (219.15 KB, image/png)
2020-02-11 14:52 PST, Jon Davis
no flags Details
Timeline tab in light mode (215.24 KB, image/png)
2020-02-11 14:52 PST, Jon Davis
no flags Details
Network tab in dark mode (246.87 KB, image/png)
2020-02-11 14:53 PST, Jon Davis
no flags Details
Network tab in light mode (243.17 KB, image/png)
2020-02-11 14:53 PST, Jon Davis
no flags Details
Sources tab in dark mode (452.07 KB, image/png)
2020-02-11 15:17 PST, Jon Davis
no flags Details
Sources tab in light mode (446.60 KB, image/png)
2020-02-11 15:17 PST, Jon Davis
no flags Details
Patch (233.80 KB, patch)
2020-02-14 08:00 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Patch (235.43 KB, patch)
2020-02-17 11:37 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Sources tab in dark mode (513.11 KB, image/png)
2020-02-17 11:43 PST, Jon Davis
no flags Details
Sources tab in light mode (505.52 KB, image/png)
2020-02-17 11:44 PST, Jon Davis
no flags Details
Patch (235.43 KB, patch)
2020-02-17 11:46 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Patch (234.97 KB, patch)
2020-02-17 13:30 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Sources tab in dark mode (1.45 MB, image/png)
2020-02-17 13:47 PST, Jon Davis
no flags Details
Sources tab in light mode (1.47 MB, image/png)
2020-02-17 13:47 PST, Jon Davis
no flags Details
Network tab in dark mode (789.03 KB, image/png)
2020-02-17 13:48 PST, Jon Davis
no flags Details
Network tab in light mode (795.92 KB, image/png)
2020-02-17 13:48 PST, Jon Davis
no flags Details
Timeline tab in dark mode (1.01 MB, image/png)
2020-02-17 13:48 PST, Jon Davis
no flags Details
Timeline tab in light mode (1.00 MB, image/png)
2020-02-17 13:49 PST, Jon Davis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Davis 2020-02-11 14:40:55 PST
Update the remaining icon artwork to support different color schemes particularly for light, dark, and override icons.
Comment 1 Jon Davis 2020-02-11 14:46:11 PST
Created attachment 390430 [details]
Patch
Comment 2 Jon Davis 2020-02-11 14:52:00 PST
Created attachment 390434 [details]
Sources tab in dark mode
Comment 3 Jon Davis 2020-02-11 14:52:15 PST
Created attachment 390435 [details]
Sources tab light mode
Comment 4 Jon Davis 2020-02-11 14:52:37 PST
Created attachment 390436 [details]
Timeline tab in dark mode
Comment 5 Jon Davis 2020-02-11 14:52:52 PST
Created attachment 390437 [details]
Timeline tab in light mode
Comment 6 Jon Davis 2020-02-11 14:53:08 PST
Created attachment 390438 [details]
Network tab in dark mode
Comment 7 Jon Davis 2020-02-11 14:53:25 PST
Created attachment 390439 [details]
Network tab in light mode
Comment 8 Jon Davis 2020-02-11 15:17:39 PST
Created attachment 390442 [details]
Sources tab in dark mode
Comment 9 Jon Davis 2020-02-11 15:17:53 PST
Created attachment 390443 [details]
Sources tab in light mode
Comment 10 BJ Burg 2020-02-11 15:52:51 PST
Comment on attachment 390430 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css:18
> + * CONSEQUENTIAL DAMAGES (INCLUDING, RBUT NOT LIMITED TO, PROCUREMENT OF

Nit: Don't RBUT about it to me!
Comment 11 BJ Burg 2020-02-11 16:17:45 PST
Comment on attachment 390430 [details]
Patch

I only found one little error. This is a neat way to do a sprite sheet!

My only suggestion is that -dark be renamed to -light-theme and -light be renamed to -dark-theme. If I were to inspect the Inspector, it would be confusing to use Dark mode (eg. dark theme) and see icons labelled as -light. I prefer the label to be of the corresponding theme (dark or light) rather than the luma values of the image.

r=me
Comment 12 Timothy Hatcher 2020-02-11 18:25:41 PST
Comment on attachment 390430 [details]
Patch

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

Very cool! I agree with Brian that the dark mode ids should use dark, and light-mode should use light.

> Source/WebInspectorUI/UserInterface/Images/ApplicationCacheManifest.svg:10
> +        <style>
> +          g { visibility: hidden; }
> +          g:target { visibility: visible; }
> +          #dark { color: black; }
> +          #light { color: white; }
> +        </style>

Should be 4 spaces indent on the last level.

Why visibility? I think g:not(:target) { display: none; } will work best, it will not make render objects for the hidden group like visibility: hidden will. (Ditto for this in the other images.)

> Source/WebInspectorUI/UserInterface/Images/Cookie.svg:8
> +    :root {
> +      --caramel: hsl(36, 65%, 40%);
> +      --shading: black;
> +    }

Should indent one more level, and the last level should be 4 spaces.

> Source/WebInspectorUI/UserInterface/Images/TypeIcons.svg:20
> +        .dark {
> +            --outline: hsla(0, 0%, 100%, 0.5);
> +        }
> +        .light {
> +            --outline: hsla(0, 0%, 0%, 0.5);
> +            --shadow: hsla(0, 0%, 0%, 0.5);
> +        }
> +
> +        .dark.grey {

The extra lines between the rules are nice, and I would do them everywhere. But this image has some grouped and not others. Consistency is better.

> Source/WebInspectorUI/UserInterface/Images/TypeIcons.svg:263
> +    <g id="Assertion-dark" class="dark blue"><use href="#box"/><use href="#A"/></g>
> +    <g id="Assertion-light" class="light blue"><use href="#box"/><use href="#A"/></g>
> +    <g id="AuditTestCase-dark" class="dark blue"><use href="#box"/><use href="#t"/></g>

This is hot!

> Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css:110
> +    .resource-icon .icon {
> +        content: url(../Images/DocumentIcons.svg#generic-light);
> +    }
> +    .resource-icon.override .icon {
> +        content: url(../Images/DocumentIcons.svg#generic-light-override);
> +    }

Add the lines between the rules here, and else where in this block.
Comment 13 Timothy Hatcher 2020-02-11 18:27:43 PST
Comment on attachment 390430 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Images/TypeIcons.svg:11
> +        g {
> +            visibility: hidden;
> +        }
> +        g:target {
> +            visibility: visible;
> +        }

Using display: none is critical here, since the groups not targeted are being rendered invisibly and all those paths will have a large impact on WebKit, especially if there are a lot of type icons on screen multiples by all the hidden ones.
Comment 14 Timothy Hatcher 2020-02-11 18:30:38 PST
The close icon in the Network tab content view corner is hard to see in dark mode. That seems to, since it isn't that low contrast on my machine.
Comment 15 Timothy Hatcher 2020-02-11 20:13:00 PST
(In reply to Timothy Hatcher from comment #14)
> The close icon in the Network tab content view corner is hard to see in dark
> mode. That seems to, since it isn't that low contrast on my machine.

Oh, I think your screenshot was a background window so it was dim like the other buttons.
Comment 16 Jon Davis 2020-02-14 08:00:01 PST
Created attachment 390769 [details]
Patch
Comment 17 Timothy Hatcher 2020-02-14 13:35:30 PST
Comment on attachment 390769 [details]
Patch

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

Looking great! Just some minor style issues and one case of visibility.

> Source/WebInspectorUI/UserInterface/Images/Database.svg:7
> +            g { visibility: hidden; }
> +            g:target { visibility: visible; }

Old approach still in this file.

> Source/WebInspectorUI/UserInterface/Images/Database.svg:13
> +            }
> +            #dark {

Also needs line breaks.

> Source/WebInspectorUI/UserInterface/Images/DocumentIcons.svg:6
> +        <style>
> +        g:not(:target) {

Style rules not indented like the rest of the images.

> Source/WebInspectorUI/UserInterface/Images/FolderGeneric.svg:6
> +        <style>
> +          g:not(:target) {

Wrong indentation here.

> Source/WebInspectorUI/UserInterface/Images/InstrumentIcons.svg:4
> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
> +<defs>

Not indented at a second level like the rest.

> Source/WebInspectorUI/UserInterface/Images/InstrumentIcons.svg:9
> +        }
> +        .dark {

Add line break.

> Source/WebInspectorUI/UserInterface/Images/Stopwatch.svg:9
> +            }
> +            #light {

Line break.

> Source/WebInspectorUI/UserInterface/Images/Stopwatch.svg:14
> +            }
> +            #dark {

Ditto.

> Source/WebInspectorUI/UserInterface/Images/TypeIcons.svg:6
> +        <style>
> +        g:not(:target) {

Indentation.
Comment 18 Jon Davis 2020-02-17 11:37:55 PST
Created attachment 390949 [details]
Patch
Comment 19 Jon Davis 2020-02-17 11:43:54 PST
Created attachment 390951 [details]
Sources tab in dark mode
Comment 20 Jon Davis 2020-02-17 11:44:13 PST
Created attachment 390952 [details]
Sources tab in light mode
Comment 21 Jon Davis 2020-02-17 11:46:49 PST
Created attachment 390955 [details]
Patch
Comment 22 Timothy Hatcher 2020-02-17 12:00:02 PST
Comment on attachment 390955 [details]
Patch

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

I like the full color resource icons for overrides! I don’t think the dog ear needs to be orange then. Just match the file color and shade it instead? Or have it be light (dark) as if ony the front of the paper is colored.

> Source/WebInspectorUI/UserInterface/Images/InstrumentIcons.svg:9
> +            }
> +            .dark {

Found one!
Comment 23 Jon Davis 2020-02-17 13:30:12 PST
Created attachment 390965 [details]
Patch
Comment 24 Jon Davis 2020-02-17 13:47:37 PST
Created attachment 390972 [details]
Sources tab in dark mode
Comment 25 Jon Davis 2020-02-17 13:47:55 PST
Created attachment 390973 [details]
Sources tab in light mode
Comment 26 Jon Davis 2020-02-17 13:48:17 PST
Created attachment 390974 [details]
Network tab in dark mode
Comment 27 Jon Davis 2020-02-17 13:48:32 PST
Created attachment 390975 [details]
Network tab in light mode
Comment 28 Jon Davis 2020-02-17 13:48:54 PST
Created attachment 390976 [details]
Timeline tab in dark mode
Comment 29 Jon Davis 2020-02-17 13:49:08 PST
Created attachment 390977 [details]
Timeline tab in light mode
Comment 30 WebKit Commit Bot 2020-02-17 14:40:18 PST
Comment on attachment 390965 [details]
Patch

Clearing flags on attachment: 390965

Committed r256774: <https://trac.webkit.org/changeset/256774>
Comment 31 WebKit Commit Bot 2020-02-17 14:40:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 32 Radar WebKit Bug Importer 2020-02-17 14:41:19 PST
<rdar://problem/59526753>