Remove 'explorer' from a few Panes (#650)

While working on #549 I realized there were a few places where 'explorer' was only needed to expand the notifications console, so I stripped those out where it was easy.
This commit is contained in:
Jordi Bunster
2021-04-29 10:20:57 -07:00
committed by GitHub
parent 531df811da
commit 9d0bc86197
23 changed files with 79 additions and 2049 deletions

View File

@@ -1,15 +1,13 @@
import { mount } from "enzyme";
import React from "react";
import Explorer from "../../Explorer";
import StoredProcedure from "../../Tree/StoredProcedure";
import { ExecuteSprocParamsPane } from "./ExecuteSprocParamsPane";
describe("Excute Sproc Param Pane", () => {
const fakeExplorer = {} as Explorer;
const fakeSproc = {} as StoredProcedure;
const props = {
explorer: fakeExplorer,
storedProcedure: fakeSproc,
expandConsole: (): void => undefined,
closePanel: (): void => undefined,
};

View File

@@ -2,7 +2,6 @@ import { useBoolean } from "@uifabric/react-hooks";
import { IDropdownOption, IImageProps, Image, Stack, Text } from "office-ui-fabric-react";
import React, { FunctionComponent, useState } from "react";
import AddPropertyIcon from "../../../../images/Add-property.svg";
import Explorer from "../../Explorer";
import StoredProcedure from "../../Tree/StoredProcedure";
import {
GenericRightPaneComponent,
@@ -11,7 +10,7 @@ import {
import { InputParameter } from "./InputParameter";
interface ExecuteSprocParamsPaneProps {
explorer: Explorer;
expandConsole: () => void;
storedProcedure: StoredProcedure;
closePanel: () => void;
}
@@ -27,7 +26,7 @@ interface UnwrappedExecuteSprocParam {
}
export const ExecuteSprocParamsPane: FunctionComponent<ExecuteSprocParamsPaneProps> = ({
explorer,
expandConsole,
storedProcedure,
closePanel,
}: ExecuteSprocParamsPaneProps): JSX.Element => {
@@ -43,7 +42,7 @@ export const ExecuteSprocParamsPane: FunctionComponent<ExecuteSprocParamsPanePro
};
const genericPaneProps: GenericRightPaneProps = {
container: explorer,
expandConsole,
formError: formError,
formErrorDetail: formErrorsDetails,
id: "executesprocparamspane",

View File

@@ -3,11 +3,11 @@
exports[`Excute Sproc Param Pane should render Default properly 1`] = `
<ExecuteSprocParamsPane
closePanel={[Function]}
explorer={Object {}}
expandConsole={[Function]}
storedProcedure={Object {}}
>
<GenericRightPaneComponent
container={Object {}}
expandConsole={[Function]}
formError=""
formErrorDetail=""
id="executesprocparamspane"