Solara

S

Solara

Join the community to ask questions about Solara and get answers from other members.

Join

questions-issues

general

announcements

Trying to understand state management

If I have a reusable component with an internal state value = use_reactive(42) linked to an IntSlider and I have multiple of these components on my page, how do I then get the values of all nested slider components to e.g. use in another component? e.g. ```python @solara.component...

Can't cancel running @task?

I've got a button triggered function that executes a for loop over a data set list and makes an API call for each. I added the @task decorator to keep it from holding up the UI, and a button triggered function to cancel the task(with a running check first). However, when I trigger the task(and I can see for sure that it's running from console logs), calling the task.cancel() didn't work. I threw in some log entries to check the task state, and they all indicate that the task isn't running(pending/is_current False, not_called True). Any ideas? I'll post the code shortly, I don't get discord on the work computer, so example code is a pain to bring over....

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.

Plotly FigureWidget axes do not reset ranges within solara's render context

Upon applying an effect to set autorange=True to a figure with autorange='reversed', the Figure does not return to the original axes orientation. I'm wondering what happens behind the scenes here for the render when the use_effect is triggered. I can upload a ipynb with its expected behaviour within a jupyter context vs its behaviour in solara. The partial code (can give complete if needed). plotstate contains 2 reactives for flipx and flipy....

Interactive layout

There are a couple of defunt projects out there like jupyter-flex and jupyter-dashboard for creating user dashboards in Voila. Is there an easy to do create flexlayout interactive dashboards in Reacton/Solara?

Using vue libraries with ipyvuetify & solara

Is it naive to think vuepdf should work out of the box with a ipyvuetify template? I've stripped the code to its bare minimum, it should show a single pdf page from the url. My code isnt showing errors but it also isn't showing a pdf. vue_pdf.vue...

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: ``` layout.py...

use_thread eats logs?

When an exception is thrown in a function run from use_thread it seems I don't get any log (logging using structlog), I see there is an error state in the use_thread is there a way to get logging from that?

Current theme?

Is there any way of getting the current theme used by the solara application?

Primary colour used by Solara

Hi all, I have been using an assets file and this code to change the primary colour of solara to green (see code): ```vuetifyThemes = { light: { primary: '#017F36', // cyanocapture green (from logo)...
No description

Unable to trigger re-render after updating reactive state

Hi. I'm trying to render a dataframe using the following code: ```python...
No description

cross-filtering ipyaggrid element in Solara

Hi, is there a way to cross filter a ipyaggrid element in solara based on other Solara components (Sliders, Select, etc)? I tried creating a custom solara.CrossFilterGrid similar to solara.CrossFilterDataFrame. I could not get it to work but maybe I am missing something. Here is my reproducible example ```python import ipyaggrid import plotly.express as px...

ipymolstar (anywidget) in solar app

I'm trying to put the ipymolstar PDBemolstar widget in a solara app. (https://github.com/Jhsmit/ipymolstar; use master branch, release is broken) this works: ```...

Ipyreactplayer not working in Solara - New Try

Hi, i've created an interactive videoplayer using ipyreact and reactplayer. It works everywhere (notebook, lab, voila, colab) but not in Solara. Ill want to give it a new shot as Solara is so nice and thats the last part missing in my app. https://github.com/widgetti/solara/issues/333 I tested the player with the same Video on Youtube...

Conditional Hook issues

I have a fair sized data set, and I have a switch that's on by default to not display a portion of the data to the UI.
Turning off the switch works as expected, causing the filtered data to be displayed, but if I toggle the switch back on, I get a conditional hooks runtime error because there are less effects in the render loop, but this is expected. Any suggestions on how to get around this?...

Quickstart server not rendering any components

Hi all, apologies if this is a very basic question. I am running through the quickstart for solara on the website: https://solara.dev/docs/quickstart; however, I'm running into an issue where once I run the example sol.py file and go to http://localhost:8765/ on my local computer, there seems to be nothing rendered as it is just a blank page. Looking at the browser logs it seems that the server is returning a 404 response as seen in the sreenshot attached. Pinging the server at curl http://localhost:8765/readyz results in a 200 OK response. Furthermore, running solara with logs such as solara run --log-level debug sol.py does not seem to yield any particular useful information. I am running with the following versions: solara-1.27.0 ipyvuetify-1.8.10 ipywidgets-8.0.4 Python 3.8.18...
No description

Subscribing to reactive variable changes

I see there are subscribe and subscribe_change methods on Reactive, but I don't see how best to use them and what is the difference between them? If I wanted to e.g. trigger validation on value input, what should I use?

How to edit/remove loading page effect?

How to edit/remove this loading page effect?
No description

Help: Auth Redirect to a new page

I'd like for my application to start on the auth0 login url rather than a solara page if the user is not authenticated. The example for solara auth involves a Button redirect to the login_url ```python @solara.component...

Help: Drawing a rectangle on an ipyleaflet map

Trying to create an ipyleaflet component but the state and view management is a bit over my head. Does anyone have experience in creating a component that updates a "bounding_boxes" reactive element?