You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a marimo.settings, to control or only read the settings if controlling setting in cell will interrupt the notebook.
Suggested solution
Why this feature can be useful:
We can use the value of marimo.settings.width, marimo.setting.theme, etc to render some ui.
for instance, plotly, when specifying a figure's layout, we can do the following:
template='plotly_dark` if marimo.settings.theme == 'dark' else 'plotly_white'
fig.update_layout(
template=template
)
then we can get a dark plotly figure in dark mode and a light one in light mode
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
@metaboulie - i updated the title to add marimo.app_meta.theme. We can think about adding more settings there over time for specific use-cases
For the implementor:
We have something already called AppMetadata. That is currently an internal class that we probably don't want to expose everything in there. So we can rename that, or come up with another name for what marimo.app_meta is
Description
Add a
marimo.settings
, to control or only read the settings if controlling setting in cell will interrupt the notebook.Suggested solution
Why this feature can be useful:
We can use the value of
marimo.settings.width
,marimo.setting.theme
, etc to render some ui.for instance, plotly, when specifying a
figure
's layout, we can do the following:then we can get a dark plotly figure in dark mode and a light one in light mode
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: