From ef13e5d1a1befb6c8bfbaafa90efdc3c909b9c78 Mon Sep 17 00:00:00 2001 From: dsmmcken Date: Wed, 17 Apr 2024 13:33:36 -0400 Subject: [PATCH] remove flex/view additional wrappers --- .../ui/src/js/src/elements/SpectrumElementUtils.ts | 3 +-- plugins/ui/src/js/src/elements/spectrum/Flex.tsx | 11 ----------- plugins/ui/src/js/src/elements/spectrum/View.tsx | 11 ----------- plugins/ui/src/js/src/elements/spectrum/index.ts | 2 -- plugins/ui/src/js/src/layout/Column.tsx | 2 +- plugins/ui/src/js/src/layout/Row.tsx | 2 +- 6 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 plugins/ui/src/js/src/elements/spectrum/Flex.tsx delete mode 100644 plugins/ui/src/js/src/elements/spectrum/View.tsx diff --git a/plugins/ui/src/js/src/elements/SpectrumElementUtils.ts b/plugins/ui/src/js/src/elements/SpectrumElementUtils.ts index f60abad56..94c56e405 100644 --- a/plugins/ui/src/js/src/elements/SpectrumElementUtils.ts +++ b/plugins/ui/src/js/src/elements/SpectrumElementUtils.ts @@ -16,16 +16,15 @@ import { ToggleButton, } from '@adobe/react-spectrum'; import { ValueOf } from '@deephaven/utils'; +import { Flex, View } from '@deephaven/components'; import { ActionButton, Button, - Flex, Form, RangeSlider, Slider, TabPanels, TextField, - View, } from './spectrum'; import { ELEMENT_KEY, ElementNode, isElementNode } from './ElementUtils'; diff --git a/plugins/ui/src/js/src/elements/spectrum/Flex.tsx b/plugins/ui/src/js/src/elements/spectrum/Flex.tsx deleted file mode 100644 index f3f38b309..000000000 --- a/plugins/ui/src/js/src/elements/spectrum/Flex.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { Flex as DHFlex, FlexProps } from '@deephaven/components'; - -function Flex(props: FlexProps): JSX.Element { - // eslint-disable-next-line react/jsx-props-no-spreading - return ; -} - -Flex.displayName = 'Flex'; - -export default Flex; diff --git a/plugins/ui/src/js/src/elements/spectrum/View.tsx b/plugins/ui/src/js/src/elements/spectrum/View.tsx deleted file mode 100644 index 3a5d0501c..000000000 --- a/plugins/ui/src/js/src/elements/spectrum/View.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { View as DHView, ViewProps } from '@deephaven/components'; - -function View(props: ViewProps): JSX.Element { - // eslint-disable-next-line react/jsx-props-no-spreading - return ; -} - -View.displayName = 'View'; - -export default View; diff --git a/plugins/ui/src/js/src/elements/spectrum/index.ts b/plugins/ui/src/js/src/elements/spectrum/index.ts index 20a7baae0..a3e908593 100644 --- a/plugins/ui/src/js/src/elements/spectrum/index.ts +++ b/plugins/ui/src/js/src/elements/spectrum/index.ts @@ -6,8 +6,6 @@ */ export { default as ActionButton } from './ActionButton'; export { default as Button } from './Button'; -export { default as Flex } from './Flex'; -export { default as View } from './View'; export { default as Form } from './Form'; export { default as RangeSlider } from './RangeSlider'; export { default as Slider } from './Slider'; diff --git a/plugins/ui/src/js/src/layout/Column.tsx b/plugins/ui/src/js/src/layout/Column.tsx index eb9f21901..c60cbae36 100644 --- a/plugins/ui/src/js/src/layout/Column.tsx +++ b/plugins/ui/src/js/src/layout/Column.tsx @@ -1,13 +1,13 @@ import React, { useEffect, useMemo } from 'react'; import { useLayoutManager } from '@deephaven/dashboard'; import type { RowOrColumn } from '@deephaven/golden-layout'; +import { Flex } from '@deephaven/components'; import { normalizeColumnChildren, type ColumnElementProps, } from './LayoutUtils'; import { ParentItemContext, useParentItem } from './ParentItemContext'; import { usePanelId } from './ReactPanelContext'; -import { Flex } from '../elements/spectrum'; function LayoutColumn({ children, diff --git a/plugins/ui/src/js/src/layout/Row.tsx b/plugins/ui/src/js/src/layout/Row.tsx index 8491aa93a..cad61b97e 100644 --- a/plugins/ui/src/js/src/layout/Row.tsx +++ b/plugins/ui/src/js/src/layout/Row.tsx @@ -1,10 +1,10 @@ import React, { useEffect, useMemo } from 'react'; import { useLayoutManager } from '@deephaven/dashboard'; import type { RowOrColumn } from '@deephaven/golden-layout'; +import { Flex } from '@deephaven/components'; import { normalizeRowChildren, type RowElementProps } from './LayoutUtils'; import { ParentItemContext, useParentItem } from './ParentItemContext'; import { usePanelId } from './ReactPanelContext'; -import { Flex } from '../elements/spectrum'; function LayoutRow({ children, height }: RowElementProps): JSX.Element | null { const layoutManager = useLayoutManager();