-
-
Notifications
You must be signed in to change notification settings - Fork 573
Ensure the order of Bokeh property changes and events is preserved #8311
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
Conversation
|
Thanks for digging into this. The difference in handling here is to avoid excessive change events being triggered, so we delay processing of a change event and "accumulate" changes over that time period. For bokeh events each event represents a discrete action so it should not be "accumulated". That said the problem you describe is obviously real. The ideal solution would be that a discrete event would force any accumulated events in the session to be processed immediately, rather than delaying the discrete event as well. That said I'm not sure of the feasibility of that, but I'll take a quick look at it. |
|
I think in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8311 +/- ##
==========================================
+ Coverage 85.36% 86.00% +0.63%
==========================================
Files 348 348
Lines 54483 54515 +32
==========================================
+ Hits 46510 46886 +376
+ Misses 7973 7629 -344 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Will merge and cut an RC release tonight. Would appreciate it if you could test with it in the morning. |
|
It doesn't look like it's working as expected. I guess my test wasn't good enough 🙈 . |
Fixes #6155
To summarize the issue which is pretty simple:
on_clickvalueattributeTo reproduce the reported issue:
After some debugging, what I could see is that:
valuechange and then click event)valuechange is delayed by 50 ms in Panel (doc.add_timeout_callback(cb, self._debounce), btw this is called debounce, but is it really doing debouncing?)valuechange (which seems to always be the case when I do a "tap-to-click" on my trackpad, less so with a normal click), the on_click callback will be triggered before the bokehvaluechange triggers the widgetvalueupdate.I found two different ways that seem to fix the issue. I'm not yet sure which one is the best, or even if either is!
TextInput._priority_changesto['value']to avoid "debouncing"valuechanges._process_bokeh_event.My guess is that the solution is a little bit more subtle than that.
TODO: