Waterfall column never hides with sidebar opened
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox71 fixed)
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: Harald, Assigned: vincent, Mentored)
References
(Regressed 1 open bug)
Details
(Keywords: good-first-bug)
Attachments
(4 files, 2 obsolete files)
What were you doing?
- Open sidebar on a network resource
- Resize sidebar to squish the resource table
What happened?
Waterfall column never hides.
What should have happened?
Waterfall column hides, as it does responsively in the sidebar-less mode.
| Reporter | ||
Comment 1•6 years ago
|
||
We could treat this as regression, as the past non-resizing table just was overlayed by the sidebar which does not cause this issue.
Comment 2•6 years ago
|
||
Agreed. Looks like it does get hidden in dock-to-side mode. We may want to consider responsively hiding a few other columns as well so that the most important columns are usable for as long as possible. E.g. would you say Status/Domain/File the most important? Would love to learn more about this.
Comment 3•6 years ago
•
|
||
Some instructions for anyone interested:
-
The waterfall column is rendered here
https://searchfox.org/mozilla-central/rev/4fbcfe6fecf75d7b828fbebda79a31385f7eab5f/devtools/client/netmonitor/src/components/RequestListItem.js#326 -
It's rendered only if visible i.e. if
columns.waterfallis true -
There condition should be extended to also check state of the sidebar
Something like:
columns.waterfall && sideClosed
-
The state of the sidebar visibility is stored in the UI reducer
https://searchfox.org/mozilla-central/rev/4fbcfe6fecf75d7b828fbebda79a31385f7eab5f/devtools/client/netmonitor/src/reducers/ui.js#75 -
The state is accessed here
https://searchfox.org/mozilla-central/rev/4fbcfe6fecf75d7b828fbebda79a31385f7eab5f/devtools/client/netmonitor/src/components/RequestListContent.js#404
So, we should pass the networkDetailsOpen into the RequestListItem as a prop somewhere here
https://searchfox.org/mozilla-central/rev/4fbcfe6fecf75d7b828fbebda79a31385f7eab5f/devtools/client/netmonitor/src/components/RequestListContent.js#374-392
Honza
Comment 5•6 years ago
|
||
Sure, assigned to you.
Honza
| Assignee | ||
Comment 6•6 years ago
|
||
Hi,
I got started on this. I have done exactly as you suggested in comment 3, but there's an issue with the headers. The header for the waterfall column is not removed (columns.waterfall is still true) so it looks like in the image I posted broken_waterfall_header.png. I tried a couple of approaches to fix this:
1
In RequestListItem, I tried to set columns.waterfall to sideClosed so that it would hide the column and the column header if the sidebar is open. Then, I added sideClosed here so that the component updates whenever the sidebar is opened or closed. But when closing the sidebar the devtools crashes withis this error, and I am not sure how to fix it:
JavaScript error: resource://devtools/client/netmonitor/src/components/RequestListHeader.js, line 441: TypeError: headerRef is undefined
2
I modified getVisibleColumns() so that columns.waterfall is equal to sideClosed. This works, but that doesn't seem like the right fix to me. Also, this breaks the column selection feature (right click on the column headers to select the visible colums).
Now my question is: what is the proper way to deal with the waterfall column header? Would you prefer that I submit a (broken) patch so that you can better understand my question?
Best,
Vincent
| Assignee | ||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Thanks for the update!
Can you please attach a patch with your changes, so I can take a look?
Honza
| Assignee | ||
Comment 9•6 years ago
|
||
Here is the patch for the first approach
| Assignee | ||
Comment 10•6 years ago
|
||
Here is the patch for the second approach. Thanks for your help!
Comment 11•6 years ago
|
||
Thanks for the analysis!
You are right, there are two places where we need to care about visible columns.
I think that #2 is closed to what I have in mind now.
New comments:
- Let's implement a new selector that will return list of all available columns and excludes the
waterfallif the side bar is closed.
Something like as follows:
const getColumns = createSelector(
state => state.ui, (ui) => {
if (!ui.networkDetailsOpen) {
return ui.columns;
}
// Remove the Waterfall/Timeline column from the list of available
// columns if the details side-bar is opened.
let columns = {...ui.columns};
delete columns.waterfall;
return columns;
}
);
It should go to selectors/ui
- Consequently we need to use the selector on both places where we access the list of available columns.
- In RequestListHeader & RequestListContent
This way, we'll pretend that the Waterfall/Timeline column doesn't exist if the side bar is opened. So, the header context menu should also be ok (please test)
Honza
| Assignee | ||
Comment 12•6 years ago
|
||
| Assignee | ||
Comment 13•6 years ago
|
||
Thanks for the help! Didn't know about the selectors. I have updated the patch and associated tests.
Vincent
Updated•6 years ago
|
Updated•6 years ago
|
Comment 17•6 years ago
|
||
@Vincent, this is very close to landing. Let me know if I can help with something...
Honza
| Assignee | ||
Comment 18•6 years ago
|
||
Hi,
Sadly I haven't found the time to tackle the remaining issues yet. I hope to fix them this week-end. As the priority is noted "P3", I haven't realized it was urgent, so I chose this issue because I thought I wasn't slowing things down, sorry.
Comment 19•6 years ago
|
||
Don't be sorry, I didn't mean to push :-)
Thanks for the help!
Honza
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267987562&repo=autoland&lineNumber=66002
Backout link: https://hg.mozilla.org/integration/autoland/rev/21d079adc41d172d4bba1c8f2481345abf2a6a4b
[task 2019-09-23T16:42:11.721Z] 16:42:11 INFO - TEST-PASS | devtools/client/webconsole/test/browser/browser_webconsole_network_messages_openinnet.js | The attached url is correct. -
[task 2019-09-23T16:42:11.722Z] 16:42:11 INFO - Wait for the netmonitor headers panel to appear as it spawn RDP requests
[task 2019-09-23T16:42:11.722Z] 16:42:11 INFO - Wait for the netmonitor headers panel to appear as it spawn RDP requests
[task 2019-09-23T16:42:11.722Z] 16:42:11 INFO - Wait for the event timings request which do not necessarily update the UI as timings may be undefined for cached requests
[task 2019-09-23T16:42:11.722Z] 16:42:11 INFO - Buffered messages finished
[task 2019-09-23T16:42:11.723Z] 16:42:11 INFO - TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser/browser_webconsole_network_messages_openinnet.js | Test timed out -
[task 2019-09-23T16:42:13.281Z] 16:42:13 INFO - Removing tab.
[task 2019-09-23T16:42:13.282Z] 16:42:13 INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2019-09-23T16:42:13.343Z] 16:42:13 INFO - Got event: 'TabClose' on [object XULElement].
[task 2019-09-23T16:42:13.384Z] 16:42:13 INFO - Tab removed and finished closing
[task 2019-09-23T16:42:13.474Z] 16:42:13 INFO - GECKO(2542) | MEMORY STAT | vsize 20977515MB | residentFast 3807MB
[task 2019-09-23T16:42:13.474Z] 16:42:13 INFO - TEST-OK | devtools/client/webconsole/test/browser/browser_webconsole_network_messages_openinnet.js | took 92145ms
| Assignee | ||
Comment 22•6 years ago
|
||
My bad, I have only checked the tests for the netmonitor part, not the whole devtools test suite.
| Assignee | ||
Comment 23•6 years ago
|
||
I have found the issue. I will do a try push to make sure everything is fine this time.
| Assignee | ||
Comment 24•6 years ago
|
||
Comment 25•6 years ago
|
||
This is very close to landing, the patch just needs to be rebased on top of the latest m-c
See my comment in phab:
https://phabricator.services.mozilla.com/D45139#1441883
Honza
| Assignee | ||
Comment 26•6 years ago
|
||
The conflict should be gone, please confirm :-)
Vincent
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
(In reply to Vincent Lequertier from comment #26)
The conflict should be gone, please confirm :-)
Awesome, thanks!
I can cleanly apply it now so, landed.
Honza
Comment 29•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•