Remove temporary NewPanelEditorContext (#23652)

This commit is contained in:
Dominik Prokop 2020-04-17 18:04:57 +02:00 committed by GitHub
parent 43fc6c3a17
commit a7904f13cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,9 +56,6 @@ interface DispatchProps {
type Props = OwnProps & ConnectedProps & DispatchProps;
// TODO[NewPanelEdit]: Remove when we switch to new panel editor
export const NewPanelEditorContext = React.createContext(false);
export class PanelEditorUnconnected extends PureComponent<Props> {
querySubscription: Unsubscribable;
@ -123,11 +120,6 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
document.body.style.cursor = 'row-resize';
};
onPanelTitleChange = (title: string) => {
this.props.panel.title = title;
this.forceUpdate();
};
onDiplayModeChange = (mode: DisplayMode) => {
const { updatePanelEditorUIState } = this.props;
updatePanelEditorUIState({
@ -299,14 +291,12 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
}
return (
<NewPanelEditorContext.Provider value={true}>
<div className={styles.wrapper}>
{this.editorToolbar(styles)}
<div className={styles.verticalSplitPanesWrapper}>
{uiState.isPanelOptionsVisible ? this.renderWithOptionsPane(styles) : this.renderHorizontalSplit(styles)}
</div>
<div className={styles.wrapper}>
{this.editorToolbar(styles)}
<div className={styles.verticalSplitPanesWrapper}>
{uiState.isPanelOptionsVisible ? this.renderWithOptionsPane(styles) : this.renderHorizontalSplit(styles)}
</div>
</NewPanelEditorContext.Provider>
</div>
);
}
}