fix(trading): update copy on tooltips fills update (#5512)

This commit is contained in:
m.ray 2023-12-20 10:12:35 +02:00 committed by GitHub
parent 362a2031c7
commit 10add7c236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 13 deletions

View File

@ -208,11 +208,11 @@ def test_auction_uncross_fees(continuous_market, vega: VegaService, page: Page):
expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI")
page.locator(COL_ID_FEE).hover()
expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text(
"If the market was suspendedIf the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI"
"If the market was suspendedDuring auction, half the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI"
)
change_keys(page, vega, "market_maker")
expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI")
page.locator(COL_ID_FEE).hover()
expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text(
"If the market was suspendedIf the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI"
"If the market was suspendedDuring auction, half the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI"
)

View File

@ -87,9 +87,9 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
colId: 'fee',
field: 'market',
valueFormatter: formatFee(partyId),
tooltipComponent: FeesBreakdownTooltip,
type: 'rightAligned',
tooltipField: 'market',
tooltipComponent: FeesBreakdownTooltip,
tooltipComponentParams: { partyId },
},
{
@ -97,13 +97,13 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
colId: 'fee-discount',
field: 'market',
valueFormatter: formatFeeDiscount(partyId),
type: 'rightAligned',
// return null to disable tooltip if fee discount is 0 or empty
tooltipValueGetter: ({ valueFormatted, value }) => {
return valueFormatted && /[1-9]/.test(valueFormatted)
? valueFormatted
: null;
},
type: 'rightAligned',
// return null to disable tooltip if fee discount is 0 or empty
cellRenderer: ({
value,
valueFormatted,
@ -146,7 +146,7 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
overlayNoRowsTemplate={t('No fills')}
getRowId={({ data }) => data?.id}
tooltipShowDelay={0}
tooltipHideDelay={2000}
tooltipHideDelay={10000}
components={{ MarketNameCell }}
{...props}
/>
@ -292,21 +292,27 @@ const FeesBreakdownTooltip = ({
)}
{role === MAKER && (
<>
<p className="mb-1">{t('The maker will receive the maker fee.')}</p>
<p className="mb-1">
{t(
'If the market is active the maker will pay zero infrastructure and liquidity fees.'
`Fee revenue to be received by the maker, takers' fee discounts already applied.`
)}
</p>
<p className="mb-1">
{t(
'During continuous trading the maker pays no infrastructure and liquidity fees.'
)}
</p>
</>
)}
{role === TAKER && (
<p className="mb-1">{t('Fees to be paid by the taker.')}</p>
<p className="mb-1">
{t('Fees to be paid by the taker; discounts are already applied.')}
</p>
)}
{(role === '-' || marketState === Schema.MarketState.STATE_SUSPENDED) && (
<p className="mb-1">
{t(
'If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.'
'During auction, half the infrastructure and liquidity fees will be paid.'
)}
</p>
)}

View File

@ -5,9 +5,9 @@
"Date": "Date",
"Fee": "Fee",
"Fee Discount": "Fee Discount",
"Fees to be paid by the taker.": "Fees to be paid by the taker.",
"If the market is active the maker will pay zero infrastructure and liquidity fees.": "If the market is active the maker will pay zero infrastructure and liquidity fees.",
"If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.": "If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.",
"Fees to be paid by the taker; discounts are already applied.": "Fees to be paid by the taker; discounts are already applied.",
"During continuous trading the maker pays no infrastructure and liquidity fees.": "During continuous trading the maker pays no infrastructure and liquidity fees.",
"During auction, half the infrastructure and liquidity fees will be paid.": "During auction, half the infrastructure and liquidity fees will be paid.",
"Infrastructure Fee": "Infrastructure Fee",
"Market": "Market",
"No fills": "No fills",