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

[Demo] Open ViViVo links outside iframe #845

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Conversation

antonymilne
Copy link
Contributor

@antonymilne antonymilne commented Oct 30, 2024

Description

@Joseph-Perkins noticed that if you open up ViViVo on HF in an iframe then the links to github don't work. The reason for this is
https://stackoverflow.com/questions/7649361/github-gist-page-wont-load-in-iframe. The solution is to open these links with target="_top" to escape the iframe target="_blank".

Screenshot

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

Copy link
Contributor

github-actions bot commented Oct 30, 2024

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2024-11-13 10:00:55 UTC
Commit: e66d16e

Link: vizro-core/examples/dev/

Link: vizro-core/examples/scratch_dev

Link: vizro-core/examples/visual-vocabulary/

Link: vizro-ai/examples/dashboard_ui/

@antonymilne
Copy link
Contributor Author

Surprisingly this fix doesn't actually work. So it's blocked pending https://discuss.huggingface.co/t/allow-navigation-outside-iframe/114755/2.

@antonymilne
Copy link
Contributor Author

I've raised the issue on the HF discord also but realistically don't expect them to change anything here, so until we hear otherwise the solution is just to open all these links in a new tab with target="_blank". It's not great for usability but unfortunately it's the only way to get the links to open from inside the iframe.

FYI @nadijagraca @huong-li-nguyen this is what I mentioned yesterday at standup.

@antonymilne antonymilne enabled auto-merge (squash) November 13, 2024 10:02
@antonymilne antonymilne merged commit 6d5c8e7 into main Nov 13, 2024
36 checks passed
@antonymilne antonymilne deleted the demo/vvv-link-targets branch November 13, 2024 10:03
@antonymilne
Copy link
Contributor Author

HF have said they won't change the settings here so we must continue to open them in a new tab.

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.

4 participants