Closed Bug 1566527 Opened 6 years ago Closed 6 years ago

Waterfall column never hides with sidebar opened

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
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)

Attached image image.png

What were you doing?

  1. Open sidebar on a network resource
  2. 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.

Attached image ESR behavior

We could treat this as regression, as the past non-resizing table just was overlayed by the sidebar which does not cause this issue.

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.

Some instructions for anyone interested:

  1. The waterfall column is rendered here
    https://searchfox.org/mozilla-central/rev/4fbcfe6fecf75d7b828fbebda79a31385f7eab5f/devtools/client/netmonitor/src/components/RequestListItem.js#326

  2. It's rendered only if visible i.e. if columns.waterfall is true

  3. There condition should be extended to also check state of the sidebar

Something like:
columns.waterfall && sideClosed

  1. 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

  2. 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

Mentor: odvarko

Hi Honza,

can I work on this?

Vincent

Flags: needinfo?(odvarko)

Sure, assigned to you.
Honza

Assignee: nobody → vi.le
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)

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

Flags: needinfo?(odvarko)

Thanks for the update!

Can you please attach a patch with your changes, so I can take a look?
Honza

Flags: needinfo?(odvarko) → needinfo?(vi.le)
Attached patch approach1.patch (obsolete) — Splinter Review

Here is the patch for the first approach

Flags: needinfo?(vi.le) → needinfo?(odvarko)
Attached patch approach2.patch (obsolete) — Splinter Review

Here is the patch for the second approach. Thanks for your help!

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:

  1. Let's implement a new selector that will return list of all available columns and excludes the waterfall if 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

  1. 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

Flags: needinfo?(odvarko)

Thanks for the help! Didn't know about the selectors. I have updated the patch and associated tests.

Vincent

Please see my comments in Phabricator
Honza

Flags: needinfo?(vi.le)

Updated the patch :-)

Flags: needinfo?(vi.le)

Comments in Phabricator.
Honza

Flags: needinfo?(vi.le)

@Vincent, this is very close to landing. Let me know if I can help with something...
Honza

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.

Flags: needinfo?(vi.le) → needinfo?(odvarko)

Don't be sorry, I didn't mean to push :-)
Thanks for the help!
Honza

Flags: needinfo?(odvarko)
Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/215d17a0eeb5 Hide the waterfall column when the netmonitor sidebar is opened;r=Honza

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=215d17a0eeb55512dfe99281e3eeb9a5c0c8198b&selectedJob=267987562&searchStr=Linux%2Cx64%2Casan%2CMochitests%2Ctest-linux64-asan%2Fopt-mochitest-devtools-chrome-e10s-5%2CM%28dt5%29

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

Flags: needinfo?(vi.le)

My bad, I have only checked the tests for the netmonitor part, not the whole devtools test suite.

Flags: needinfo?(vi.le)

I have found the issue. I will do a try push to make sure everything is fine this time.

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

Flags: needinfo?(vi.le)

The conflict should be gone, please confirm :-)

Vincent

Flags: needinfo?(vi.le) → needinfo?(odvarko)
Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cae70059c0fa Hide the waterfall column when the netmonitor sidebar is opened;r=Honza

(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

Flags: needinfo?(odvarko)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Regressions: 1617834
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: