diff --git a/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts b/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts index e69ebbbd6..782a194a2 100644 --- a/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts +++ b/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts @@ -334,11 +334,8 @@ context( .parent() .siblings() .invoke('text') - .should('have.length.above', 3) - .then((el) => { - const value = parseFloat(el); - cy.wrap(value).should('be.gte', parseFloat(expectedAmount)); - }); + .then(parseFloat) + .should('be.gte', parseFloat(expectedAmount)); cy.get(vegaWalletCurrencyTitle) .contains(id) diff --git a/apps/governance-e2e/src/integration/view/withdraw.cy.ts b/apps/governance-e2e/src/integration/view/withdraw.cy.ts index 3a2d51ce9..a6283e81f 100644 --- a/apps/governance-e2e/src/integration/view/withdraw.cy.ts +++ b/apps/governance-e2e/src/integration/view/withdraw.cy.ts @@ -12,6 +12,7 @@ context( { tags: '@smoke' }, function () { before('navigate to withdrawals page', function () { + cy.clearAllLocalStorage(); cy.visit('/'); navigateTo(navigation.withdraw); }); diff --git a/apps/trading/client-pages/market/trade-grid.tsx b/apps/trading/client-pages/market/trade-grid.tsx index 6ba4a0ca9..6251dd8ae 100644 --- a/apps/trading/client-pages/market/trade-grid.tsx +++ b/apps/trading/client-pages/market/trade-grid.tsx @@ -15,8 +15,6 @@ import { CandlesChartContainer } from '@vegaprotocol/candles-chart'; import { Tab, LocalStoragePersistTabs as Tabs, - ResizableGrid, - ResizableGridPanel, Splash, } from '@vegaprotocol/ui-toolkit'; import { t } from '@vegaprotocol/i18n'; @@ -33,6 +31,10 @@ import { useMarketClickHandler, useMarketLiquidityClickHandler, } from '../../lib/hooks/use-market-click-handler'; +import { + ResizableGrid, + ResizableGridPanel, +} from '../../components/resizable-grid'; type MarketDependantView = | typeof CandlesChartContainer diff --git a/apps/trading/client-pages/portfolio/portfolio.tsx b/apps/trading/client-pages/portfolio/portfolio.tsx index efb93d449..b3b4a8dc9 100644 --- a/apps/trading/client-pages/portfolio/portfolio.tsx +++ b/apps/trading/client-pages/portfolio/portfolio.tsx @@ -2,18 +2,13 @@ import { titlefy } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; import { PositionsContainer } from '@vegaprotocol/positions'; import { OrderListContainer } from '@vegaprotocol/orders'; -import { - ResizableGridPanel, - Tab, - LocalStoragePersistTabs as Tabs, -} from '@vegaprotocol/ui-toolkit'; +import { Tab, LocalStoragePersistTabs as Tabs } from '@vegaprotocol/ui-toolkit'; import { WithdrawalsContainer } from './withdrawals-container'; import { FillsContainer } from '@vegaprotocol/fills'; import type { ReactNode } from 'react'; import { useEffect } from 'react'; import { VegaWalletContainer } from '../../components/vega-wallet-container'; import { DepositsContainer } from './deposits-container'; -import { ResizableGrid } from '@vegaprotocol/ui-toolkit'; import { LayoutPriority } from 'allotment'; import { usePageTitleStore } from '../../stores'; import { LedgerContainer } from '@vegaprotocol/ledger'; @@ -23,6 +18,10 @@ import { useMarketClickHandler, useMarketLiquidityClickHandler, } from '../../lib/hooks/use-market-click-handler'; +import { + ResizableGrid, + ResizableGridPanel, +} from '../../components/resizable-grid'; export const Portfolio = () => { const { updateTitle } = usePageTitleStore((store) => ({ diff --git a/libs/ui-toolkit/src/components/resizable-grid/index.ts b/apps/trading/components/resizable-grid/index.ts similarity index 100% rename from libs/ui-toolkit/src/components/resizable-grid/index.ts rename to apps/trading/components/resizable-grid/index.ts diff --git a/libs/ui-toolkit/src/components/resizable-grid/resizable-grid.tsx b/apps/trading/components/resizable-grid/resizable-grid.tsx similarity index 100% rename from libs/ui-toolkit/src/components/resizable-grid/resizable-grid.tsx rename to apps/trading/components/resizable-grid/resizable-grid.tsx diff --git a/libs/accounts/src/lib/breakdown-table.tsx b/libs/accounts/src/lib/breakdown-table.tsx index 0d7d63380..9f4153901 100644 --- a/libs/accounts/src/lib/breakdown-table.tsx +++ b/libs/accounts/src/lib/breakdown-table.tsx @@ -1,16 +1,16 @@ import { forwardRef } from 'react'; import { addDecimalsFormatNumber } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; -import { - Intent, - progressBarCellRendererSelector, -} from '@vegaprotocol/ui-toolkit'; +import { Intent } from '@vegaprotocol/ui-toolkit'; import { AgGridColumn } from 'ag-grid-react'; import type { AgGridReact, AgGridReactProps } from 'ag-grid-react'; import type { AccountFields } from './accounts-data-provider'; import { AccountTypeMapping } from '@vegaprotocol/types'; -import type { ValueProps } from '@vegaprotocol/ui-toolkit'; -import type { VegaValueFormatterParams } from '@vegaprotocol/datagrid'; +import type { + ValueProps, + VegaValueFormatterParams, +} from '@vegaprotocol/datagrid'; +import { progressBarCellRendererSelector } from '@vegaprotocol/datagrid'; import { AgGridDynamic as AgGrid, PriceCell } from '@vegaprotocol/datagrid'; import type { ValueFormatterParams } from 'ag-grid-community'; import { accountValuesComparator } from './accounts-table'; diff --git a/libs/datagrid/src/index.ts b/libs/datagrid/src/index.ts index 7a827234a..d72edb018 100644 --- a/libs/datagrid/src/index.ts +++ b/libs/datagrid/src/index.ts @@ -17,3 +17,5 @@ export * from './lib/filters/set-filter'; export * from './lib/cell-class-rules'; export * from './lib/type-helpers'; + +export * from './lib/cells/grid-progress-bar'; diff --git a/libs/ui-toolkit/src/components/progress-bar/grid-progress-bar.tsx b/libs/datagrid/src/lib/cells/grid-progress-bar.tsx similarity index 88% rename from libs/ui-toolkit/src/components/progress-bar/grid-progress-bar.tsx rename to libs/datagrid/src/lib/cells/grid-progress-bar.tsx index c246a457f..098f2339c 100644 --- a/libs/ui-toolkit/src/components/progress-bar/grid-progress-bar.tsx +++ b/libs/datagrid/src/lib/cells/grid-progress-bar.tsx @@ -1,9 +1,9 @@ +import type { Intent } from '@vegaprotocol/ui-toolkit'; +import { ProgressBar } from '@vegaprotocol/ui-toolkit'; import type { CellRendererSelectorResult, ICellRendererParams, } from 'ag-grid-community'; -import type { Intent } from '../../utils/intent'; -import { ProgressBar } from './progress-bar'; export interface ValueProps { valueFormatted?: { diff --git a/libs/positions/src/lib/positions-table.tsx b/libs/positions/src/lib/positions-table.tsx index 9ac49f2fd..152fee096 100644 --- a/libs/positions/src/lib/positions-table.tsx +++ b/libs/positions/src/lib/positions-table.tsx @@ -8,6 +8,7 @@ import type { TypedDataAgGrid, VegaICellRendererParams, } from '@vegaprotocol/datagrid'; +import { ProgressBarCell } from '@vegaprotocol/datagrid'; import { AgGridDynamic as AgGrid, DateRangeFilter, @@ -22,7 +23,6 @@ import { TooltipCellComponent, ExternalLink, Icon, - ProgressBarCell, } from '@vegaprotocol/ui-toolkit'; import { volumePrefix, diff --git a/libs/ui-toolkit/src/components/index.ts b/libs/ui-toolkit/src/components/index.ts index a62a1eba3..2c32a4d7b 100644 --- a/libs/ui-toolkit/src/components/index.ts +++ b/libs/ui-toolkit/src/components/index.ts @@ -29,7 +29,6 @@ export * from './pagination'; export * from './popover'; export * from './progress-bar'; export * from './radio-group'; -export * from './resizable-grid'; export * from './rounded-wrapper'; export * from './select'; export * from './simple-grid'; diff --git a/libs/ui-toolkit/src/components/progress-bar/index.ts b/libs/ui-toolkit/src/components/progress-bar/index.ts index 7a49534da..d71d9b1bf 100644 --- a/libs/ui-toolkit/src/components/progress-bar/index.ts +++ b/libs/ui-toolkit/src/components/progress-bar/index.ts @@ -1,2 +1 @@ -export * from './grid-progress-bar'; export * from './progress-bar'; diff --git a/libs/ui-toolkit/src/components/resizable-grid/resizable-grid.stories.tsx b/libs/ui-toolkit/src/components/resizable-grid/resizable-grid.stories.tsx deleted file mode 100644 index ed80cb081..000000000 --- a/libs/ui-toolkit/src/components/resizable-grid/resizable-grid.stories.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import type { Story, Meta } from '@storybook/react'; -import { ResizableGrid } from './resizable-grid'; -import { Allotment } from 'allotment'; -import 'allotment/dist/style.css'; - -export default { - component: ResizableGrid, - title: 'ResizablePanel', -} as Meta; - -const Template: Story = (args) => ( -
- - -
Panel 1
-
- -
Panel 2
-
-
-
-); - -export const Default = Template.bind({});