-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Improve the FileDownload widget #1306
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1306 +/- ##
==========================================
+ Coverage 87.77% 87.81% +0.04%
==========================================
Files 124 124
Lines 13485 13509 +24
==========================================
+ Hits 11836 11863 +27
+ Misses 1649 1646 -3
Continue to review full report at Codecov.
|
Thanks for this, not an easy fix to make after all. The approach makes a lot of sense to me though so just let me know if you think it's ready. |
Relieved that you're OK with all those changes! I've seen some typos and things to be improved in the docs (the second sentence isn't complete here). I'll fix that and then it's ready. |
I think it's ready now. |
Looks ready to me, thanks so much for contributing! |
So great to see this merged. Just had feedback from one of my users that experienced this bug. |
* Fix filename updating * Monitor when _transfers() runs * Fix various issues with the filedownload widget * Fix the FileDownload docs
* Fix filename updating * Monitor when _transfers() runs * Fix various issues with the filedownload widget * Fix the FileDownload docs
Fixes #1299
The intent of this PR is to fix various bugs with the FileDownload widget. I had to clearly define the behaviour of the widget, that to me follows three cases:
To get there I had to make the following changes:
_transfers
model attribute. It took me a long time before I dared to touch the python side but I found out it was the only solution that worked and allowed to fix all the bugs. When the widget is a button, a click will increment_clicks
in typescript which will be reflected in python and trigger_transfer()
. This method will increment_transfers
, this signal will be caught on the typescript side, where a link will be created and clicked to download the data.Example fixed:

Updating button type, disabled, filename fixed:
