From 4dce10b5db86515e244b27b2c24a45aa5e18870d Mon Sep 17 00:00:00 2001 From: Anton Kulyk <kuliks.anton@gmail.com> Date: Thu, 29 Jun 2023 16:59:36 +0100 Subject: [PATCH] Move `JoinStep` into its own directory (#31991) --- .../components/notebook/NotebookStep/steps.ts | 2 +- .../components/notebook/steps/{ => JoinStep}/JoinStep.jsx | 8 ++++---- .../notebook/steps/{ => JoinStep}/JoinStep.styled.tsx | 2 +- .../components/notebook/steps/JoinStep/index.ts | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) rename frontend/src/metabase/query_builder/components/notebook/steps/{ => JoinStep}/JoinStep.jsx (99%) rename frontend/src/metabase/query_builder/components/notebook/steps/{ => JoinStep}/JoinStep.styled.tsx (98%) create mode 100644 frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/index.ts diff --git a/frontend/src/metabase/query_builder/components/notebook/NotebookStep/steps.ts b/frontend/src/metabase/query_builder/components/notebook/NotebookStep/steps.ts index 97038aeef65..0ba86488051 100644 --- a/frontend/src/metabase/query_builder/components/notebook/NotebookStep/steps.ts +++ b/frontend/src/metabase/query_builder/components/notebook/NotebookStep/steps.ts @@ -5,7 +5,7 @@ import { color } from "metabase/lib/colors"; import { IconName } from "metabase/core/components/Icon"; import { DataStep } from "../steps/DataStep"; -import JoinStep from "../steps/JoinStep"; +import { JoinStep } from "../steps/JoinStep"; import ExpressionStep from "../steps/ExpressionStep"; import FilterStep from "../steps/FilterStep"; import { AggregateStep } from "../steps/AggregateStep"; diff --git a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.jsx similarity index 99% rename from frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx rename to frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.jsx index 6343bd4298f..546c1e1a654 100644 --- a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx +++ b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.jsx @@ -14,13 +14,13 @@ import Join from "metabase-lib/queries/structured/Join"; import Question from "metabase-lib/Question"; import StructuredQuery from "metabase-lib/queries/StructuredQuery"; -import { NotebookCellAdd, NotebookCellItem } from "../NotebookCell"; +import { NotebookCellAdd, NotebookCellItem } from "../../NotebookCell"; import { FieldPickerContentContainer, FIELDS_PICKER_STYLES, FieldsPickerIcon, -} from "../FieldsPickerIcon"; -import FieldsPicker from "./FieldsPicker"; +} from "../../FieldsPickerIcon"; +import FieldsPicker from "../FieldsPicker"; import { DimensionContainer, DimensionSourceName, @@ -84,7 +84,7 @@ const JOIN_OPERATOR_OPTIONS = [ { name: "≠", value: "!=" }, ]; -export default function JoinStep({ +export function JoinStep({ color, query, step, diff --git a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.styled.tsx b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.styled.tsx similarity index 98% rename from frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.styled.tsx rename to frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.styled.tsx index 400bf0d1fab..ca3b557edbb 100644 --- a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.styled.tsx +++ b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.styled.tsx @@ -4,7 +4,7 @@ import { color } from "metabase/lib/colors"; import { space, breakpointMaxMedium } from "metabase/styled-components/theme"; import { Icon } from "metabase/core/components/Icon"; import Button from "metabase/core/components/Button"; -import { NotebookCell } from "../NotebookCell"; +import { NotebookCell } from "../../NotebookCell"; export const Row = styled.div` display: flex; diff --git a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/index.ts b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/index.ts new file mode 100644 index 00000000000..966b1c60996 --- /dev/null +++ b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/index.ts @@ -0,0 +1 @@ +export * from "./JoinStep"; -- GitLab