-
Notifications
You must be signed in to change notification settings - Fork 948
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 Upload widget counter value #2666
Conversation
Thanks for this. I agree that it's a little strange that we're using I'm not sure I agree that switching to observing the
I don't think An alternative could be to keep |
Thanks for raising that point. We should be able to check that behavior. It looks it's possible for
Right, with the current change Another way could be to compute |
Thanks for checking.
Agreed.
To me, that sounds like the right call, except We could break backwards compatibility and just keep |
It's possible that |
Ah yeah, that makes sense. They should probably still be read-only. |
250fd81
to
eef51ec
Compare
I think this looks good. I think it'd be useful to discuss with people explicitly removing |
f6fbb8a
to
bd6c883
Compare
933b1a6
to
a2dbe49
Compare
a2dbe49
to
308564b
Compare
Thanks @pbugnion for adding the comment in 656e2ed. For reference and to add a bit more context: without this serializer, we indeed hit the default serializer, which performs a deep copy of the value via a ipywidgets/packages/base/src/widget.ts Line 443 in 44fb6f8
This would result in the |
Fixes #2480.
It looks like the
_counter
value was used to detect a change of the value.Instead we could use
data
to achieve the same result, since its value should change when new files are being uploaded.Breaking changes
data
to_data
metadata
to_metadata
_counter
,_metadata
and_data
read-onlyvalue
is a list of dicts. Example: