From b393a573e67c07f1802b2ee65d3e6496f80b5b5b Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Tue, 8 Aug 2023 17:56:45 +0100 Subject: [PATCH] chore: remove min widths --- libs/accounts/src/lib/breakdown-table.tsx | 1 - libs/datagrid/src/lib/column-definitions.ts | 4 ++-- libs/liquidity/src/lib/liquidity-table.tsx | 2 -- .../lib/components/markets-container/use-column-defs.tsx | 1 - .../components/stop-orders-table/stop-orders-table.tsx | 9 --------- .../src/components/trading-dropdown/actions-dropdown.tsx | 5 +---- 6 files changed, 3 insertions(+), 19 deletions(-) diff --git a/libs/accounts/src/lib/breakdown-table.tsx b/libs/accounts/src/lib/breakdown-table.tsx index f654280ce..1467aa9f6 100644 --- a/libs/accounts/src/lib/breakdown-table.tsx +++ b/libs/accounts/src/lib/breakdown-table.tsx @@ -41,7 +41,6 @@ const BreakdownTable = forwardRef( if (!value) return 'None'; return value; }, - minWidth: 200, }, { headerName: t('Account type'), diff --git a/libs/datagrid/src/lib/column-definitions.ts b/libs/datagrid/src/lib/column-definitions.ts index 038adcc59..73e06de3e 100644 --- a/libs/datagrid/src/lib/column-definitions.ts +++ b/libs/datagrid/src/lib/column-definitions.ts @@ -4,8 +4,8 @@ export const COL_DEFS = { sortable: false, resizable: false, filter: false, - minWidth: 45, - maxWidth: 45, + minWidth: 40, + maxWidth: 40, type: 'rightAligned', pinned: 'right' as const, }, diff --git a/libs/liquidity/src/lib/liquidity-table.tsx b/libs/liquidity/src/lib/liquidity-table.tsx index b05ef4ca1..74f6a5e35 100644 --- a/libs/liquidity/src/lib/liquidity-table.tsx +++ b/libs/liquidity/src/lib/liquidity-table.tsx @@ -124,7 +124,6 @@ export const LiquidityTable = ({ headerTooltip: t( 'The valuation of the market at the time the liquidity commitment was made. Commitments made at a lower valuation earlier in the lifetime of the market would be expected to have a higher equity-like share if the market has grown. If a commitment is amended, value will reflect the average of the market valuations across the lifetime of the commitment.' ), - minWidth: 160, valueFormatter: assetDecimalsQuantumFormatter, tooltipValueGetter: assetDecimalsFormatter, }, @@ -187,7 +186,6 @@ export const LiquidityTable = ({ getRowId={({ data }: { data: LiquidityProvisionData }) => data.id || ''} tooltipShowDelay={500} defaultColDef={{ - minWidth: 100, tooltipComponent: TooltipCellComponent, sortable: true, }} diff --git a/libs/markets/src/lib/components/markets-container/use-column-defs.tsx b/libs/markets/src/lib/components/markets-container/use-column-defs.tsx index f924487d7..4271debcd 100644 --- a/libs/markets/src/lib/components/markets-container/use-column-defs.tsx +++ b/libs/markets/src/lib/components/markets-container/use-column-defs.tsx @@ -40,7 +40,6 @@ export const useColumnDefs = ({ onMarketClick }: Props) => { { headerName: t('Trading mode'), field: 'tradingMode', - minWidth: 170, valueFormatter: ({ data, }: VegaValueFormatterParams) => { diff --git a/libs/orders/src/lib/components/stop-orders-table/stop-orders-table.tsx b/libs/orders/src/lib/components/stop-orders-table/stop-orders-table.tsx index ac28d308d..ac7a88934 100644 --- a/libs/orders/src/lib/components/stop-orders-table/stop-orders-table.tsx +++ b/libs/orders/src/lib/components/stop-orders-table/stop-orders-table.tsx @@ -46,7 +46,6 @@ export const StopOrdersTable = memo< field: 'market.tradableInstrument.instrument.code', cellRenderer: 'MarketNameCell', cellRendererParams: { idPath: 'market.id', onMarketClick }, - minWidth: 150, }, { headerName: t('Trigger'), @@ -58,7 +57,6 @@ export const StopOrdersTable = memo< data, }: VegaValueFormatterParams): string => data ? formatTrigger(data, data.market.decimalPlaces) : '', - minWidth: 100, }, { field: 'expiresAt', @@ -82,7 +80,6 @@ export const StopOrdersTable = memo< } return ''; }, - minWidth: 150, }, { headerName: t('Size'), @@ -129,7 +126,6 @@ export const StopOrdersTable = memo< ) ); }, - minWidth: 80, }, { field: 'submission.type', @@ -141,7 +137,6 @@ export const StopOrdersTable = memo< value, }: VegaICellRendererParams) => value ? Schema.OrderTypeMapping[value] : '', - minWidth: 80, }, { field: 'status', @@ -163,7 +158,6 @@ export const StopOrdersTable = memo< }) => ( {valueFormatted} ), - minWidth: 100, }, { field: 'submission.price', @@ -185,7 +179,6 @@ export const StopOrdersTable = memo< } return addDecimalsFormatNumber(value, data.market.decimalPlaces); }, - minWidth: 100, }, { field: 'submission.timeInForce', @@ -198,7 +191,6 @@ export const StopOrdersTable = memo< }: VegaValueFormatterParams) => { return value ? Schema.OrderTimeInForceCode[value] : ''; }, - minWidth: 150, }, { field: 'updatedAt', @@ -218,7 +210,6 @@ export const StopOrdersTable = memo< ); }, - minWidth: 150, }, { colId: 'actions', diff --git a/libs/ui-toolkit/src/components/trading-dropdown/actions-dropdown.tsx b/libs/ui-toolkit/src/components/trading-dropdown/actions-dropdown.tsx index 474ed8526..fd73c6e38 100644 --- a/libs/ui-toolkit/src/components/trading-dropdown/actions-dropdown.tsx +++ b/libs/ui-toolkit/src/components/trading-dropdown/actions-dropdown.tsx @@ -7,10 +7,7 @@ import { export const ActionsDropdownTrigger = () => { return ( - +