Skip to content
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

FastGridTemplate support for dynamic(on-the-fly) addition to widgets/components #7652

Open
dhvs19 opened this issue Jan 22, 2025 · 0 comments

Comments

@dhvs19
Copy link

dhvs19 commented Jan 22, 2025

Hello,

Context:

While exploring OpenBB (python app that freely mimics Bloomberg terminal), more specifically the GUI it caught to my attention that the main area of the app resembles a lot what is offered by FastGridTemplate/EditableTemplate, but with an important key difference, if we right-click on the main area, a context menu is displayed with some options, being one of them the possibility to add more widgets on-the-fly.

This is a nice thing to have and is an important drawback of FastGridTemplate (or any other template, for what I've understood).

From FastGridTemplate's documentation (https://panel.holoviz.org/reference/templates/FastGridTemplate.html) we can read the following:

" ... Unlike other layout components however, the contents of the areas is fixed once rendered. If you need a dynamic layout you should therefore insert a regular Panel layout component (e.g. a Column or Row) and modify it in place once added to one of the content areas."

Why this is a big drawback:

_ In my opinion this caps enormously the capabilities for the user build a proper EDA tool using FastGridTemplate. If you give a try on OpenBB GUI you will understand better than I describe here by words.

Your proposed solutions:

  • Solution 1: "insert a regular Panel layout component" : doing this is not the same as described as FastGridTemplate features.

"Just like the ReactTemplate it is built on the react-grid-layout ( to provide a drag-and-drop interface for resizing and rearranging components on a grid"

Indeed if I add a column then I can append to it on the fly, but what is appended inside the column do not inherit the promised features of resizing and rearranging, neither the full-screen capability, instead the column/row as that capability, not being useful at all.

  • Solution 2: I've also seen someone in Holoviz forum mentioning to try GridStack/Spec as an alternative. However It clearly doesn't reproduce the FastGridTemplate capabilities. First the cards doesn't stack to where we want, at least not in the same way that FastGridTempalte does it. Second we lose the capabilities to make the card of the GridStack/Spec full-screen ... I don't know JavaScript, if I knew it I would not use Python to implement a web app.

If you think that this feature doesn't make sense to be part of the FastGridTemplate, at least make it possible on the EditableTemplate ... since like the name says and if you are able to close/remove components/widgets in the main area, then why you cannot add them back (without refresh the page).

In last resort, propose a good code example to the users on how to replicate the FastGridTemplate/EditableTemplate capabilities using the Layouts instead Templates. Because neither using the OpenAI o1/ Sonnet 3.5 models etc to code for us an example, they manage to achieve it successfuly.

Finally I want to give a big compliment to the team (specially Mark) for all the effort that you put on this library and try to push for it's adoption, but you need to put on Youtube more people using it, exemplifying use cases and how to do nice and sophisticated apps. Most of Streamlit success is not their capabilities (Panel is much superior) but the "promotion"/examples of it in Youtube.

Best Regards,

Daniel Santos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant