Giter Site home page Giter Site logo

Comments (5)

antonymilne avatar antonymilne commented on May 17, 2024

I'll need to spend some time properly thinking this all through, since it's a tricky topic and not something we should rush. But just to note another possible idea while I remember: maybe we need another method on VizroBaseModel which enables you to instantiate and register a model in one go. This would avoid you needing to remember to manually call register after you've created a model in pre-build, but I'm not sure exactly what that register method would do.

from vizro.

antonymilne avatar antonymilne commented on May 17, 2024

Another possible solution might be to clear the managers on shutdown of the flask process. I did this in an old solution where we used to copy assets to a temporary directory. It's not super reliable (e.g. from memory there's some complexities with multiple threads), but maybe in the context of Jupyter where you're unlikely to be doing that it would work well.

from vizro.

antonymilne avatar antonymilne commented on May 17, 2024

Another idea: a global dashboard object and navigating through that hierarchy (as in the medium term solution above) might actually be a good long term solution. This would probably avoid difficulties with needing to recursively register. But then how would pre_build know what to operate on?

Or it could be Vizro.dashboard - think about comments about Dash use in #109.

from vizro.

antonymilne avatar antonymilne commented on May 17, 2024

Another point against hierarchical registration or at least in favour of keeping _items_with_type: when we implement components nested in tabs or containers, it gets harder to collect e.g. all components on the page.

Note that #142 got rid of several calls to _items_with_type that required the dashboard.

from vizro.

antonymilne avatar antonymilne commented on May 17, 2024

Closing this just so we don't have the comments spread over too many different places. #120 is a good fix for Jupyter for now, and the real issue here is much deeper than just Jupyter - will continue the conversation in #109 and #111 anyway.

from vizro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.