I ran into a problem where expandable elements such as those on DataView and Accordion were measuring height dimensions incorrectly because TokenAmount wasn't mounted prior and hadn't loaded token images to render space.
A solution is to always provide the dimensions and a placeholder during load, this also stops content hopping around.
This does present the question of whether a placeholder being present when a fake token is used is acceptable. I think we should optimise for the common use case (a token address has an asset) and if we need to we can give the option to hide the token graphic via a flag in the future.
I ran into a problem where expandable elements such as those on
DataView
andAccordion
were measuring height dimensions incorrectly becauseTokenAmount
wasn't mounted prior and hadn't loaded token images to render space.A solution is to always provide the dimensions and a placeholder during load, this also stops content hopping around.
This does present the question of whether a placeholder being present when a fake token is used is acceptable. I think we should optimise for the common use case (a token address has an asset) and if we need to we can give the option to hide the token graphic via a flag in the future.