diff --git a/solara/__init__.py b/solara/__init__.py index b3ab5cb1f..c9090f320 100644 --- a/solara/__init__.py +++ b/solara/__init__.py @@ -80,7 +80,7 @@ def display(*objs, **kwargs): * [Plotly](/documentation/components/viz/plotly) * [Altair](/documentation/components/viz/altair) * [Matplotlib](/documentation/components/viz/matplotlib) - * [Dataframe](/documentation/components/viz/dataframe) + * [Dataframe](/documentation/components/data/dataframe) ```solara import solara diff --git a/solara/lab/components/tabs.py b/solara/lab/components/tabs.py index dd58c116b..75135a1bb 100644 --- a/solara/lab/components/tabs.py +++ b/solara/lab/components/tabs.py @@ -17,7 +17,7 @@ def Tab( ): """An item in a Tabs component. - (*Note: [This component is experimental and its API may change in the future](documentation/getting_started/lab).*) + (*Note: [This component is experimental and its API may change in the future](/documentation/getting_started/lab).*) Should be a direct child of a [Tabs](/documentation/components/lab/tabs). @@ -62,7 +62,7 @@ def Tabs( ): """A tabbed container showing one tab at a time. - (*Note: [This component is experimental and its API may change in the future](documentation/getting_started/lab).*) + (*Note: [This component is experimental and its API may change in the future](/documentation/getting_started/lab).*) Note that if Tabs are used as a child of the [AppBar](/documentation/components/layout/app_bar) component, the tabs will be placed under the app bar. See our [authorization app](/apps/authorization) for an example. diff --git a/solara/website/components/hero.py b/solara/website/components/hero.py index 7342158cc..974564f2f 100644 --- a/solara/website/components/hero.py +++ b/solara/website/components/hero.py @@ -10,6 +10,6 @@ def Hero(title, sub_title, button_text): with rv.Col(md=8, offset_md=2, sm=10, offset_sm=1): rv.Html(tag="h1", children=[title], class_="mb-4"), solara.HTML(tag="div", unsafe_innerHTML=f"

{sub_title}

", class_="mb-4"), - with solara.Link("/documentation/getting_started/quickstart"): + with solara.Link("/documentation/getting_started"): solara.Button(label=button_text, elevation=0, large=True, class_="btn-size--xlarge solara-docs-button") return main diff --git a/solara/website/pages/__init__.py b/solara/website/pages/__init__.py index bdcb6b14e..5a4129f3d 100644 --- a/solara/website/pages/__init__.py +++ b/solara/website/pages/__init__.py @@ -127,7 +127,7 @@ def Layout(children=[]): with solara.HBox(): with solara.Link("/documentation"): solara.Button(label="Read more", class_="ma-1 homepage-button", href="/documentation", color="primary", dark=True) - with solara.Link("/documentation/getting_started/quickstart"): + with solara.Link("/documentation/getting_started"): solara.Button(label="Quickstart", class_="ma-1 homepage-button", color="primary", dark=True) # with rv.Col(md=4, sm=5): # rv.Img(src="https://dxhl76zpt6fap.cloudfront.net/public/landing/what.webp", style_="width:900px") @@ -199,7 +199,7 @@ def Layout(children=[]): In Jupyter or standalone, and run them in production using FastAPI or starlette. - Get more inspiration from our [examples](/examples). + Get more inspiration from our [examples](/documentation/examples). """ ) with rv.ExpansionPanels(v_model=target, on_v_model=set_target, mandatory=True, flat=True): diff --git a/solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md b/solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md index c6842c96c..0fd498057 100644 --- a/solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md +++ b/solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md @@ -42,8 +42,7 @@ Solara now: * 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"). * 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"). * The first page will be the default (and its URL will be empty instead, i.e., the empty string `""`) - * 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 [default - Layout component](/api/default_layout) which includes a navigation sidebar. + * 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. * 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) Solara will render two pages: diff --git a/solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md b/solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md index 93ddb698f..cdb34ae9e 100644 --- a/solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md +++ b/solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md @@ -12,7 +12,7 @@ As a reference, we provide this "anatomy" image of our favorite `ClickButton` co * Start with `use_state` hooks and other hooks. This avoids issues with [conditional hooks](/documentation/advanced/understanding/rules-of-hooks) or hooks in loops. * Data/state flows down (to children) * Information (events, data) flows up from children via events and callbacks (`on_=my_callback`). - * If you need multiple components, use a [parent container component](/api#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! + * 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! * The body of your component (the function you wrote) is called the render function. * In between the hooks as defining all your elements, you put your custom code, like checking variables, defining callbacks, and other logic. * 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). diff --git a/solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md b/solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md index e7835c6a3..2ee418db9 100644 --- a/solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md +++ b/solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md @@ -67,7 +67,7 @@ The JSON format may be subject to change. By default, solara runs in development mode. This means, it will: - * Automatically [reload your project files](docs/reference/reloading) by watching files on the filesystemn + * Automatically [reload your project files](/documentation/getting_started/reference/reloading) by watching files on the filesystemn * Load debug version of the CSS files and JavaScript files for improved error messages (which leads to larger asset files). To disabled all of these option, pass the `--production` flag, or set the environment variable `SOLARA_MODE=production`. diff --git a/solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md b/solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md index dc0d68629..e730a6294 100644 --- a/solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md +++ b/solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md @@ -8,7 +8,7 @@ You have probably used OAuth without realizing it when signing into various onli ## Installing -To install Solara with OAuth support, make sure you have [Solara Enterprise](/docs/enterprise) install by run the following command: +To install Solara with OAuth support, make sure you have [Solara Enterprise](/documentation/advanced/enterprise) install by run the following command: ```bash $ pip install solara solara-enterprise[auth] diff --git a/solara/website/pages/documentation/advanced/content/40-development/10-setup.md b/solara/website/pages/documentation/advanced/content/40-development/10-setup.md index 936919129..a2442289c 100644 --- a/solara/website/pages/documentation/advanced/content/40-development/10-setup.md +++ b/solara/website/pages/documentation/advanced/content/40-development/10-setup.md @@ -1,6 +1,6 @@ # Development -See also [the contributing guide](/documentation/advanced/howto/contribute) for more information on how to contribute to Solara. +See also [the contributing guide](/documentation/advanced/development/contribute) for more information on how to contribute to Solara. ## Development setup 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: diff --git a/solara/website/pages/documentation/api/utilities/widget.py b/solara/website/pages/documentation/api/utilities/widget.py index e2c1728f9..25ca346fa 100644 --- a/solara/website/pages/documentation/api/utilities/widget.py +++ b/solara/website/pages/documentation/api/utilities/widget.py @@ -21,7 +21,7 @@ def widget(self, **kwargs): ``` This is very useful if you are migrating your application from a classic -ipywidget to solara. See [also the ipywidgets tutorial](/documentation/getting_started/tutorial/ipywidgets). +ipywidget to solara. See [also the ipywidgets tutorial](/documentation/getting_started/tutorials/ipywidgets). The `ipywidgets.ValueWidget` is used to enable the use of the widget in interact, or interactive. The `ipywidgets.VBox` is used to enable diff --git a/solara/website/pages/documentation/getting_started/content/01-introduction.md b/solara/website/pages/documentation/getting_started/content/01-introduction.md index 175c5f6bb..f8a218554 100644 --- a/solara/website/pages/documentation/getting_started/content/01-introduction.md +++ b/solara/website/pages/documentation/getting_started/content/01-introduction.md @@ -111,7 +111,7 @@ If you want to know what components or hooks are available, or want to know more If you feel like you miss some basic understanding and want to give a bit deeper into the what and why feel free to explore the [Understanding section](/documentation/advanced/understanding). -[Our examples](/examples) may help you see how particular problems can be solved using Solara, or as inspiration. If you want to contribute an example, contact us on GitHub or directly open a [Pull Request](https://github.com/widgetti/solara/). +[Our examples](/documentation/examples) may help you see how particular problems can be solved using Solara, or as inspiration. If you want to contribute an example, contact us on GitHub or directly open a [Pull Request](https://github.com/widgetti/solara/). ## Where can I hire an expert? diff --git a/solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb b/solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb index e27f2e703..659f518aa 100644 --- a/solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb +++ b/solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb @@ -16,7 +16,7 @@ " * You have successfully installed Solara\n", " * You know how to display a Solara component in a notebook or script\n", "\n", - "If not, please follow the [Quick start](/docs/quickstart).\n", + "If not, please follow the [Quick start](/documentation/getting_started).\n", "\n", "## Extra packages you need to install\n", "\n", @@ -85,7 +85,7 @@ "fig = px.scatter(df, \"sepal_length\", \"sepal_width\")\n", "```\n", "\n", - "To display this figure in a Solara component, we should return an element that can render the plotly figure. [FigurePlotly](/api/plotly) will do the job for us.\n", + "To display this figure in a Solara component, we should return an element that can render the plotly figure. [FigurePlotly](/documentation/components/viz/plotly) will do the job for us.\n", "\n", "Putting this together" ] @@ -133,7 +133,7 @@ "x_axis = solara.reactive(\"sepal_length\")\n", "```\n", "\n", - "This code creates a reactive variable. You can use this reactive variable in your component and pass it to a [`Select`]((/api/select)) component to control the selected column.\n", + "This code creates a reactive variable. You can use this reactive variable in your component and pass it to a [`Select`](/documentation/components/input/select) component to control the selected column.\n", "\n", "\n", "```python\n", @@ -196,7 +196,7 @@ "\n", "#### State\n", "\n", - "Understanding state management and how Solara re-renders component is crucial for understanding building larger applications. If you don't fully graps it now, that is ok. You should first get used to the pattern, and consider reading [About state management](/docs/fundamentals/state-management) later on to get a deeper understanding.\n", + "Understanding state management and how Solara re-renders component is crucial for understanding building larger applications. If you don't fully graps it now, that is ok. You should first get used to the pattern, and consider reading [About state management](/documentation/getting_started/fundamentals/state-management) later on to get a deeper understanding.\n", "\n" ] }, @@ -358,7 +358,7 @@ " return df.sort_values('distance')[1:n+1]\n", "```\n", "\n", - "We now only find the nearest neighbours if `click_data.value` is not None, and display the dataframe using the [`DataFrame`](/api/dataframe) component.\n" + "We now only find the nearest neighbours if `click_data.value` is not None, and display the dataframe using the [`DataFrame`](/documentation/components/data/dataframe) component.\n" ] }, { diff --git a/solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md b/solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md index c7521997c..fba1ef5a4 100644 --- a/solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +++ b/solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md @@ -1,6 +1,3 @@ # Reference documentation Our reference documentation informs you about how certain parts in Solara work. - -The [API docs](/api) are considered part of the reference documentation, but because of the -large content has its own page. diff --git a/solara/website/pages/showcase/__init__.py b/solara/website/pages/showcase/__init__.py index 5580ef204..9cb443662 100644 --- a/solara/website/pages/showcase/__init__.py +++ b/solara/website/pages/showcase/__init__.py @@ -9,7 +9,7 @@ def Page(): with solara.Card("Wanderlust", style={"height": "100%"}): solara.Markdown( """ - [Wanderlust](./wanderlust) is a reproduction of the travel assistant demo shown at the + [Wanderlust](/showcase/wanderlust) is a reproduction of the travel assistant demo shown at the [OpenAI DevDay](https://devday.openai.com/) 2023, built using Solara and the OpenAI Assistants API. """ )