Bug 1440585 - Avoid React warnings; r=nchevobbe
MozReview-Commit-ID: 5B5rPJdNGjD
--- a/devtools/client/framework/components/toolbox-tabs.js
+++ b/devtools/client/framework/components/toolbox-tabs.js
@@ -89,16 +89,17 @@ class ToolboxTabs extends Component {
focusButton,
focusedButton,
highlightedTools,
panelDefinitions,
selectTool,
} = this.props;
let tabs = panelDefinitions.map(panelDefinition => ToolboxTab({
+ key: panelDefinition.id,
currentToolId,
focusButton,
focusedButton,
highlightedTools,
panelDefinition,
selectTool,
}));
--- a/devtools/client/netmonitor/src/components/MonitorPanel.js
+++ b/devtools/client/netmonitor/src/components/MonitorPanel.js
@@ -36,17 +36,17 @@ const MediaQueryList = window.matchMedia
class MonitorPanel extends Component {
static get propTypes() {
return {
connector: PropTypes.object.isRequired,
isEmpty: PropTypes.bool.isRequired,
networkDetailsOpen: PropTypes.bool.isRequired,
openNetworkDetails: PropTypes.func.isRequired,
request: PropTypes.object,
- selectedRequestVisible: PropTypes.func.isRequired,
+ selectedRequestVisible: PropTypes.bool.isRequired,
sourceMapService: PropTypes.object,
openLink: PropTypes.func,
updateRequest: PropTypes.func.isRequired,
};
}
constructor(props) {
super(props);
--- a/devtools/client/netmonitor/src/components/RequestListContent.js
+++ b/devtools/client/netmonitor/src/components/RequestListContent.js
@@ -58,17 +58,17 @@ class RequestListContent extends Compone
onItemMouseDown: PropTypes.func.isRequired,
onSecurityIconMouseDown: PropTypes.func.isRequired,
onSelectDelta: PropTypes.func.isRequired,
onWaterfallMouseDown: PropTypes.func.isRequired,
openStatistics: PropTypes.func.isRequired,
scale: PropTypes.number,
selectedRequest: PropTypes.object,
sortedRequests: PropTypes.array.isRequired,
- requestFilterTypes: PropTypes.string.isRequired,
+ requestFilterTypes: PropTypes.object.isRequired,
};
}
constructor(props) {
super(props);
this.isScrolledToBottom = this.isScrolledToBottom.bind(this);
this.onHover = this.onHover.bind(this);
this.onScroll = this.onScroll.bind(this);
--- a/devtools/client/netmonitor/src/components/RequestListItem.js
+++ b/devtools/client/netmonitor/src/components/RequestListItem.js
@@ -133,17 +133,17 @@ class RequestListItem extends Component
firstRequestStartedMillis: PropTypes.number.isRequired,
fromCache: PropTypes.bool,
onCauseBadgeMouseDown: PropTypes.func.isRequired,
onContextMenu: PropTypes.func.isRequired,
onFocusedNodeChange: PropTypes.func,
onMouseDown: PropTypes.func.isRequired,
onSecurityIconMouseDown: PropTypes.func.isRequired,
onWaterfallMouseDown: PropTypes.func.isRequired,
- requestFilterTypes: PropTypes.string.isRequired,
+ requestFilterTypes: PropTypes.object.isRequired,
waterfallWidth: PropTypes.number,
};
}
componentDidMount() {
if (this.props.isSelected) {
this.refs.listItem.focus();
}
--- a/devtools/client/webconsole/new-console-output/components/ConsoleOutput.js
+++ b/devtools/client/webconsole/new-console-output/components/ConsoleOutput.js
@@ -26,17 +26,17 @@ const {
getInitialMessageCountForViewport
} = require("devtools/client/webconsole/new-console-output/utils/messages.js");
class ConsoleOutput extends Component {
static get propTypes() {
return {
initialized: PropTypes.bool.isRequired,
messages: PropTypes.object.isRequired,
- messagesUi: PropTypes.object.isRequired,
+ messagesUi: PropTypes.array.isRequired,
serviceContainer: PropTypes.shape({
attachRefToHud: PropTypes.func.isRequired,
openContextMenu: PropTypes.func.isRequired,
sourceMapService: PropTypes.object,
}),
dispatch: PropTypes.func.isRequired,
timestampsVisible: PropTypes.bool,
messagesTableData: PropTypes.object.isRequired,
--- a/devtools/client/webconsole/new-console-output/components/Message.js
+++ b/devtools/client/webconsole/new-console-output/components/Message.js
@@ -41,17 +41,17 @@ class Message extends Component {
messageBody: PropTypes.any.isRequired,
repeat: PropTypes.any,
frame: PropTypes.any,
attachment: PropTypes.any,
stacktrace: PropTypes.any,
messageId: PropTypes.string,
scrollToMessage: PropTypes.bool,
exceptionDocURL: PropTypes.string,
- parameters: PropTypes.object,
+ parameters: PropTypes.array,
request: PropTypes.object,
dispatch: PropTypes.func,
timeStamp: PropTypes.number,
timestampsVisible: PropTypes.bool.isRequired,
serviceContainer: PropTypes.shape({
emitNewMessage: PropTypes.func.isRequired,
onViewSourceInDebugger: PropTypes.func,
onViewSourceInScratchpad: PropTypes.func,
@@ -256,17 +256,17 @@ class Message extends Component {
},
timestampEl,
MessageIndent({indent}),
icon,
collapse,
dom.span({ className: "message-body-wrapper" },
dom.span({
className: "message-flex-body",
- onClick: collapsible && this.toggleMessage,
+ onClick: collapsible ? this.toggleMessage : undefined,
},
// Add whitespaces for formatting when copying to the clipboard.
timestampEl ? " " : null,
dom.span({ className: "message-body devtools-monospace" },
...bodyElements,
learnMore
),
repeat ? " " : null,