Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions web/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ body.cipherbid-root ::selection {
}

/* Compatibility layer for immutable live transaction components. */
.cipherbid-auction-page [class*='lg:col-span-7'],
.cipherbid-auction-page [class*='lg:col-span-5'] {
min-width: 0;
}

.cipherbid-root [class*='text-[#a8b1ff]'],
.cipherbid-root [class*='text-[#d7dcff]'],
.cipherbid-root [class*='text-[#aee5c1]'],
Expand Down
6 changes: 3 additions & 3 deletions web/src/features/auction/ui/AtomicDeliveryReceipt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ export function AtomicDeliveryReceipt({
target="_blank"
rel="noreferrer"
aria-label={`${receipt.label} ${receipt.transactionHash}`}
className="cb-control flex min-h-11 flex-wrap items-center justify-between gap-2 px-3 text-sm"
className="cb-control flex min-h-11 min-w-0 flex-wrap items-center justify-between gap-2 overflow-hidden px-3 text-sm"
>
<span className="font-semibold">{receipt.label}</span>
<span className="font-mono text-xs text-[#9ba3af]">
<span className="shrink-0 font-semibold">{receipt.label}</span>
<span className="w-full min-w-0 break-all font-mono text-xs text-[#9ba3af] sm:w-auto sm:text-right">
{receipt.transactionHash} · block {receipt.blockNumber}
</span>
</a>
Expand Down
16 changes: 16 additions & 0 deletions web/tests/unit/AtomicDeliveryReceipt.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,20 @@ describe('AtomicDeliveryReceipt', () => {
expect(screen.getByText('No verified transaction receipts yet.')).toBeInTheDocument()
expect(screen.queryByRole('link')).not.toBeInTheDocument()
})

it('wraps a full transaction hash inside its receipt card', () => {
const transactionHash = `0x${'f'.repeat(64)}`
render(
<AtomicDeliveryReceipt
settlement={settlement}
receipts={[{ label: 'Settlement', transactionHash, finalityStatus: 'ACCEPTED_ON_L2', blockNumber: 77 }]}
/>,
)

expect(screen.getByRole('link', { name: `Settlement ${transactionHash}` })).toHaveClass(
'min-w-0',
'overflow-hidden',
)
expect(screen.getByText(`${transactionHash} · block 77`)).toHaveClass('min-w-0', 'break-all')
})
})
8 changes: 8 additions & 0 deletions web/tests/unit/designTasteSystem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ describe('CipherBid Taste visual system', () => {
expect(layout).toContain('className="cipherbid-root"')
})

it('allows live auction grid columns to shrink around scrollable evidence', () => {
const css = source('src/app/globals.css')

expect(css).toMatch(
/\.cipherbid-auction-page \[class\*='lg:col-span-7'\],\s*\.cipherbid-auction-page \[class\*='lg:col-span-5'\] \{\s*min-width: 0;/,
)
})

it('removes the old purple design literals from the redesigned surface', () => {
for (const relativePath of sourceFiles.filter((value) => value !== 'src/app/globals.css')) {
expect(source(relativePath), relativePath).not.toMatch(/#6654d9|#7170ff|#a8b1ff/i)
Expand Down