Bug 1582719 - Hide the Waterfall column when left side bar opens. r=Honza

Differential Revision: https://phabricator.services.mozilla.com/D48529

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mustafa 2019-10-10 10:10:15 +00:00
Родитель 37d7c73123
Коммит b421ef7727
2 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -10,7 +10,6 @@ const {
} = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { getVisibleColumns } = require("../selectors/index");
const {
fetchNetworkUpdatePacket,
propertiesEqual,
@ -280,7 +279,6 @@ class RequestListItem extends Component {
isSelected,
firstRequestStartedMs,
fromCache,
networkDetailsOpen,
onDoubleClick,
onContextMenu,
onMouseDown,
@ -327,12 +325,8 @@ class RequestListItem extends Component {
header,
})
),
// Display the column if waterfall is enabled and the side panel is closed, or if waterfall is
// enabled, the side panel is opened and only 1 cloumn is displayed.
((columns.waterfall && !networkDetailsOpen) ||
(networkDetailsOpen &&
columns.waterfall &&
getVisibleColumns(columns).length === 1)) &&
// The last column is Waterfall (aka Timeline)
columns.waterfall &&
RequestListColumnWaterfall({
connector,
firstRequestStartedMs,

Просмотреть файл

@ -43,12 +43,13 @@ function getVisibleColumns(columns) {
const getColumns = createSelector(
state => state.ui,
ui => {
state => state.search,
(ui, search) => {
if (
(ui.networkDetailsOpen &&
((ui.networkDetailsOpen || search.panelOpen) &&
getVisibleColumns(ui.columns).length === 1 &&
ui.columns.waterfall) ||
!ui.networkDetailsOpen
(!ui.networkDetailsOpen && !search.panelOpen)
) {
return ui.columns;
}