Commit 71fca1b
fix: resolve "no comm channel defined" error with plotly 6.x
Fixes posit-dev/py-shiny#2156
Plotly 6.0 switched FigureWidget to use anywidget, which doesn't have
a destroy() method. The previous cleanup logic only called v.remove()
for views with destroy(), causing anywidget-based views to skip removal
before m.close(). Since ipywidgets' close() deletes the comm before
removing views, the view removal would fail when trying to sync.
The fix ensures all views are removed while the comm is still available.
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 23cbe34 commit 71fca1b
2 files changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 239 | | |
244 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| |||
0 commit comments