solara 1.29.1__py2.py3-none-any.whl → 1.30.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- solara/__init__.py +5 -5
- solara/__main__.py +6 -2
- solara/autorouting.py +79 -38
- solara/cache.py +2 -2
- solara/checks.html +1 -1
- solara/components/__init__.py +1 -1
- solara/components/applayout.py +5 -5
- solara/components/button.py +4 -4
- solara/components/card.py +1 -2
- solara/components/component_vue.py +1 -1
- solara/components/cross_filter.py +6 -7
- solara/components/datatable.py +2 -3
- solara/components/figure_altair.py +1 -1
- solara/components/file_download.py +2 -2
- solara/components/file_drop.py +76 -33
- solara/components/file_drop.vue +24 -10
- solara/components/head.py +1 -2
- solara/components/head_tag.py +2 -3
- solara/components/link.py +3 -4
- solara/components/meta.py +1 -1
- solara/components/misc.py +5 -9
- solara/datatypes.py +2 -2
- solara/hooks/use_reactive.py +2 -2
- solara/lab/components/confirmation_dialog.py +1 -1
- solara/lab/components/tabs.py +6 -6
- solara/reactive.py +1 -1
- solara/routing.py +9 -8
- solara/server/app.py +44 -1
- solara/server/assets/style.css +6 -0
- solara/server/esm.py +28 -4
- solara/server/kernel_context.py +75 -7
- solara/server/patch.py +3 -0
- solara/server/reload.py +2 -2
- solara/server/server.py +3 -3
- solara/server/settings.py +1 -0
- solara/server/starlette.py +66 -33
- solara/server/static/solara_bootstrap.py +1 -1
- solara/server/templates/solara.html.j2 +62 -42
- solara/tasks.py +1 -6
- solara/util.py +23 -1
- solara/website/assets/custom.css +56 -0
- solara/website/components/__init__.py +1 -0
- solara/website/components/algolia_api.vue +157 -0
- solara/website/components/docs.py +118 -0
- solara/website/components/header.py +20 -10
- solara/website/components/hero.py +1 -1
- solara/website/pages/__init__.py +223 -20
- solara/website/pages/apps/jupyter-dashboard-1.py +1 -1
- solara/website/pages/apps/multipage/__init__.py +1 -1
- solara/website/pages/apps/multipage/page2.py +1 -1
- solara/website/pages/apps/scatter.py +21 -7
- solara/website/pages/changelog/__init__.py +8 -0
- solara/website/pages/{docs/content/95-changelog.md → changelog/changelog.md} +28 -2
- solara/website/pages/contact/__init__.py +8 -0
- solara/website/pages/documentation/__init__.py +184 -0
- solara/website/pages/documentation/advanced/__init__.py +36 -0
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +4 -5
- solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +21 -21
- solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +2 -2
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +3 -3
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +9 -9
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +1 -1
- solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +3 -3
- solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +5 -5
- solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +2 -2
- solara/website/pages/documentation/advanced/content/__init__.py +0 -0
- solara/website/pages/documentation/api/__init__.py +19 -0
- solara/website/pages/documentation/api/cross_filter/__init__.py +9 -0
- solara/website/pages/documentation/api/hooks/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/hooks}/use_effect.md +3 -3
- solara/website/pages/{api → documentation/api/hooks}/use_effect.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_memo.md +2 -2
- solara/website/pages/{api → documentation/api/hooks}/use_memo.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_reactive.py +1 -2
- solara/website/pages/{api → documentation/api/hooks}/use_state.py +1 -2
- solara/website/pages/documentation/api/routing/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/routing}/generate_routes.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/generate_routes_directory.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/use_route.py +2 -2
- solara/website/pages/{api → documentation/api/routing}/use_router.py +1 -2
- solara/website/pages/documentation/api/utilities/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/utilities}/component_vue.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/computed.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/display.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/get_kernel_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/get_session_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/on_kernel_start.py +9 -3
- solara/website/pages/{api → documentation/api/utilities}/reactive.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/widget.py +2 -2
- solara/website/pages/documentation/components/__init__.py +12 -0
- solara/website/pages/documentation/components/advanced/__init__.py +9 -0
- solara/website/pages/documentation/components/data/__init__.py +9 -0
- solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/enterprise}/avatar.py +1 -2
- solara/website/pages/{api → documentation/components/enterprise}/avatar_menu.py +1 -2
- solara/website/pages/documentation/components/input/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/input}/checkbox.py +1 -2
- solara/website/pages/documentation/components/input/file_drop.py +75 -0
- solara/website/pages/{api → documentation/components/input}/input.py +1 -2
- solara/website/pages/{api → documentation/components/input}/select.py +1 -2
- solara/website/pages/{api → documentation/components/input}/slider.py +1 -2
- solara/website/pages/{api → documentation/components/input}/switch.py +1 -2
- solara/website/pages/{api → documentation/components/input}/togglebuttons.py +1 -2
- solara/website/pages/documentation/components/lab/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/lab}/chat.py +2 -3
- solara/website/pages/{api → documentation/components/lab}/cookies_headers.py +1 -1
- solara/website/pages/{api → documentation/components/lab}/input_date.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/menu.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/task.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/theming.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/use_task.py +1 -2
- solara/website/pages/documentation/components/layout/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/layout}/app_bar.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/app_bar_title.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card_actions.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/griddraggable.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/gridfixed.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/hbox.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/vbox.py +1 -1
- solara/website/pages/documentation/components/output/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/output}/file_download.py +1 -2
- solara/website/pages/{api → documentation/components/output}/image.py +1 -2
- solara/website/pages/{api → documentation/components/output}/tooltip.py +1 -2
- solara/website/pages/documentation/components/page/__init__.py +9 -0
- solara/website/pages/documentation/components/status/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/status}/error.py +3 -3
- solara/website/pages/{api → documentation/components/status}/info.py +3 -3
- solara/website/pages/{api → documentation/components/status}/progress.py +1 -2
- solara/website/pages/{api → documentation/components/status}/spinner.py +1 -2
- solara/website/pages/{api → documentation/components/status}/success.py +3 -3
- solara/website/pages/{api → documentation/components/status}/warning.py +3 -3
- solara/website/pages/documentation/components/viz/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/viz}/plotly.py +1 -0
- solara/website/pages/{examples → documentation/examples}/__init__.py +3 -43
- solara/website/pages/{examples → documentation/examples}/general/deploy_model.py +3 -3
- solara/website/pages/{examples → documentation/examples}/general/login_oauth.py +1 -1
- solara/website/pages/{examples → documentation/examples}/general/vue_component.py +1 -2
- solara/website/pages/{examples → documentation/examples}/libraries/altair.py +2 -3
- solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet_advanced.py +1 -1
- solara/website/pages/{examples → documentation/examples}/utilities/countdown_timer.py +1 -1
- solara/website/pages/{examples → documentation/examples}/visualization/plotly.py +1 -2
- solara/website/pages/documentation/faq/__init__.py +11 -0
- solara/website/pages/{docs → documentation/getting_started}/__init__.py +7 -1
- solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +2 -2
- solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +16 -16
- solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +1 -1
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +9 -0
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +4 -4
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +9 -9
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +13 -13
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +3 -3
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_data_science.ipynb +5 -5
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +7 -0
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +2 -2
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +3 -3
- solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +3 -0
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +3 -3
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +1 -1
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +3 -0
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +3 -3
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +1 -1
- solara/website/pages/documentation/getting_started/content/__init__.py +0 -0
- solara/website/pages/showcase/__init__.py +1 -1
- solara/website/pages/showcase/domino_code_assist.py +1 -1
- solara/website/pages/showcase/solara_dev.py +1 -1
- solara/website/public/social/discord.svg +1 -0
- solara/website/public/social/github.svg +1 -0
- solara/website/public/social/twitter.svg +3 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/METADATA +8 -7
- solara-1.30.0.dist-info/RECORD +438 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/WHEEL +1 -1
- solara/website/pages/api/__init__.py +0 -292
- solara/website/pages/api/default_layout.py +0 -16
- solara/website/pages/api/file_drop.py +0 -36
- solara/website/pages/docs/content/04-tutorial/00-overview.md +0 -9
- solara/website/pages/docs/content/07-fundamentals/00-overview.md +0 -7
- solara/website/pages/docs/content/15-reference/00-overview.md +0 -6
- solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
- solara-1.29.1.dist-info/RECORD +0 -411
- /solara/website/pages/{docs/content/99-contact.md → contact/contact.md} +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +0 -0
- /solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/00-introduction.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/17-rules-of-hooks.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +0 -0
- /solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/00-overview.md +0 -0
- /solara/website/pages/{docs/content/__init__.py → documentation/advanced/content/40-development/00-overview.md} +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_dataframe.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_report.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_select.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_slider.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_cross_filter.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_dark_effective.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_exception.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_previous.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_state_or_update.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.md +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_trait_observe.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/resolve_path.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/route.py +0 -0
- /solara/website/pages/{api → documentation/api/utilities}/memoize.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/link.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/meta.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/style.py +0 -0
- /solara/website/pages/{api → documentation/components}/common.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/dataframe.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/pivot_table.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/button.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/file_browser.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/confirmation_dialog.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tab.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tabs.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/app_layout.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/column.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns_responsive.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/row.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/sidebar.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/html.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown_editor.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/sql_code.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/head.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/title.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/altair.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/echarts.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/matplotlib.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/plotly_express.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/chatbot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/tokenizer.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/sine.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/authorization.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/layout_demo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/multipage.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scatter.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scrolling.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/tutorial_streamlit.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/custom_storage.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/live_update.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/mycard.vue +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/pokemon_search.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ipycanvas.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/bqplot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/calculator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/todo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/annotator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/linked_views.py +0 -0
- /solara/website/pages/{docs → documentation/faq}/content/99-faq.md +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/10_data_science.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/60-jupyter-dashboard-part1.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/SF_crime_sample.csv.gz +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_jupyter_dashboard_1.ipynb +0 -0
- /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +0 -0
- /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +0 -0
- /solara/website/pages/{docs/content/lab → documentation/getting_started/content/08-lab}/00-what-is-lab.md +0 -0
- /solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/entry_points.txt +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
# Solara Changelog
|
|
2
2
|
|
|
3
|
+
## Version 1.29.1
|
|
4
|
+
|
|
5
|
+
### Details
|
|
6
|
+
|
|
7
|
+
* Bug Fix: Solara installation failing when using [pixi](https://pixi.sh/latest/). [#553](https://github.com/widgetti/solara/pull/553)
|
|
8
|
+
|
|
9
|
+
## Version 1.29.0
|
|
10
|
+
|
|
11
|
+
<video width="80%" controls>
|
|
12
|
+
<source src="https://solara-assets.s3.us-east-2.amazonaws.com/videos/solara-1.29-drawdata-na.mp4" type="video/mp4" >
|
|
13
|
+
</video>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Highlights
|
|
17
|
+
|
|
18
|
+
* Feature: Improved matplotlib support (pylab interface, display support) making it work more similar as in Jupyter. [#540](https://github.com/widgetti/solara/pull/540)
|
|
19
|
+
* Feature: [use_dark_effective](https://solara.dev/api/use_dark_effective) to get the effective dark mode of the app, making it easier to support dark mode on the Python side [#551](https://github.com/widgetti/solara/pull/551).
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Details
|
|
23
|
+
|
|
24
|
+
* Feature: [`/resourcez` endpoint](https://solara.dev/docs/understanding/solara-server) to get server resource statistics [#547](https://github.com/widgetti/solara/pull/547).
|
|
25
|
+
* Bug fix: router.push to external links should not use history, allowing navigation to external links [11c6094](https://github.com/widgetti/solara/commit/11c6094f3c47528d40f8be951c1d322e454f98ea).
|
|
26
|
+
* Bug fix: After upgrading widgets, solara server would still use the previous version due to browser cache [#523](https://github.com/widgetti/solara/pull/523).
|
|
27
|
+
* Bug fix: [The example todo app](https://solara.dev/examples/utilities/todo) would not work because Ref(..) did not work in combination with use_reactive [#544](https://github.com/widgetti/solara/pull/544).
|
|
28
|
+
|
|
3
29
|
## Version 1.28.0
|
|
4
30
|
|
|
5
31
|
<video width="80%" controls>
|
|
6
|
-
<source src=https://dxhl76zpt6fap.cloudfront.net/videos/solara-theme.mp4 type="video/mp4" >
|
|
32
|
+
<source src="https://dxhl76zpt6fap.cloudfront.net/videos/solara-theme.mp4" type="video/mp4" >
|
|
7
33
|
</video>
|
|
8
34
|
|
|
9
35
|
### Highlight
|
|
@@ -123,7 +149,7 @@
|
|
|
123
149
|
### Highlights
|
|
124
150
|
|
|
125
151
|
* Feature: Solara now has a production mode (enabled by passing in `--production`) which will load optimized CSS and JS and disable hot reloading.
|
|
126
|
-
Our [Solara server](https://solara.dev/
|
|
152
|
+
Our [Solara server](https://solara.dev/documentation/advanced/understanding/solara-server) page contains more information about it. If you used `--reload` or
|
|
127
153
|
`--dev` before you can now use the `-a/--auto-restart` flat. The `--dev` and `--reload` flags are kept for backwards compatibility.
|
|
128
154
|
* Feature: All `Input` components expose the `style` and `classes` arguments for custom styling.
|
|
129
155
|
* Feature: New component: [`InputDate` and `InputDateRange`](https://solara.dev/api/input_date) which use a datepicker in a menu. (#326)
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import solara
|
|
4
|
+
|
|
5
|
+
_title = "Documentation"
|
|
6
|
+
|
|
7
|
+
HERE = Path(__file__).parent
|
|
8
|
+
|
|
9
|
+
route_order = ["/", "getting_started", "examples", "components", "api", "advanced", "faq"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@solara.component_vue(str(HERE.parent.parent / "components" / "algolia_api.vue"))
|
|
13
|
+
def Algolia():
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@solara.component
|
|
18
|
+
def Page(children=[]):
|
|
19
|
+
# show a gallery of all the api pages
|
|
20
|
+
router = solara.use_router()
|
|
21
|
+
route_current = router.path_routes[-2]
|
|
22
|
+
|
|
23
|
+
with solara.Column(style={"width": "100%"}, gap="75px"):
|
|
24
|
+
if route_current.path == "documentation":
|
|
25
|
+
with solara.Column(classes=["api-search-container"], gap="50px", style={"justify-content": "center"}, align="center"):
|
|
26
|
+
solara.Markdown("# Search the Solara Documentation", style={"text-align": "center"})
|
|
27
|
+
with solara.Row(style={"width": "100%", "min-width": "20rem", "justify-content": "center", "background-color": "transparent"}):
|
|
28
|
+
Algolia()
|
|
29
|
+
with solara.Row(gap="20px", classes=["docs-card-container"]):
|
|
30
|
+
for route in route_current.children:
|
|
31
|
+
if route.path in ["/", "advanced", "faq"]:
|
|
32
|
+
continue
|
|
33
|
+
with solara.Link("/documentation/" + route.path):
|
|
34
|
+
with solara.Row(
|
|
35
|
+
classes=["docs-card"],
|
|
36
|
+
style={
|
|
37
|
+
"background-color": f"var({'--docs-color-grey' if route.path != 'getting_started' else '--color-primary'})",
|
|
38
|
+
},
|
|
39
|
+
):
|
|
40
|
+
with solara.Column(style={"height": "100%", "flex-grow": "1", "background-color": "transparent"}):
|
|
41
|
+
solara.HTML(tag="h2", unsafe_innerHTML=route.label, style={"color": "white", "padding": "1.5rem"})
|
|
42
|
+
with solara.Column(style={"justify-content": "center", "height": "100%", "background-color": "transparent"}):
|
|
43
|
+
solara.v.Icon(children=["mdi-arrow-right"], color="var(--color-grey-light)", x_large=True, class_="docs-card-icon")
|
|
44
|
+
with solara.Row(gap="75px", style={"flex-wrap": "wrap", "row-gap": "75px", "padding-bottom": "75px"}):
|
|
45
|
+
with solara.Column(style={"padding-left": "10%"}):
|
|
46
|
+
solara.HTML(tag="h2", unsafe_innerHTML="How to use our documentation:", style={"padding": "1.5rem"})
|
|
47
|
+
solara.Markdown(
|
|
48
|
+
"""
|
|
49
|
+
* [Getting Started](/documentation/getting_started) - Learn how to install Solara and get started with building your app.
|
|
50
|
+
Also includes tutorials for you to get a hang of Solara workflow.
|
|
51
|
+
* [Examples](/documentation/examples) - More complex and real world applicable examples of Solara apps.
|
|
52
|
+
For even more complexity you can see the [Showcase](/showcase) page.
|
|
53
|
+
* [Components](/documentation/components) - All the components that are available in Solara.
|
|
54
|
+
* [API](/documentation/api) - All the API functions that are available in Solara. Importantly, this includes routing and hooks.
|
|
55
|
+
* [Advanced](/documentation/advanced) - Advanced topics like associated and underlying libraries.
|
|
56
|
+
If a component you would like to use is not available in Solara, you can use the underlying library directly.
|
|
57
|
+
"""
|
|
58
|
+
)
|
|
59
|
+
with solara.Column(style={"justify-content": "center", "height": "100%"}):
|
|
60
|
+
solara.HTML(tag="h2", unsafe_innerHTML="Also Check Out", style={"padding": "1.5rem"})
|
|
61
|
+
with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
|
|
62
|
+
with solara.v.Html(tag="a", attributes={"href": "https://discord.solara.dev", "target": "_blank"}):
|
|
63
|
+
with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-discord)"}):
|
|
64
|
+
solara.v.Html(tag="img", attributes={"src": "/static/public/social/discord.svg"}, style_="height: 1.5rem; width: auto;")
|
|
65
|
+
solara.Text("We use discord to provide support and answer questions there actively.")
|
|
66
|
+
with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
|
|
67
|
+
with solara.v.Html(tag="a", attributes={"href": "https://github.com/widgetti/solara", "target": "_blank"}):
|
|
68
|
+
with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-github)"}):
|
|
69
|
+
solara.v.Html(tag="img", attributes={"src": "/static/public/social/github.svg"}, style_="height: 1.5rem; width: auto;")
|
|
70
|
+
solara.Text("Search for solutions on Github issues, or report bugs.")
|
|
71
|
+
with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
|
|
72
|
+
with solara.v.Html(tag="a", attributes={"href": "https://twitter.com/solara_dev", "target": "_blank"}):
|
|
73
|
+
with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-twitter)"}):
|
|
74
|
+
solara.v.Html(tag="img", attributes={"src": "/static/public/social/twitter.svg"}, style_="height: 1.5rem; width: auto;")
|
|
75
|
+
solara.Text("Get announcements about Solara features, showcases, and events!.")
|
|
76
|
+
|
|
77
|
+
else:
|
|
78
|
+
with solara.Column(align="center", children=children, style={"padding": "0"}):
|
|
79
|
+
pass
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@solara.component
|
|
83
|
+
def Sidebar():
|
|
84
|
+
route_current, all_routes = solara.use_route()
|
|
85
|
+
router = solara.use_router()
|
|
86
|
+
if route_current is None:
|
|
87
|
+
return solara.Error("Page not found")
|
|
88
|
+
|
|
89
|
+
with solara.v.NavigationDrawer(
|
|
90
|
+
clipped=True, width="20rem", height="unset", style_="min-height: calc(100vh - 215.5px);", class_="d-none d-md-block"
|
|
91
|
+
) as main:
|
|
92
|
+
with solara.v.List(expand=True, nav=True, style_="height: calc(100vh - 215.5px); display: flex; flex-direction: column;"):
|
|
93
|
+
with solara.v.ListItemGroup(v_model=router.path):
|
|
94
|
+
for route in all_routes:
|
|
95
|
+
if len(route.children) == 1 or route.path == "/":
|
|
96
|
+
with solara.Link("/documentation/" + route.path if route.path != "/" else "/documentation"):
|
|
97
|
+
with solara.v.ListItem(value="/documentation/" + route.path if route.path != "/" else "/documentation"):
|
|
98
|
+
if route.path == "/":
|
|
99
|
+
solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-home"])])
|
|
100
|
+
solara.v.ListItemTitle(style_="padding: 0 20px;", children=[route.label])
|
|
101
|
+
else:
|
|
102
|
+
with solara.v.ListGroup(
|
|
103
|
+
v_slots=[
|
|
104
|
+
{
|
|
105
|
+
"name": "activator",
|
|
106
|
+
"children": solara.v.ListItemTitle(
|
|
107
|
+
children=[route.label],
|
|
108
|
+
style_="padding: 0 20px;",
|
|
109
|
+
),
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
value=router.path.startswith("/documentation/" + route.path),
|
|
113
|
+
):
|
|
114
|
+
for item in route.children:
|
|
115
|
+
if item.path == "/":
|
|
116
|
+
continue
|
|
117
|
+
if item.children != [] and any([c.label is not None and c.path != "/" for c in item.children]):
|
|
118
|
+
with solara.v.ListGroup(
|
|
119
|
+
v_slots=[
|
|
120
|
+
{
|
|
121
|
+
"name": "activator",
|
|
122
|
+
"children": solara.v.ListItemTitle(
|
|
123
|
+
children=[item.label],
|
|
124
|
+
),
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
sub_group=True,
|
|
128
|
+
no_action=True,
|
|
129
|
+
value=router.path.startswith("/documentation/" + route.path + "/" + item.path),
|
|
130
|
+
):
|
|
131
|
+
for subitem in item.children:
|
|
132
|
+
# skip pages that are only used to demonstrate Link or Router usage
|
|
133
|
+
if subitem.path == "/" or subitem.label is None:
|
|
134
|
+
continue
|
|
135
|
+
path = (
|
|
136
|
+
"/documentation/" + route.path + "/" + item.path + "/" + subitem.path
|
|
137
|
+
if item.path != "fullscreen"
|
|
138
|
+
else "/apps/" + subitem.path
|
|
139
|
+
)
|
|
140
|
+
with solara.Link(
|
|
141
|
+
path,
|
|
142
|
+
):
|
|
143
|
+
with solara.v.ListItem(dense=True, style_="padding: 0 20px;", value=path):
|
|
144
|
+
solara.v.ListItemContent(
|
|
145
|
+
children=[subitem.label],
|
|
146
|
+
)
|
|
147
|
+
else:
|
|
148
|
+
with solara.v.ListItemGroup(value="/documentation/" + route.path + "/" + item.path):
|
|
149
|
+
with solara.Link(
|
|
150
|
+
"/documentation/" + route.path + "/" + item.path,
|
|
151
|
+
):
|
|
152
|
+
with solara.v.ListItem(dense=True, style_="padding: 0 20px;"):
|
|
153
|
+
solara.v.ListItemContent(
|
|
154
|
+
children=[item.label],
|
|
155
|
+
)
|
|
156
|
+
solara.v.Spacer(style_="flex-grow: 1;")
|
|
157
|
+
with solara.v.ListItemGroup():
|
|
158
|
+
with solara.Link("/contact"):
|
|
159
|
+
with solara.v.ListItem():
|
|
160
|
+
solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-email"])])
|
|
161
|
+
solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Contact"])
|
|
162
|
+
with solara.Link("/changelog"):
|
|
163
|
+
with solara.v.ListItem():
|
|
164
|
+
solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-history"])])
|
|
165
|
+
solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Changelog"])
|
|
166
|
+
|
|
167
|
+
return main
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
@solara.component
|
|
171
|
+
def Layout(children=[]):
|
|
172
|
+
route_current, all_routes = solara.use_route()
|
|
173
|
+
if route_current is None:
|
|
174
|
+
return solara.Error("Page not found")
|
|
175
|
+
|
|
176
|
+
if route_current.path == "/":
|
|
177
|
+
return Page()
|
|
178
|
+
else:
|
|
179
|
+
return Page(children=children)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@solara.component
|
|
183
|
+
def Overview():
|
|
184
|
+
pass
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import solara
|
|
4
|
+
from solara.autorouting import generate_routes_directory
|
|
5
|
+
|
|
6
|
+
title = "Advanced"
|
|
7
|
+
HERE = Path(__file__)
|
|
8
|
+
# if we didn't put the content in the subdirectory, but pointed to the current file
|
|
9
|
+
# we would include the current file recursively, causing an infinite loop
|
|
10
|
+
routes = generate_routes_directory(HERE.parent / "content")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@solara.component
|
|
14
|
+
def Page(route_external=None):
|
|
15
|
+
solara.Markdown(Path(HERE.parent / "content" / "10-howto" / "00-overview.md").read_text())
|
|
16
|
+
|
|
17
|
+
with solara.Row(justify="center", style={"flex-wrap": "wrap", "align-items": "start"}):
|
|
18
|
+
for child in route_external.children:
|
|
19
|
+
if child.path == "/":
|
|
20
|
+
continue
|
|
21
|
+
|
|
22
|
+
card_title = solara.Link("/documentation/advanced/" + child.path, children=[child.label])
|
|
23
|
+
|
|
24
|
+
with solara.Card(title=card_title, style={"min-width": "300px"}):
|
|
25
|
+
with solara.v.List():
|
|
26
|
+
with solara.v.ListItemGroup():
|
|
27
|
+
for grandchild in child.children:
|
|
28
|
+
if grandchild.path == "/":
|
|
29
|
+
continue
|
|
30
|
+
with solara.Link(
|
|
31
|
+
"/documentation/advanced/" + child.path + "/" + grandchild.path
|
|
32
|
+
if child.path != "/"
|
|
33
|
+
else "/documentation/advanced/" + grandchild.path
|
|
34
|
+
):
|
|
35
|
+
with solara.v.ListItem():
|
|
36
|
+
solara.v.ListItemTitle(children=[grandchild.label])
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The entries are meant as deeper dives into specific topics. Although we try to write each as a standalone document, some parts may build on previous ones.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Multi-page support
|
|
2
2
|
|
|
3
|
-
In the [Web App tutorial](/
|
|
3
|
+
In the [Web App tutorial](/documentation/getting_started/tutorials/web-app), we created an application consisting of a single page. Web applications generally have multiple pages, and Solara supports this as well.
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Multiple scripts
|
|
@@ -42,8 +42,7 @@ Solara now:
|
|
|
42
42
|
* Generate a nice URL by stripping of prefix, splitting the filename taking out `-`, `_` and spaces, and join them together using a `-` (e.g. "/markdown-editor").
|
|
43
43
|
* Generate a nice default title similar to the link, but now capitalize the first letter and join with a space instead (e.g. "Mardown Editor").
|
|
44
44
|
* The first page will be the default (and its URL will be empty instead, i.e., the empty string `""`)
|
|
45
|
-
* Since the first script does not define a `Layout` component, nor did we add a `__init__.py` with a `Layout` component, Solara will add a [
|
|
46
|
-
Layout component](/api/default_layout) which includes a navigation sidebar.
|
|
45
|
+
* Since the first script does not define a `Layout` component, nor did we add a `__init__.py` with a `Layout` component, Solara will add a [Layout component](/documentation/components/layout/app_layout) which includes a navigation sidebar.
|
|
47
46
|
* If a path is a directory, Solara will recursively scan the subdirectory and include it in the navigation. Read more on this in the [Layout section](layout)
|
|
48
47
|
|
|
49
48
|
Solara will render two pages:
|
|
@@ -148,7 +147,7 @@ routes = [
|
|
|
148
147
|
]
|
|
149
148
|
```
|
|
150
149
|
|
|
151
|
-
See more details in the [Route section](/
|
|
150
|
+
See more details in the [Route section](/documentation/advanced/understanding/routing).
|
|
152
151
|
|
|
153
152
|
## Dynamic pages
|
|
154
153
|
|
|
@@ -189,4 +188,4 @@ By giving the name argument a default value of `"foo"`, Solara will also accept
|
|
|
189
188
|
|
|
190
189
|
# What next?
|
|
191
190
|
|
|
192
|
-
* Also check out the [Multipage example](/
|
|
191
|
+
* Also check out the [Multipage example](/documentation/examples/fullscreen/multipage) for more inspiration.
|
|
@@ -33,29 +33,29 @@ def Page():
|
|
|
33
33
|
solara.Info("two per column on small screens, three per column on large screens")
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
[Navigate here to watch this layout in a full browser window](/
|
|
36
|
+
[Navigate here to watch this layout in a full browser window](/documentation/examples/fullscreen/layout_demo)
|
|
37
37
|
|
|
38
38
|
The key takeaways are:
|
|
39
39
|
|
|
40
|
-
* By default, Solara will wrap your component in an [AppLayout](/
|
|
41
|
-
* Room for a sidebar, that you can populate using the [Sidebar](/
|
|
42
|
-
* A toolbar showing the [Title](/
|
|
43
|
-
* Not visible here: In the case of [multiple pages](/
|
|
44
|
-
* Use [Card](/
|
|
45
|
-
* Use [Column](/
|
|
46
|
-
* Use [Columns](/
|
|
47
|
-
* Use [ColumnsResponsive](/
|
|
40
|
+
* By default, Solara will wrap your component in an [AppLayout](/documentation/components/layout/app_layout), which will give you:
|
|
41
|
+
* Room for a sidebar, that you can populate using the [Sidebar](/documentation/components/layout/sidebar) component.
|
|
42
|
+
* A toolbar showing the [Title](/documentation/components/page/title).
|
|
43
|
+
* Not visible here: In the case of [multiple pages](/documentation/advanced/howto/multipage) will include page navigation tabs. See [The multipage demo app](/documentation/examples/fullscreen/multipage) for an example.
|
|
44
|
+
* Use [Card](/documentation/components/layout/card) to put related components together with a title.
|
|
45
|
+
* Use [Column](/documentation/components/layout/column) to simply layout components under each other.
|
|
46
|
+
* Use [Columns](/documentation/components/layout/columns) if you want to have a few columns with relative sizes next to each other.
|
|
47
|
+
* Use [ColumnsResponsive](/documentation/components/layout/columns_responsive) to have the column widths respond to screen size.
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
## Changing the default layout
|
|
52
52
|
|
|
53
|
-
While [AppLayout](/
|
|
53
|
+
While [AppLayout](/documentation/components/layout/app_layout) may be sufficient in 80% of the cases. Solara provides a way to change this default layout in [Solara server](/documentation/advanced/understanding/solara-server).
|
|
54
54
|
|
|
55
55
|
You can define your own `Layout` component in the `__init__.py` file in the same directory of your app script.
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
For instance, putting the following `Layout` component in `__init__.py` will give you effectively the same [AppLayout](/
|
|
58
|
+
For instance, putting the following `Layout` component in `__init__.py` will give you effectively the same [AppLayout](/documentation/components/layout/app_layout):
|
|
59
59
|
```python
|
|
60
60
|
@solara.component
|
|
61
61
|
def Layout(children=[]):
|
|
@@ -80,7 +80,7 @@ This layout leaves every page responsible for creating its own header, footer, a
|
|
|
80
80
|
### Layout with navigation
|
|
81
81
|
|
|
82
82
|
In case you want to set up your own layout system, which sets up navigation as well, this example may get you started. It may help
|
|
83
|
-
to [understand routing](/
|
|
83
|
+
to [understand routing](/documentation/advanced/understanding/routing).
|
|
84
84
|
```python
|
|
85
85
|
@solara.component
|
|
86
86
|
def Layout(children=[]):
|
|
@@ -108,13 +108,13 @@ This is useful for larger apps where each subdirectory may add a bit of layout/c
|
|
|
108
108
|
|
|
109
109
|
## Components
|
|
110
110
|
|
|
111
|
-
The following [Container components](/
|
|
111
|
+
The following [Container components](/documentation/advanced/understanding/containers) can be used to define the layout of you app.
|
|
112
112
|
|
|
113
|
-
* [Row](/
|
|
114
|
-
* [Column](/
|
|
115
|
-
* [ColumnsResponsive](/
|
|
116
|
-
* [GridFixed](/
|
|
117
|
-
* [GridDraggable](/
|
|
118
|
-
* [VBox](/
|
|
119
|
-
* [HBox](/
|
|
120
|
-
* [AppLayout](/
|
|
113
|
+
* [Row](/documentation/components/layout/row)
|
|
114
|
+
* [Column](/documentation/components/layout/column)
|
|
115
|
+
* [ColumnsResponsive](/documentation/components/layout/columns_responsive)
|
|
116
|
+
* [GridFixed](/documentation/components/layout/gridfixed)
|
|
117
|
+
* [GridDraggable](/documentation/components/layout/griddraggable)
|
|
118
|
+
* [VBox](/documentation/components/layout/vbox) (kept for ipywidgets compatibility, please use Column)
|
|
119
|
+
* [HBox](/documentation/components/layout/hbox) (kept for ipywidgets compatibility, please use Row)
|
|
120
|
+
* [AppLayout](/documentation/components/layout/app_layout) Not often used directly, since Solara will already wrap your page in it. Sometimes re-used in a new `Layout` component.
|
|
@@ -40,4 +40,4 @@ Solara uses a cookie to implement sessions. To support cookies settings in an if
|
|
|
40
40
|
|
|
41
41
|
## Embed into an existing page
|
|
42
42
|
|
|
43
|
-
If embedding into an iframe does not suit your needs (for example, dialogs not being fullscreen), [please contact us](/
|
|
43
|
+
If embedding into an iframe does not suit your needs (for example, dialogs not being fullscreen), [please contact us](/contact) and we can discuss other options.
|
solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md
RENAMED
|
@@ -11,7 +11,7 @@ material design based widgets.
|
|
|
11
11
|
|
|
12
12
|
## Reacton and ipyvuetify
|
|
13
13
|
|
|
14
|
-
We consider ipyvuetify one of the most essential ipywidget libraries, and that is the reason why [Reacton](/
|
|
14
|
+
We consider ipyvuetify one of the most essential ipywidget libraries, and that is the reason why [Reacton](/documentation/advanced/understanding/reacton) ships with
|
|
15
15
|
generated ipyvuetify components to make your app type safe.
|
|
16
16
|
|
|
17
17
|
```solara
|
solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md
RENAMED
|
@@ -90,7 +90,7 @@ In words
|
|
|
90
90
|
1. Solara create `el = ButtonClick()` from your component.
|
|
91
91
|
1. The `display(el)` triggers the call to Reacton.
|
|
92
92
|
1. The render call enters the render phase, which will call the function body (which we call render function) of the `ButtonClick` component.
|
|
93
|
-
1. Our ButtonClick render function calls [`use_state`](/api/use_state). Because this is our first render phase, this returns the initial value (0).
|
|
93
|
+
1. Our ButtonClick render function calls [`use_state`](/documentation/api/hooks/use_state). Because this is our first render phase, this returns the initial value (0).
|
|
94
94
|
1. The ButtonClick render function returns a Button element (not a widget!) with `description="Clicked: 0 times"`.
|
|
95
95
|
1. The Reacton render call is done with the render phase, and enters the reconciliation phase, where it looks at the difference between the real widgets and the virtual widgets tree (represented by the Reacton elements). We find there is no previous widget associated with the virtual widget (or element) and decide to create a widget.
|
|
96
96
|
1. Asynchronously via the Jupyter protocol, a widget model and view are created and displayed to the user in the browser.
|
|
@@ -9,10 +9,10 @@ As a reference, we provide this "anatomy" image of our favorite `ClickButton` co
|
|
|
9
9
|
|
|
10
10
|
* Import `solara` and you also get the `reacton` namespace with it (saves typing, and finding/remembering which hooks is in which packages)
|
|
11
11
|
* Add a `@solara.component` decorator to turn your function into a component.
|
|
12
|
-
* Start with `use_state` hooks and other hooks. This avoids issues with [conditional hooks](/
|
|
12
|
+
* Start with `use_state` hooks and other hooks. This avoids issues with [conditional hooks](/documentation/advanced/understanding/rules-of-hooks) or hooks in loops.
|
|
13
13
|
* Data/state flows down (to children)
|
|
14
14
|
* Information (events, data) flows up from children via events and callbacks (`on_<some_event_name>=my_callback`).
|
|
15
|
-
* If you need multiple components, use a [parent container component](/
|
|
15
|
+
* If you need multiple components, use a [parent container component](/documentation/components/layout/app_layout) as context manager. A good default name to give this context manager is `main`. Don't forget to return it in your render function!
|
|
16
16
|
* The body of your component (the function you wrote) is called the render function.
|
|
17
17
|
* In between the hooks as defining all your elements, you put your custom code, like checking variables, defining callbacks, and other logic.
|
|
18
18
|
* The only way for a component to cause itself to rerender is to have state (using `use_state`) and change it (calling the second return value with a different value).
|
solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md
RENAMED
|
@@ -51,7 +51,7 @@ Page = FancyClickButton
|
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
Here we use an [HBox](/
|
|
54
|
+
Here we use an [HBox](/documentation/components/layout/hbox) to lay out two child components horizontally.
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
## Cleaner way to add children to containers
|
|
@@ -96,7 +96,7 @@ with some_named_context_manager() as this_is_my_name:
|
|
|
96
96
|
print("some other code")
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Where the last example assigns the context manager to a variable. In Solara we only need to do that to the top context manager, since we need to return that in our [render function](/
|
|
99
|
+
Where the last example assigns the context manager to a variable. In Solara we only need to do that to the top context manager, since we need to return that in our [render function](/documentation/advanced/understanding/anatomy).
|
|
100
100
|
|
|
101
101
|
All Reacton or Solara components return elements that can be used as context managers. Context managers allow for code to be executed before and after your code block inside of the context manager. This allows us to capture all elements created inside of the context manager. If you want to know more about context managers, consult the Python documentation since this is not Solara specific.
|
|
102
102
|
|
|
@@ -138,7 +138,7 @@ Page = FancyClickButton
|
|
|
138
138
|
Instead of returning the main container, Solara also allows you to not have a return value (or return `None`).
|
|
139
139
|
If that is the case, Solara will look at what elements you created. If you created one, that element will be taken
|
|
140
140
|
as a return value instead. If you make more than one element, those elements will be automatically wrapped by
|
|
141
|
-
a [Column](/
|
|
141
|
+
a [Column](/documentation/components/layout/column). The only benefit of returning an element, is that we can infer the correct return type,
|
|
142
142
|
which can be useful for testing purposes. Users should probably never return an element, but use the automatic
|
|
143
143
|
container feature.
|
|
144
144
|
|
|
@@ -13,15 +13,15 @@ Setting up routing can be repetitive, and therefore Solara comes also with a mor
|
|
|
13
13
|
|
|
14
14
|
### Based on a directory
|
|
15
15
|
|
|
16
|
-
Using [`generate_routes_directory(path: Path) -> List[solara.Route]:`](/api/generate_routes_directory) we can request Solara to give us a list of
|
|
16
|
+
Using [`generate_routes_directory(path: Path) -> List[solara.Route]:`](/documentation/api/routing/generate_routes_directory) we can request Solara to give us a list of
|
|
17
17
|
routes by scanning a directory for Python scripts, Notebooks and Markdown files.
|
|
18
18
|
|
|
19
|
-
This function is being used by Solara if you run solara server with a directory as argument name, as used in [our Multi Page guide](/
|
|
19
|
+
This function is being used by Solara if you run solara server with a directory as argument name, as used in [our Multi Page guide](/documentation/advanced/howto/multipage). More details can be found there.
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
### Based on a Python package
|
|
23
23
|
|
|
24
|
-
Similar to the previous section [`generate_routes(module: ModuleType) -> List[solara.Route]:`](/api/generate_routes) will return a list of routes by scanning a Python package or module for `Page` components, or `app` elements. Again, more information can be found at [our Multi Page guide](/
|
|
24
|
+
Similar to the previous section [`generate_routes(module: ModuleType) -> List[solara.Route]:`](/documentation/api/routing/generate_routes) will return a list of routes by scanning a Python package or module for `Page` components, or `app` elements. Again, more information can be found at [our Multi Page guide](/documentation/advanced/howto/multipage).
|
|
25
25
|
|
|
26
26
|
## Manually defining routes
|
|
27
27
|
|
|
@@ -59,7 +59,7 @@ routes = [
|
|
|
59
59
|
|
|
60
60
|
### Defining route components
|
|
61
61
|
|
|
62
|
-
If you do define a `Page` component, you are fully responsible for how routing is done, but we recommend using [use_route](/api/use_route).
|
|
62
|
+
If you do define a `Page` component, you are fully responsible for how routing is done, but we recommend using [use_route](/documentation/api/routing/use_route).
|
|
63
63
|
|
|
64
64
|
An example route definition could be something like this:
|
|
65
65
|
|
|
@@ -180,9 +180,9 @@ routes = [
|
|
|
180
180
|
]
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
In the case where you did not specify a `Page` component, label is used for the [Title](/
|
|
183
|
+
In the case where you did not specify a `Page` component, label is used for the [Title](/documentation/components/page/title) component.
|
|
184
184
|
|
|
185
|
-
If you need to store more data in the route, you are free to put whatever you want in the `data` attribute, see also [Route](/api/route).
|
|
185
|
+
If you need to store more data in the route, you are free to put whatever you want in the `data` attribute, see also [Route](/documentation/api/routing/route).
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
|
|
@@ -194,14 +194,14 @@ Note that all routes are relative, since a component does not know if it is embe
|
|
|
194
194
|
Therefore you should never use the `route.path` for navigation since the route object has no knowledge of the full url
|
|
195
195
|
(e.g. `/docs/basics/ipywigets`) but only knows its small piece of the pathname (e.g. `ipywidgets`)
|
|
196
196
|
|
|
197
|
-
Using [`resolve_path`](/api/resolve_path) we can request the full url for navigation.
|
|
197
|
+
Using [`resolve_path`](/documentation/api/routing/resolve_path) we can request the full url for navigation.
|
|
198
198
|
|
|
199
199
|
```python
|
|
200
200
|
def resolve_path(path_or_route: Union[str, solara.Route], level=0) -> str:
|
|
201
201
|
...
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
We can pass this full URL to the [`solara.Link`](/
|
|
204
|
+
We can pass this full URL to the [`solara.Link`](/documentation/components/advanced/link) component, e.g. like:
|
|
205
205
|
|
|
206
206
|
```python
|
|
207
207
|
@solara.component
|
|
@@ -217,7 +217,7 @@ def LinkToIpywidgets():
|
|
|
217
217
|
|
|
218
218
|
## Fully manual routing
|
|
219
219
|
|
|
220
|
-
If you want to do routing fully manually, you can use the [`solara.use_router`](/api/use_router) hook, and use the `.path` attribute.
|
|
220
|
+
If you want to do routing fully manually, you can use the [`solara.use_router`](/documentation/api/routing/use_router) hook, and use the `.path` attribute.
|
|
221
221
|
|
|
222
222
|
```python
|
|
223
223
|
import solara
|
solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md
RENAMED
|
@@ -67,7 +67,7 @@ The JSON format may be subject to change.
|
|
|
67
67
|
|
|
68
68
|
By default, solara runs in development mode. This means, it will:
|
|
69
69
|
|
|
70
|
-
* Automatically [reload your project files](
|
|
70
|
+
* Automatically [reload your project files](/documentation/getting_started/reference/reloading) by watching files on the filesystemn
|
|
71
71
|
* Load debug version of the CSS files and JavaScript files for improved error messages (which leads to larger asset files).
|
|
72
72
|
|
|
73
73
|
To disabled all of these option, pass the `--production` flag, or set the environment variable `SOLARA_MODE=production`.
|
|
@@ -8,7 +8,7 @@ You have probably used OAuth without realizing it when signing into various onli
|
|
|
8
8
|
|
|
9
9
|
## Installing
|
|
10
10
|
|
|
11
|
-
To install Solara with OAuth support, make sure you have [Solara Enterprise](/
|
|
11
|
+
To install Solara with OAuth support, make sure you have [Solara Enterprise](/documentation/advanced/enterprise) install by run the following command:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
$ pip install solara solara-enterprise[auth]
|
|
@@ -152,8 +152,8 @@ ZgrzSLUyft-JvnNMNJ2LgbCFVqcxPOatANAQhMD5EYU
|
|
|
152
152
|
|
|
153
153
|
Solara provides two convenient components for creating a user interface for login and logout:
|
|
154
154
|
|
|
155
|
-
1. [Avatar](/
|
|
156
|
-
2. [AvatarMenu](/
|
|
155
|
+
1. [Avatar](/documentation/components/enterprise/avatar): This component shows the user's avatar.
|
|
156
|
+
2. [AvatarMenu](/documentation/components/enterprise/avatar_menu): This component shows a menu with the user's avatar and a logout button.
|
|
157
157
|
|
|
158
158
|
## Python version support
|
|
159
159
|
|
|
@@ -7,8 +7,8 @@ You do not need to be a developer to contribute to Solara. We welcome all contri
|
|
|
7
7
|
|
|
8
8
|
We use [GitHub to manage issues](https://github.com/widgetti/solara/issues/new) and you should not hesitate to report any bug you find. Please include as much information as possible for us to be able to reproduce the bug. Yes, reporting a bug/issue is a contribution!
|
|
9
9
|
|
|
10
|
-
It might take a while for us to get back to you. If the bug is urgent, and you are able to provide financial support for its rapid resolution, please [contact us](/
|
|
11
|
-
If you can fix the bug yourself, please consider submitting a pull request instead, see [the development guide](/
|
|
10
|
+
It might take a while for us to get back to you. If the bug is urgent, and you are able to provide financial support for its rapid resolution, please [contact us](/contact).
|
|
11
|
+
If you can fix the bug yourself, please consider submitting a pull request instead, see [the development guide](/documentation/advanced/development/setup) for more information.
|
|
12
12
|
|
|
13
13
|
If you are unable to address the bug yourself and find it challenging to provide financial support, please be assured we are still committed to rectifying bugs and resolving issues. However, please understand that our ability to address these issues may be impacted by our resources at hand, as sustaining this project also entails financial obligations. Your patience and understanding in this matter is highly appreciated 🙇.
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ If you are unable to address the bug yourself and find it challenging to provide
|
|
|
16
16
|
|
|
17
17
|
The documentation is mostly written in Markdown, and can be found at [in the main repository](https://github.com/widgetti/solara/tree/master/solara/website/pages).
|
|
18
18
|
|
|
19
|
-
You can use the GitHub web interface to edit the files, or clone the repository and edit them locally. See [the development guide](/
|
|
19
|
+
You can use the GitHub web interface to edit the files, or clone the repository and edit them locally. See [the development guide](/documentation/advanced/development/setup) for more information.
|
|
20
20
|
|
|
21
21
|
If you locally want to render the documentation, run:
|
|
22
22
|
|
|
@@ -26,10 +26,10 @@ $ solara run solara.website.pages
|
|
|
26
26
|
|
|
27
27
|
## Examples or showcase
|
|
28
28
|
|
|
29
|
-
If you have a complete program you want to share, and you think it would be cool to be listed at [our showcase page](/showcase), [please contact us](/
|
|
29
|
+
If you have a complete program you want to share, and you think it would be cool to be listed at [our showcase page](/showcase), [please contact us](/contact).
|
|
30
30
|
|
|
31
31
|
If you want to show a particular way of using Solara that you think is very useful
|
|
32
|
-
for others, but it is not a complete program, consider adding to [the examples](/
|
|
32
|
+
for others, but it is not a complete program, consider adding to [the examples](/documentation/examples/). See [the development guide](/documentation/advanced/development/setup) for more information.
|
|
33
33
|
|
|
34
34
|
## Share your experiences and ideas
|
|
35
35
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Development
|
|
2
2
|
|
|
3
|
-
See also [the contributing guide](/
|
|
3
|
+
See also [the contributing guide](/documentation/advanced/development/contribute) for more information on how to contribute to Solara.
|
|
4
4
|
## Development setup
|
|
5
5
|
|
|
6
|
-
Assuming you have created a virtual environment as described in [the installation guide](/
|
|
6
|
+
Assuming you have created a virtual environment as described in [the installation guide](/documentation/getting_started/installing), you can install a development install of Solara using:
|
|
7
7
|
|
|
8
8
|
$ git clone git@github.com:widgetti/solara.git
|
|
9
9
|
$ cd solara
|
|
File without changes
|