animusater
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
We have a Solara app which we'd like to exist at a specific URL, e.g.
http://domain.com/solara-app
. However, it doesn't seem like we can find the correct combination of SOLARA_ROOT_PATH
, SOLARA_BASE_URL
, or SOLARA_ORIGIN
to get the app served at that location. Currently, when using SOLARA_ROOT_PATH
and SOLAR_BASE_URL
, attempting to access http://domain.com/solara-app
yields a spinning loading icon and the following the console:
We have also tried attempting to mount the Solara app at the specified path in a Starlette server, which does seem to work except that our static asset files are no longer found, and the authentication through Solara Enterprise fails with Starlette complaining about missing middle ware.
Any help would be appreciated.12 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
It seems that there are two scopes for reactive variables: global, or app-level variables that seem to be shared by all users on a server; and local, component-level variables that are contained within a defined solara component. However, it's not clear how to create variables that are shared across components but are still scoped to an individual user.
Currently, we have to maintain an accessible dictionary that contains the session id and individual instances of global variables in order to share across pages/component without affecting other users.
Is there a more appropriate way to handle this use case?
10 replies
SSolara
•Created by animusater on 3/11/2024 in #questions-issues
Possible to use custom vue components in `component_vue`?
In
Voila
, it was possible to register custom vue-only components by registering them with ipyvue
, which made them available in the VuetifyTemplate
use case. Is there an analog when using Solara? That is, can I register a custom vue component, and have it available in the vue file passed to component_vue
? Registering it with ipyvue
as before does not seem to work.3 replies
SSolara
•Created by animusater on 3/7/2024 in #questions-issues
Interact with `Layout` defined in another file
In a file with a defined
Page
solara component, I can import a defined Layout
specified in another file. Just importing is enough to render the page in that layout. However, it does not seem to allow for interacting with the layout; i.e. I cannot pass a "page title" or something similar. I'm curious if it's possible to interact with the Layout
beyond being able to define the children, or if perhaps I should be inspecting the children and pulling out which elements I want for particulars parts of the layout?
For example:
4 replies
SSolara
•Created by animusater on 1/12/2024 in #questions-issues
Local cache?
What is the recommended way of storing local state between browser refreshes? I see that it's possible to use the cache storage for e.g. check box states between page refreshes, but this seems to be persistent for all users of the app. Is it possible to store browser-specific state (in
localStorage
, for example), to maintain user-specific UI state between refreshes?5 replies