Fix layout shift from async USD prices and token balances
Reserve vertical space with min-height and placeholders for all elements populated by async data: per-address USD totals, ETH price display, token balance containers, and total value sub-line. Prevents buttons and click targets from moving when price API responds.
This commit is contained in:
@@ -274,11 +274,15 @@
|
||||
</div>
|
||||
<div
|
||||
id="address-usd-total"
|
||||
class="text-xs text-muted mb-3 text-right"
|
||||
></div>
|
||||
class="text-xs text-muted mb-3 text-right min-h-[1rem]"
|
||||
>
|
||||
|
||||
</div>
|
||||
<!-- balances -->
|
||||
<div class="border-b border-border-light pb-2 mb-2">
|
||||
<div id="address-balances"></div>
|
||||
<div id="address-balances" class="min-h-[1.25rem]">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- actions -->
|
||||
@@ -343,11 +347,15 @@
|
||||
</div>
|
||||
<div
|
||||
id="address-token-usd-total"
|
||||
class="text-xs text-muted mb-3 text-right"
|
||||
></div>
|
||||
class="text-xs text-muted mb-3 text-right min-h-[1rem]"
|
||||
>
|
||||
|
||||
</div>
|
||||
<!-- single token balance -->
|
||||
<div class="border-b border-border-light pb-2 mb-2">
|
||||
<div id="address-token-balance"></div>
|
||||
<div id="address-token-balance" class="min-h-[1.25rem]">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- actions -->
|
||||
|
||||
Reference in New Issue
Block a user