зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1531845 - Silence various React warnings to help clear up debug mode test logs r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D23115 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
eecca073ec
Коммит
e9a5487529
|
@ -17,5 +17,6 @@
|
|||
<script type="application/javascript" src="resource://devtools/client/aboutdebugging/initializer.js"></script>
|
||||
</head>
|
||||
<body id="body" dir="&locale.dir;">
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -28,6 +28,7 @@ class PanelMenu extends Component {
|
|||
const panelLinks = panels.map(({ id, name, icon }) => {
|
||||
const selected = id == selectedPanelId;
|
||||
return PanelMenuEntry({
|
||||
key: id,
|
||||
id,
|
||||
name,
|
||||
icon,
|
||||
|
|
|
@ -48,8 +48,14 @@ class TargetList extends Component {
|
|||
if (sort) {
|
||||
targets = targets.sort(LocaleCompare);
|
||||
}
|
||||
targets = targets.map(target => {
|
||||
return targetClass({ client, connect, target, debugDisabled });
|
||||
targets = targets.map((target, index) => {
|
||||
return targetClass({
|
||||
key: target.addonID || target.url || index,
|
||||
client,
|
||||
connect,
|
||||
target,
|
||||
debugDisabled,
|
||||
});
|
||||
});
|
||||
|
||||
let content = "";
|
||||
|
|
|
@ -42,11 +42,11 @@ var AboutDebugging = {
|
|||
const telemetry = new Telemetry();
|
||||
|
||||
render(AboutDebuggingApp({ client, connect, telemetry }),
|
||||
document.querySelector("#body"));
|
||||
document.querySelector("#root"));
|
||||
},
|
||||
|
||||
destroy() {
|
||||
unmountComponentAtNode(document.querySelector("#body"));
|
||||
unmountComponentAtNode(document.querySelector("#root"));
|
||||
|
||||
if (this.client) {
|
||||
this.client.close();
|
||||
|
|
|
@ -283,7 +283,7 @@ class Accessible extends Component {
|
|||
className: classList.join(" "),
|
||||
style: {
|
||||
paddingInlineStart: depthPadding,
|
||||
"inline-size":
|
||||
inlineSize:
|
||||
`calc(var(--accessibility-properties-item-width) - ${depthPadding}px)`,
|
||||
},
|
||||
onClick: e => {
|
||||
|
|
|
@ -44,7 +44,8 @@ class Button extends Component {
|
|||
].join(" ");
|
||||
const props = Object.assign({}, this.props, {
|
||||
className,
|
||||
"aria-busy": this.props.busy,
|
||||
"aria-busy": this.props.busy.toString(),
|
||||
busy: this.props.busy.toString(),
|
||||
});
|
||||
|
||||
const classList = ["btn-content"];
|
||||
|
|
|
@ -22,7 +22,7 @@ class App extends Component {
|
|||
static get propTypes() {
|
||||
return {
|
||||
client: PropTypes.object.isRequired,
|
||||
workers: PropTypes.object.isRequired,
|
||||
workers: PropTypes.array.isRequired,
|
||||
serviceContainer: PropTypes.object.isRequired,
|
||||
domain: PropTypes.string.isRequired,
|
||||
fluentBundles: PropTypes.array.isRequired,
|
||||
|
|
|
@ -30,10 +30,10 @@ const flexItemProperties = exports.flexItemProperties = {
|
|||
"max-width": PropTypes.string,
|
||||
|
||||
// The computed height of the flex item element.
|
||||
"height": PropTypes.number,
|
||||
"height": PropTypes.string,
|
||||
|
||||
// The computed width of the flex item element.
|
||||
"width": PropTypes.number,
|
||||
"width": PropTypes.string,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -59,15 +59,15 @@ class MemoryApp extends Component {
|
|||
allocations: appModel.allocations,
|
||||
censusDisplay: appModel.censusDisplay,
|
||||
diffing: appModel.diffing,
|
||||
dispatch: appModel.dispatch,
|
||||
dispatch: PropTypes.func,
|
||||
filter: appModel.filter,
|
||||
front: appModel.front,
|
||||
heapWorker: appModel.heapWorker,
|
||||
individuals: appModel.individuals,
|
||||
labelDisplay: appModel.labelDisplay,
|
||||
sizes: appModel.sizes,
|
||||
sizes: PropTypes.object,
|
||||
snapshots: appModel.snapshots,
|
||||
toolbox: appModel.toolbox,
|
||||
toolbox: PropTypes.object,
|
||||
view: appModel.view,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ class DirectoryPicker extends PureComponent {
|
|||
},
|
||||
dirs.map((fullPath, i) => option(
|
||||
{
|
||||
key: fullPath,
|
||||
className: "pref-settings-dir-list-item",
|
||||
title: fullPath,
|
||||
},
|
||||
|
|
|
@ -76,6 +76,7 @@ class Accordion extends Component {
|
|||
className,
|
||||
"aria-expanded": opened,
|
||||
"aria-labelledby": labelledby,
|
||||
key: labelledby,
|
||||
},
|
||||
h2(
|
||||
{
|
||||
|
|
|
@ -1016,7 +1016,7 @@ class TreeNodeClass extends Component {
|
|||
ref: "treenode",
|
||||
"aria-level": this.props.depth + 1,
|
||||
onClick: this.props.onClick,
|
||||
onKeyDownCapture: this.props.active && this._onKeyDown,
|
||||
onKeyDownCapture: this.props.active ? this._onKeyDown : undefined,
|
||||
"aria-expanded": ariaExpanded,
|
||||
"data-expanded": this.props.expanded ? "" : undefined,
|
||||
"data-depth": this.props.depth,
|
||||
|
|
Загрузка…
Ссылка в новой задаче