Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: show button for crypto map if the iframe cannot be loaded #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onmax
Copy link
Member

@onmax onmax commented Oct 10, 2024

This pull request introduces changes to enhance the CryptoMapContinentSelector component by adding new functionalities for iframe handling and improving user experience when the iframe is blocked.

The user will see

image

Copy link

cloudflare-workers-and-pages bot commented Oct 10, 2024

Deploying nimiq-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 60ed367
Status: ✅  Deploy successful!
Preview URL: https://6a2b9bd6.nimiq-website.pages.dev
Branch Preview URL: https://onmax-handle-not-loading-ifr.nimiq-website.pages.dev

View logs

@onmax onmax force-pushed the onmax/handle-not-loading-iframe branch from 74c21bf to 59c4af5 Compare October 10, 2024 14:19
w-full aspect="9/16 lg:initial" rounded-8 lg:h-full max-lg:max-h-80dvh ring="1.5 neutral-200" title="Crypto Map"
:src="cryptoMapUrl"
sandbox="allow-scripts allow-same-origin allow-popups"
frameborder="0"
/>
</div>
</section>
<section v-else bg-neutral-100 pt-0>
<NuxtLink to="https://map.nimiq.com" target="_blank" mx-auto w-max nq-arrow nq-pill-lg nq-pill-blue>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be cool to redirect to the same location, eg: Europe if Europe is selected...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mimiimiimiimimimim

Copy link
Member Author

@onmax onmax Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, thinking about it. Better to let the map get the user's location by IP. There will be not a continent selector in the fallback version, just a button

@onmax onmax force-pushed the onmax/handle-not-loading-iframe branch from 59c4af5 to 1142d12 Compare October 10, 2024 14:25
@onmax onmax closed this Oct 10, 2024
@onmax onmax force-pushed the onmax/handle-not-loading-iframe branch from 1142d12 to 7361d4d Compare October 10, 2024 14:28
@onmax onmax reopened this Oct 10, 2024
@onmax onmax force-pushed the onmax/handle-not-loading-iframe branch 2 times, most recently from fdd418a to 391d892 Compare October 10, 2024 14:53
@onmax onmax force-pushed the onmax/handle-not-loading-iframe branch from 391d892 to 60ed367 Compare October 10, 2024 15:05
@onmax
Copy link
Member Author

onmax commented Oct 11, 2024

@sisou @danimoh Do you know of a reliable way to handle iframes blocked by ad-blocking extensions or privacy-focused browsers like Brave?

I've tried a few things that didn't work:

  • Adding onerror to the iframe to change a boolean flag.
  • Reactively check the iframe size after a few seconds. This might work, but is a bit clunky.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants