RESOLVED DUPLICATE of bug 242704 233572
Web Inspector: Computed Panel: Properties section should be hidden when the filter doesn't match
https://bugs.webkit.org/show_bug.cgi?id=233572
Summary Web Inspector: Computed Panel: Properties section should be hidden when the f...
Razvan Caliman
Reported 2021-11-29 10:14:45 PST
Created attachment 445292 [details] Properties section header should be hidden When using the filter input field in the Computed panel, the Properties section header remains visible if there are no matches for the filter query. Variables section header is hidden as expected. See attached screenshot.
Attachments
Properties section header should be hidden (28.54 KB, image/png)
2021-11-29 10:14 PST, Razvan Caliman
no flags
Patch 1.0 (2.34 KB, patch)
2021-11-29 10:25 PST, Razvan Caliman
rcaliman: review?
Computed panel with patch applied (26.63 KB, image/png)
2021-11-29 10:28 PST, Razvan Caliman
no flags
Radar WebKit Bug Importer
Comment 1 2021-11-29 10:15:20 PST
Razvan Caliman
Comment 2 2021-11-29 10:25:09 PST
Created attachment 445295 [details] Patch 1.0 Fix bug by bringing `WI.ComputedStyleSection.applyFilter()` to parity with `WI.SpreadsheetCSSStyleDeclarationEditor.applyFilter()`
Razvan Caliman
Comment 3 2021-11-29 10:28:05 PST
Created attachment 445297 [details] Computed panel with patch applied Properties and Variables section headers are hidden when there are no matches for the given filter input.
Patrick Angle
Comment 4 2021-11-29 11:37:53 PST
Comment on attachment 445295 [details] Patch 1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=445295&action=review > Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js:247 > + if (this._hideFilterNonMatchingProperties) > + this.element.append(propertyView.element); This doesn't seem correct to me... Couldn't this cause property views to be out of order if they were previously filtered out but now aren't? The `this.needsLayout()` will undo this work anyways since `layout()` removes all the elements and re-adds them in the correct order. > Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js:255 > + this.dispatchEventToListeners(WI.ComputedStyleSection.Event.FilterApplied, {matches}); Could we instead just fire this event inside `layout()`with a `matches` determined during `layout()` instead and leave this function as-is?
Razvan Caliman
Comment 5 2022-08-19 08:21:28 PDT
Fixed as part of Bug 242704 *** This bug has been marked as a duplicate of bug 242704 ***
Note You need to log in before you can comment on or make changes to this bug.