Backed out changeset e2af0f70828c (bug 1551612) for causing bc failures in webconsole.properties CLOSED TREE

This commit is contained in:
Mihai Alexandru Michis 2019-06-07 19:03:05 +03:00
Родитель 6f92f3a856
Коммит ea44e068e2
8 изменённых файлов: 9 добавлений и 66 удалений

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

@ -381,13 +381,3 @@ webconsole.group.contentBlocked=Content blocked messages
# Label for the list of HTML elements matching the selector associated
# with the CSS warning. Parameters: %S is the CSS selector.
webconsole.cssWarningElements.label=Elements matching selector: %S
# LOCALIZATION NOTE (webconsole.message.componentDidCatch.label)
# Label displayed when the webconsole couldn't handle a given packet.
# Parameters: %S is the URL to file a bug about the error.
webconsole.message.componentDidCatch.label=[DEVTOOLS ERROR] We're sorry, we couldn't render the message. This shouldn't have happened - please file a bug at %S with the message metadata in the description.
# LOCALIZATION NOTE (webconsole.message.componentDidCatch.copyButton.label)
# Label displayed on the button next to the message we display when the webconsole
# couldn't handle a given packet (See webconsole.message.componentDidCatch.label).
webconsole.message.componentDidCatch.copyButton.label=Copy message metadata to clipboard

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

@ -64,7 +64,6 @@ class Message extends Component {
})),
isPaused: PropTypes.bool,
maybeScrollToBottom: PropTypes.func,
message: PropTypes.object.isRequired,
};
}
@ -97,10 +96,6 @@ class Message extends Component {
}
}
componentDidCatch(e) {
this.setState({error: e});
}
onLearnMoreClick(e) {
const {exceptionDocURL} = this.props;
this.props.serviceContainer.openLink(exceptionDocURL, e);
@ -162,52 +157,8 @@ class Message extends Component {
});
}
renderTimestamp() {
if (!this.props.timestampsVisible) {
return null;
}
return dom.span({
className: "timestamp devtools-monospace",
}, l10n.timestampString(this.props.timeStamp || Date.now()));
}
renderErrorState() {
const newBugUrl =
"https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Console";
const timestampEl = this.renderTimestamp();
return dom.div({
className: "message error message-did-catch",
},
timestampEl,
MessageIcon({level: "error"}),
dom.span({ className: "message-body-wrapper" },
dom.span({
className: "message-flex-body",
},
// Add whitespaces for formatting when copying to the clipboard.
timestampEl ? " " : null,
dom.span({ className: "message-body devtools-monospace" },
l10n.getFormatStr("webconsole.message.componentDidCatch.label", [newBugUrl]),
dom.button({
className: "devtools-button",
onClick: () => navigator.clipboard.writeText(
JSON.stringify(this.props.message, null, 2)),
}, l10n.getStr("webconsole.message.componentDidCatch.copyButton.label")),
),
),
),
dom.br(),
);
}
/* eslint-disable complexity */
render() {
if (this.state && this.state.error) {
return this.renderErrorState();
}
const {
open,
collapsible,
@ -224,6 +175,8 @@ class Message extends Component {
stacktrace,
serviceContainer,
exceptionDocURL,
timeStamp = Date.now(),
timestampsVisible,
executionPoint,
pausedExecutionPoint,
messageId,
@ -245,7 +198,13 @@ class Message extends Component {
}
}
const timestampEl = this.renderTimestamp();
let timestampEl;
if (timestampsVisible === true) {
timestampEl = dom.span({
className: "timestamp devtools-monospace",
}, l10n.timestampString(timeStamp));
}
const icon = this.renderIcon();
// Figure out if there is an expandable part to the message.

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

@ -156,7 +156,6 @@ class CSSWarning extends Component {
timestampsVisible,
topLevelClasses: [],
type,
message,
});
}
}

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

@ -54,7 +54,6 @@ function ConsoleCommand(props) {
timeStamp,
timestampsVisible,
maybeScrollToBottom,
message,
});
}

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

@ -98,7 +98,6 @@ function EvaluationResult(props) {
notes,
timestampsVisible,
maybeScrollToBottom,
message,
});
}

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

@ -178,7 +178,6 @@ function NetworkEventMessage({
serviceContainer,
request,
timestampsVisible,
message,
});
}

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

@ -85,7 +85,6 @@ function PageError(props) {
notes,
timestampsVisible,
maybeScrollToBottom,
message,
});
}

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

@ -67,7 +67,6 @@ function WarningGroup(props) {
timestampsVisible,
topLevelClasses,
type,
message,
});
}