Do we need shared pages? #158
Closed
falkoschindler
started this conversation in
General
Replies: 2 comments
-
Well, I have an UI for some app settings. I started it when the pages were shared by default, so I kept it that way so far. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok. In NiceGUI 1.0 we removed shared pages almost entirely. Only elements which are not written inside a page-decorated function are shared between clients. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The original idea of NiceGUI was to build an easy-to-use GUI framework that runs in a web browser. There was only one UI state shared across all connected clients. With added support for pages the need for "individual" or "private" pages came up. But the 3-line hello-world example should still be possible, which is why NiceGUI automatically creates an index page if there are UI elements in global scope. So beginners don't have to care about page decorators.
With upcoming NiceGUI version 1.0 we want to start building on FastAPI to make building fully featured web applications in Python even easier. Automatic index pages will remain. And individual pages will be the default - as they are already in the current version 0.9.25.
The question is: Do we still need shared pages? Do we ever want to share the UI state across browsers, e.g. seeing a dialog or drop-down menu magically opening for all connected clients? Or does the UI bind to global state anyway, so that the UI elements themselves can be re-created per client?
What are your use-cases? @me21, you seem to work with shared pages (#155). Is it a core feature you're relying on or is switching to individual pages an option?
Beta Was this translation helpful? Give feedback.
All reactions