iisakkirotko
SSolara
•Created by Roman on 11/5/2024 in #questions-issues
Database interaction
Hi @Roman!
This is something that we've been meaning to write tutorials on for a while, but haven't gotten around to yet. You'd probably want to do all the fetching in a
solara.Task
/ use_task
, and then write it to a reactive state so that it can be edited. After any edits are done you can again write to the database in a task. One thing to look out for is the creation of database connections, for which solara.on_kernel_start
is probably useful. Without knowing what your database setup is like, I can't give you more advice on the specifics of it.3 replies
SSolara
•Created by Mitula on 11/15/2024 in #questions-issues
Second sidebar
Hi @Mitula! You can have two sidebars, and in fact we used to have this on the solara.dev website. Should amount to using a
solara.Sidebar
on the left and manually creating solara.v.NavigationDrawer(right=True, ...)
for the right. I'm not sure about wireframes, maybe @mariobuikhuizen knows from the top of his head, otherwise I can take a look.3 replies
SSolara
•Created by popcorn8364 on 11/12/2024 in #questions-issues
iPhone mine
However, I suspect this might have something to do with our scroll eventlistener. Sometimes I see that resulting in an error for triggering too often.
8 replies
SSolara
•Created by popcorn8364 on 11/12/2024 in #questions-issues
iPhone mine
Unfortunately I didn't manage to reproduce the issue
8 replies
SSolara
•Created by popcorn8364 on 11/12/2024 in #questions-issues
iPhone mine
Yeah, I'll give it a look!
8 replies
SSolara
•Created by pnjun on 10/22/2024 in #questions-issues
Documentation on caching behaviour
Hey @pnjun! You should be able to achieve this using
.key()
on the components. Then as long as the key and the arguments don't change the component won't be recreated. Something like:
Feel free to play around with this py.cafe example6 replies
SSolara
•Created by PeterT on 10/3/2024 in #questions-issues
inputText label position
Hi @PeterT! With
solara.InputText
this is currently not supported. You can see all the configuration that is available for the ipyvuetify
/ solara.v
TextField
component here, but they also don't seem to directly support what you'd like. So I think the easiest way to do this is to define a custom component that uses an InputText
and a separate text component for label, like I've done here.3 replies
Would it be possible to build a chat
Here's a really simple example: https://py.cafe/iisakkirotko/solara-interactive-voting
5 replies
Would it be possible to build a chat
Okay. It should be possible to do either/both. I think the easiest way is to make your own message component. You can then attach a callback to the up/downvote buttons (this function should be created within the component, otherwise there's a chance for some strange behaviour like if you move
set_print
outside the loop in this py.cafe example and then call it with value=i
inside the loop).5 replies
SSolara
•Created by ntjess on 10/1/2024 in #questions-issues
Console error rendering markdown links in `solara.Markdown`
3 replies
SSolara
•Created by EdgeofChaos on 9/18/2024 in #questions-issues
Sidebar not hiding
Hi @EdgeofChaos! Seems like this is an issue with using Solara together with ipyvuetify 3. Since we are using the ipyvuetify
NavigationDrawer
component for the sidebar, and assuming that it comes from vuetify 2, we don't add the temporary
prop that is needed for the intended behaviour in vuetify 3. If you want to use the vuetify 3 one, you should create your Layout
manually. Something like
Note: solara.v
is a shortcut to reacton.ipyvuetify
, where all ipyvuetify
widgets have been converted to elements automatically. If you want to use ipyvuetify
directly, you should do something like ipyvuetify.NavigationDrawer.element(...)
.4 replies
SSolara
•Created by Helleeni on 9/13/2024 in #questions-issues
Solved: Solara example apps not working at the moment
Fix should be rolled out overnight!
6 replies
SSolara
•Created by Helleeni on 9/16/2024 in #questions-issues
Solved: Can solara.Card(title="Long title to word wrap instead of wrapping mid word")?
Hey @Helleeni! The solution is to use the CSS rule
word-break: keep-all
(or another value that isn't break-all
). There are two potential implementations:
1. use solara.v.CardTitle
:
see this py.cafe example
2. use CSS styles directly, either through solara.Style
or in the custom CSS file of your project. The rule you need is
3 replies
SSolara
•Created by fnc00 on 9/17/2024 in #questions-issues
Current best practices for deploying a solara app for testing on an ubuntu server(or other)?
Hi @fnc00! Could you elaborate a little on what you mean with deploying for testing? Are you just looking for the most convenient way to deploy, or using Solara in a CI pipeline?
9 replies
SSolara
•Created by Helleeni on 9/13/2024 in #questions-issues
Solved: Solara example apps not working at the moment
Hey @Helleeni and @smirnoffsash! Thanks for bringing this to our attention, I think this might be accidentally caused by the website upgrades. I'll take a look - hopefully we can have it fixed later today.
6 replies