Bug 192887 - Web Inspector: Dark Mode: unreadable background color for tables containing object previews
Summary: Web Inspector: Dark Mode: unreadable background color for tables containing o...
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: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-19 16:03 PST by Devin Rousso
Modified: 2018-12-20 09:38 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.53 KB, patch)
2018-12-19 16:55 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] After Patch is applied (778.18 KB, image/png)
2018-12-19 16:56 PST, Devin Rousso
no flags Details
Patch (4.52 KB, patch)
2018-12-19 22:57 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-12-19 16:03:31 PST
# STEPS TO REPRODUCE:
1. open <https://mdn.mozillademos.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB$samples/Full_IndexedDB_example>
2. add a record
3. inspect using the Storage tab
4. click on one of the object stores or indexes from the navigation sidebar
5. select a row
 => Looks bad

NOTE: you need to be in dark mode on macOS
Comment 1 Devin Rousso 2018-12-19 16:03:44 PST
<rdar://problem/46855270>
Comment 2 Devin Rousso 2018-12-19 16:55:48 PST
Created attachment 357757 [details]
Patch
Comment 3 Devin Rousso 2018-12-19 16:56:08 PST
Created attachment 357758 [details]
[Image] After Patch is applied
Comment 4 Nikita Vasilyev 2018-12-19 17:22:34 PST
Comment on attachment 357757 [details]
Patch

This should look like the console. It should use the same color variables.

The console defines colors in LogContentView.css:

    .console-messages {
        --background-color-selected: hsl(233, 30%, 30%);
        --border-color-selected: hsl(224, 30%, 35%);
        --border-color-error: hsla(20, 100%, 50%, 0.12);
        --border-color-warning: hsla(40, 100%, 50%, 0.12);
    }

Perhaps these variables should migrate from LogContentView.css to Variables.css. We'll need to rename them:

    --background-color-selected -> --console-background-color-selected
Comment 5 Devin Rousso 2018-12-19 17:27:33 PST
(In reply to Nikita Vasilyev from comment #4)
> Comment on attachment 357757 [details]
> Patch
> 
> This should look like the console. It should use the same color variables.
These colors are slightly different by design (if I had to guess) because we don't want the selected color of the table to contrast with the selected color of an individual console message.  As far as the `ObjectStore` view, I don't see a huge reason preventing the use of the colors you've linked other than contrast issues, since values inside an `ObjectStore` can be objects, which have icons.
Comment 6 Nikita Vasilyev 2018-12-19 17:48:28 PST
(In reply to Devin Rousso from comment #5)
> (In reply to Nikita Vasilyev from comment #4)
> > Comment on attachment 357757 [details]
> > Patch
> > 
> > This should look like the console. It should use the same color variables.
> These colors are slightly different by design (if I had to guess) because we
> don't want the selected color of the table to contrast with the selected
> color of an individual console message.

I see!

Also, you should mention in the changelog that you're also fixing tables in the console. Now it reads like you're only fixing Storage tab.

> As far as the `ObjectStore` view, I
> don't see a huge reason preventing the use of the colors you've linked other
> than contrast issues, since values inside an `ObjectStore` can be objects,
> which have icons.

Yes, I was suggesting to use console colors for Object Store tables.
Comment 7 Devin Rousso 2018-12-19 22:56:30 PST
(In reply to Nikita Vasilyev from comment #6)
> Also, you should mention in the changelog that you're also fixing tables in the console. Now it reads like you're only fixing Storage tab.
Good call.

> Yes, I was suggesting to use console colors for Object Store tables.
I'd rather keep the two "table"s in sync with each other visually.  We should move all of these off of `WI.DataGrid` anyways and onto `WI.Table`, so this should get "better" resolved then.
Comment 8 Devin Rousso 2018-12-19 22:57:47 PST
Created attachment 357789 [details]
Patch
Comment 9 BJ Burg 2018-12-19 23:58:41 PST
Comment on attachment 357789 [details]
Patch

r=me
Comment 10 WebKit Commit Bot 2018-12-20 09:38:04 PST
Comment on attachment 357789 [details]
Patch

Clearing flags on attachment: 357789

Committed r239443: <https://trac.webkit.org/changeset/239443>
Comment 11 WebKit Commit Bot 2018-12-20 09:38:06 PST
All reviewed patches have been landed.  Closing bug.