Bug 210837 - Web Inspector: Storage: unable to filter cookies
Summary: Web Inspector: Storage: unable to filter cookies
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-21 18:27 PDT by Devin Rousso
Modified: 2020-04-22 11:34 PDT (History)
5 users (show)

See Also:


Attachments
Patch (16.39 KB, patch)
2020-04-21 18:37 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] After Patch is applied (Storage Tab) (516.51 KB, image/png)
2020-04-22 09:15 PDT, Devin Rousso
no flags Details
[Image] After Patch is applied (Network Tab) (494.46 KB, image/png)
2020-04-22 09:15 PDT, Devin Rousso
no flags Details
Patch (16.61 KB, patch)
2020-04-22 09:22 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (16.95 KB, patch)
2020-04-22 09:53 PDT, 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 2020-04-21 18:27:09 PDT
# STEPS TO REPRODUCE:
1. inspect any page with cookies
2. press ⌘F to show a filter bar
 => nothing happens :(
Comment 1 Devin Rousso 2020-04-21 18:37:48 PDT
Created attachment 397156 [details]
Patch
Comment 2 Joseph Pecoraro 2020-04-21 20:33:59 PDT
Comment on attachment 397156 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:44
> +        Drive-by: instead of having the "No Filter Results" view only cover the "Name" column, it
> +                  should cover the entire table so as to be as noticable as possible (not to mention
> +                  the table will be empty anyways, so it's not like anything is being hidden).
> +        Drive-by: ensure that the "No Filter Results" view doesn't cover the statistics.

Could you include screenshots?
Comment 3 Devin Rousso 2020-04-22 09:15:31 PDT
Created attachment 397200 [details]
[Image] After Patch is applied (Storage Tab)
Comment 4 Devin Rousso 2020-04-22 09:15:55 PDT
Created attachment 397201 [details]
[Image] After Patch is applied (Network Tab)
Comment 5 Devin Rousso 2020-04-22 09:22:59 PDT
Created attachment 397203 [details]
Patch

make the text size of the "No Filter Results" match that of other tabs
Comment 6 BJ Burg 2020-04-22 09:37:10 PDT
Comment on attachment 397203 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:-2
> - * Copyright (C) 2013 Apple Inc. All rights reserved.

Nit: 2013-2020 ?

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:26
> +.content-view.cookie-storage > .message-text-view {

Nice. I love how all these variables already exist!

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:439
> +            this._cookies = this._getCookiesForHost(payload.cookies.map(WI.Cookie.fromPayload), this.representedObject.host);

v nice

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:472
> +        if (this._filteredCookies.length || !filterText) {

Nit: I'd put this DOM manipulation into a separate function since everything up until now is maintaining this._filteredCookies. this._updatePlaceholderForSearchResults or something?

> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:-1623
> -        this._emptyFilterResultsMessageElement.style.width = width + "px";

Weird.
Comment 7 Devin Rousso 2020-04-22 09:52:46 PDT
Comment on attachment 397203 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:-2
>> - * Copyright (C) 2013 Apple Inc. All rights reserved.
> 
> Nit: 2013-2020 ?

Heh, sure :)  Still not 100% sure of all the "rules" for updating copyrights :P

>> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:472
>> +        if (this._filteredCookies.length || !filterText) {
> 
> Nit: I'd put this DOM manipulation into a separate function since everything up until now is maintaining this._filteredCookies. this._updatePlaceholderForSearchResults or something?

good idea
Comment 8 Devin Rousso 2020-04-22 09:53:59 PDT
Created attachment 397212 [details]
Patch
Comment 9 EWS 2020-04-22 11:33:36 PDT
Committed r260523: <https://trac.webkit.org/changeset/260523>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397212 [details].
Comment 10 Radar WebKit Bug Importer 2020-04-22 11:34:17 PDT
<rdar://problem/62199258>