Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Remove `ModalWithTrigger` (#65994)

Fraser04cbeab190b2
diff --git a/docs/developers-guide/frontend.md b/docs/developers-guide/frontend.md
index 87fc676ad44..86ae9dc05c0 100644
--- a/docs/developers-guide/frontend.md
+++ b/docs/developers-guide/frontend.md
@@ -128,7 +128,6 @@ For the most part we follow the [Airbnb React/JSX Style Guide](https://github.co
- Prefer React [function components over class components](https://reactjs.org/docs/components-and-props.html#function-and-class-components)
- Avoid creating new components within the `containers` folder, as this approach has been deprecated. Instead, store both connected and view components in the `components` folder for a more unified and efficient organization. If a connected component grows substantially in size and you need to extract a view component, opt for using the `View` suffix.
- For control components, typically we use `value` and `onChange`. Controls that have options (e.x. `Radio`, `Select`) usually take an `options` array of objects with `name` and `value` properties.
-- Components named like `FooModal` and `FooPopover` typically refer to the modal/popover _content_ which should be used inside a `Modal`/`ModalWithTrigger` or `Popover`/`PopoverWithTrigger`
- Components named like `FooWidget` typically include a `FooPopover` inside a `PopoverWithTrigger` with some sort of trigger element, often `FooName`
- Use arrow function instance properties if you need to bind a method in a class (instead of `this.method = this.method.bind(this);` in the constructor), but only if the function needs to be bound (e.x. if you're passing it as a prop to a React component)
diff --git a/frontend/src/metabase/common/components/ModalWithTrigger/ModalWithTrigger.jsx b/frontend/src/metabase/common/components/ModalWithTrigger/ModalWithTrigger.jsx
deleted file mode 100644
index efadc681347..00000000000
--- a/frontend/src/metabase/common/components/ModalWithTrigger/ModalWithTrigger.jsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import Modal from "metabase/common/components/Modal";
-import Triggerable from "metabase/common/components/Triggerable";
-
-/**
- * @deprecated use Modal + useState
- */
-export default Triggerable(Modal);
diff --git a/frontend/src/metabase/common/components/ModalWithTrigger/index.tsx b/frontend/src/metabase/common/components/ModalWithTrigger/index.tsx
deleted file mode 100644
index 0927422a545..00000000000
--- a/frontend/src/metabase/common/components/ModalWithTrigger/index.tsx
+++ /dev/null
@@ -1,2 +0,0 @@
-// eslint-disable-next-line import/no-default-export -- deprecated usage
-export { default } from "./ModalWithTrigger";