зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
37d7c73123
Коммит
b421ef7727
|
@ -10,7 +10,6 @@ const {
|
||||||
} = require("devtools/client/shared/vendor/react");
|
} = require("devtools/client/shared/vendor/react");
|
||||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
const { getVisibleColumns } = require("../selectors/index");
|
|
||||||
const {
|
const {
|
||||||
fetchNetworkUpdatePacket,
|
fetchNetworkUpdatePacket,
|
||||||
propertiesEqual,
|
propertiesEqual,
|
||||||
|
@ -280,7 +279,6 @@ class RequestListItem extends Component {
|
||||||
isSelected,
|
isSelected,
|
||||||
firstRequestStartedMs,
|
firstRequestStartedMs,
|
||||||
fromCache,
|
fromCache,
|
||||||
networkDetailsOpen,
|
|
||||||
onDoubleClick,
|
onDoubleClick,
|
||||||
onContextMenu,
|
onContextMenu,
|
||||||
onMouseDown,
|
onMouseDown,
|
||||||
|
@ -327,12 +325,8 @@ class RequestListItem extends Component {
|
||||||
header,
|
header,
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
// Display the column if waterfall is enabled and the side panel is closed, or if waterfall is
|
// The last column is Waterfall (aka Timeline)
|
||||||
// enabled, the side panel is opened and only 1 cloumn is displayed.
|
columns.waterfall &&
|
||||||
((columns.waterfall && !networkDetailsOpen) ||
|
|
||||||
(networkDetailsOpen &&
|
|
||||||
columns.waterfall &&
|
|
||||||
getVisibleColumns(columns).length === 1)) &&
|
|
||||||
RequestListColumnWaterfall({
|
RequestListColumnWaterfall({
|
||||||
connector,
|
connector,
|
||||||
firstRequestStartedMs,
|
firstRequestStartedMs,
|
||||||
|
|
|
@ -43,12 +43,13 @@ function getVisibleColumns(columns) {
|
||||||
|
|
||||||
const getColumns = createSelector(
|
const getColumns = createSelector(
|
||||||
state => state.ui,
|
state => state.ui,
|
||||||
ui => {
|
state => state.search,
|
||||||
|
(ui, search) => {
|
||||||
if (
|
if (
|
||||||
(ui.networkDetailsOpen &&
|
((ui.networkDetailsOpen || search.panelOpen) &&
|
||||||
getVisibleColumns(ui.columns).length === 1 &&
|
getVisibleColumns(ui.columns).length === 1 &&
|
||||||
ui.columns.waterfall) ||
|
ui.columns.waterfall) ||
|
||||||
!ui.networkDetailsOpen
|
(!ui.networkDetailsOpen && !search.panelOpen)
|
||||||
) {
|
) {
|
||||||
return ui.columns;
|
return ui.columns;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче