[Feat] Hide all Vizro internal callbacks#1502
Conversation
View the example dashboards of the current commit live on PyCafe ☕ 🚀Updated on: 2026-01-22 11:13:41 UTC Compare the examples using the commit's wheel file vs the latest released version: vizro-core/examples/scratch_devView with commit's wheel vs View with latest release vizro-core/examples/dev/View with commit's wheel vs View with latest release vizro-core/examples/visual-vocabulary/View with commit's wheel vs View with latest release vizro-core/examples/tutorial/ |
d0bf081 to
2b57530
Compare
petar-qb
left a comment
There was a problem hiding this comment.
Thanks @antonymilne for introducing this improvement and for creating new dash issues! 🙌
I want to raise further questions/ideas around callback visibility.
Should we consider enabling visibility of all callbacks in Vizro when the dashboard creator explicitly opts in like Vizro(hide_all_callbacks=False).build(dashboard).run() (by default it's True)? It's maybe an overkill to propagate this flag to all clientside callback you hide like hidden=hide_all_callbacks
Ideally, the default behaviour could be to show only the callbacks relevant to the currently opened page. I realise this is non-trivial to implement on the Dash side as an option, but it would be a great UX improvement.
Related to that, it would be useful if certain DashDependency objects could be hidden from the callback graph entirely. For example: Output(f"{id}_finished", "data", hidden=True). Other candidates would be "_guarded_trigger" and "action_progress_indication_placeholder".
These changes would allow us to exclude all our internal dependencies and keep the graph focused on what actually matters to the dashboard creator.
|
Thanks for the quick review guys!
Yes, potentially we could do that in future. It might be useful to make it more fine-grained like a kind of logging level/verbosity:
Or something like that anyway. @noklam already asked out of curiosity whether there was a way to turn back on the vizro callbacks but didn't have a use for it yet. So let's wait until someone would actually find it useful to understand what callbacks they would like to see. There's also a question about where this argument would go exactly. Dash's
Agreed, this would be a huge improvement. Maybe worth making a feature request on Dash? I have no idea off the top of my head how it would work or if it's even possible. But realistically in any slightly complex multi-page app at the moment the callback graph is pretty unusable.
Yes agreed, I wanted to do exactly this but couldn't. The graph would need to resolve some scenarios for chained callbacks like what happens if |
|
Hey @antonymilne, would you mind adding the |
Oops sorry, I missed this... But actually I don't think it's worth doing because it's not really a requirement for users, just for our tests to pass. If our tests break again then we can pin it in the test environment but if not then I think let's just leave it as is. |
Description
FYI @noklam
Dash 3.3.0 and 3.4.0 introduce a
hiddenargument to hide callbacks from the dev tools graph. I've marked all our Vizro callbacks ashiddenso that only the "core" action callbacks remain.For some debugging purposes this might be a bit too aggressive and hiding too much, but I think that's only relevant for Vizro developers rather than users. So then we can temporarily remove the
hidden=Trueas and when needed during development.There's a couple of issues with the new Dash features that I've raised on their repo:
[BUG] hide_all_callbacks doesn't apply to clientside callbacks - this means it's not possible for us to use this argument, so we just manually mark all relevant callbacks as
hidden=True(which is probably the best approach for us anyway)[BUG] Dash pages callback not fully hidden - just a small problem but would be nice to fix @l0uden
Screenshot
The callback graph is still massively overwhelming in a big app, so it's best just to comment out all pages but one if you actually want to use this graph.
Example 1: one page on export data action in
hatch run example:dev.Before this PR:

After this PR

Example 2: chained actions taken from custom actions tutorial
Before this PR

After this PR

Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":