Fix issue with Link Overlay in tBTC Explorer #556
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We encountered an issue with the component from chakra-ui while using it in the History table on the tBTC Explorer page. This component was intended to facilitate navigation for each row, directing the user to the corresponding etherscan link. However, we noticed an abnormal behavior specifically on real mobile devices, even though it worked correctly in the mobile view on Chrome.
On mobile, the overlay for the last item appeared to cover the entire page. As a result, any other links on the tBTC Explorer page, such as "View on Dune Analytics" or "Start Minting," unintentionally redirected the user to etherscan.
The cause of this was that the
LinkBox
component usesposition: relative
to contain the absolute positionedLinkOverlay
. Unfortunately<Tr />
component, which we passed to theas property, does not allow
position: relative`.As a hacky workaround we are applying
transform: scale(1)
to the tr element. See chakra-ui/chakra-ui#3832 for more info.To test it out run
yarn start
as usual and then go to the link fromOn Your Network:
on your mobile device. I've tested it out using Chrome nad Safari on iPhone and it seems to work as expected now.