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

Fix safari pop-up issue with new LinkButton widget #1011

Merged

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Dec 20, 2024

This PR introduces a LinkButton widget that mimics a ipywidgets.Button via an ipywidgets.HTML wrapper around an anchor tag (<a>).

Resolves #891
Resolves #988

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.17%. Comparing base (0ca7430) to head (55e5867).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1011      +/-   ##
==========================================
+ Coverage   69.10%   69.17%   +0.07%     
==========================================
  Files         117      117              
  Lines        6499     6508       +9     
==========================================
+ Hits         4491     4502      +11     
+ Misses       2008     2006       -2     
Flag Coverage Δ
python-3.11 69.17% <100.00%> (+0.07%) ⬆️
python-3.9 69.19% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edan-bainglass edan-bainglass force-pushed the fix-safari-pop-up-issue branch 2 times, most recently from 34b397d to 9c4b8a2 Compare December 21, 2024 11:36
@edan-bainglass edan-bainglass force-pushed the fix-safari-pop-up-issue branch from 9c4b8a2 to 5cfed97 Compare December 23, 2024 08:02
@superstar54
Copy link
Member

Thanks for the work!
Have you tested this on the Safari browser?

@edan-bainglass edan-bainglass force-pushed the fix-safari-pop-up-issue branch 2 times, most recently from cb2af4e to f45aac4 Compare December 23, 2024 11:16
@edan-bainglass
Copy link
Member Author

Thanks for the work! Have you tested this on the Safari browser?

Sure haven't. @giovannipizzi could you test the PR, see if it fixes your issue?

@edan-bainglass edan-bainglass force-pushed the fix-safari-pop-up-issue branch from f45aac4 to 55e5867 Compare December 24, 2024 07:01
@edan-bainglass
Copy link
Member Author

Thanks for the work! Have you tested this on the Safari browser?

Hi @superstar54 for the sake of time, can we approve this one? A quick lookup online suggests that using an anchor tag (via an HTML widget) is standard across browsers and should not trigger a pop-up in Safari (where a button click trigger of JS window.open does).

Worst case, it doesn't work (same situation we're in without this PR) and we pursue another solution.

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Hi @superstar54 for the sake of time, can we approve this one? A quick lookup online suggests that using an anchor tag (via an HTML widget) is standard across browsers and should not trigger a pop-up in Safari (where a button click trigger of JS window.open does).

Sure! Thanks for the work!

@edan-bainglass edan-bainglass merged commit acf4fdb into aiidalab:main Dec 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants