Georgios Varnavides
Georgios Varnavides
Mmarimo
Created by kejtos on 10/24/2024 in #help-support
How to inject custom css into wasm notebook?
Ah, my bad! If islands styling can also be added on the roadmap at some point that would be much appreciated 😅
6 replies
Mmarimo
Created by kejtos on 10/24/2024 in #help-support
How to inject custom css into wasm notebook?
With WASM notebooks do you mean marimo islands? If so I believe they’re encapsulated in a shadow DOM so global CSS variables won’t affect it 🤷‍♂️
6 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
for now, I'll probably style the UI elements directly in the notebook (using e.g. mo.ui.slider().style())
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
thanks!
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
seems like that check isn't being resolved in the second constructed stylesheet
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
but inside the #shadow-root those get overwritten by a constructed stylesheet (presumably you're using something like CSSStyleSheet to inherit styles into the shadow DOM?)
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
inspecting the elements, suggests that right before the #shadow-root the properties are set by the external stylesheet
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
minimal file to reproduce
import marimo

__generated_with = "0.7.21-dev18"
app = marimo.App()


@app.cell
def __():
import marimo as mo
return mo,


@app.cell
def __(mo):
mo.md("Hello")
return


@app.cell
def __(mo):
mo.ui.slider(start=0,stop=10,label="slider",show_value=True)
return


@app.cell
def __():
return


if __name__ == "__main__":
app.run()
import marimo

__generated_with = "0.7.21-dev18"
app = marimo.App()


@app.cell
def __():
import marimo as mo
return mo,


@app.cell
def __(mo):
mo.md("Hello")
return


@app.cell
def __(mo):
mo.ui.slider(start=0,stop=10,label="slider",show_value=True)
return


@app.cell
def __():
return


if __name__ == "__main__":
app.run()
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
No description
12 replies
Mmarimo
Created by Georgios Varnavides on 8/21/2024 in #help-support
Marimo Islands dark mode?
oh I see - it does affect markdown output, but not ui elements (perhaps cz they're inside a shadow DOM?)
12 replies
Mmarimo
Created by Georgios Varnavides on 7/18/2024 in #help-support
Programmatic way to detect theme (light/dark mode)?
Next couple of weeks are rather hectic, but I’ll see if I can find time and take this issue!
6 replies
Mmarimo
Created by Georgios Varnavides on 7/18/2024 in #help-support
Programmatic way to detect theme (light/dark mode)?
Oh oops, apologies for not searching the issues first— discord is making me lazy 😬
6 replies
Mmarimo
Created by Georgios Varnavides on 7/13/2024 in #help-support
Recommended way for self-triggering computation / semi-infinite loop?
hmm, trying to think how exactly 🤔 I'd still need to mutate state for the iteration of the sort x_{n+1} = f[x_n] right?
13 replies
Mmarimo
Created by Georgios Varnavides on 7/13/2024 in #help-support
Recommended way for self-triggering computation / semi-infinite loop?
wow, that doesn't seem to bother it either haha
def raise_(val):
if not val:
raise ValueError()

infinite_loop = mo.ui.switch(
False,
label="infinite loop",
on_change=lambda v: raise_(v)
)
def raise_(val):
if not val:
raise ValueError()

infinite_loop = mo.ui.switch(
False,
label="infinite loop",
on_change=lambda v: raise_(v)
)
13 replies
Mmarimo
Created by Georgios Varnavides on 7/13/2024 in #help-support
Recommended way for self-triggering computation / semi-infinite loop?
I wondered if the on_change parameter of the mo.ui.switch input could be used to emit some sort of event to break the set/get cycle, but not sure what that would be
13 replies
Mmarimo
Created by Georgios Varnavides on 7/13/2024 in #help-support
Recommended way for self-triggering computation / semi-infinite loop?
Not sure that's the issue? like I can get set/get to loop infinitely just fine. I just want a way to kill that once it's running. The following doesn't seem to work
mo.stop(not infinite_loop.value)
expensive_computation()
mo.stop(not infinite_loop.value)
expensive_computation()
playground here: https://marimo.app/?slug=19s2hr
13 replies
Mmarimo
Created by Georgios Varnavides on 7/13/2024 in #help-support
Recommended way for self-triggering computation / semi-infinite loop?
I played around with include_self and it doesn't seem to help (in-fact presumably the default False is designed to capture this infinite-loop behaviour?)
13 replies
Mmarimo
Created by Georgios Varnavides on 5/21/2024 in #archived-help-and-support
marimo | a next-generation Python notebo...
thanks!
7 replies
Mmarimo
Created by Georgios Varnavides on 5/21/2024 in #archived-help-and-support
marimo | a next-generation Python notebo...
nvm - you beat me to the PR
7 replies
Mmarimo
Created by Georgios Varnavides on 5/21/2024 in #archived-help-and-support
marimo | a next-generation Python notebo...
oh lol, apparently dev gets re-deployed at each commit on main https://pyodide.org/en/stable/usage/downloading-and-deploying.html
7 replies