Skip to content

Commit

Permalink
fix: links
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Mar 11, 2024
1 parent e5757ca commit dc567f7
Show file tree
Hide file tree
Showing 66 changed files with 316 additions and 207 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This is the old changelog, check the [Solara website](https://solara.dev/docs/changelog) for the up to date changelog.
This is the old changelog, check the [Solara website](https://solara.dev/changelog) for the up to date changelog.

## Changelog for solara v1.22

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please go to https://solara.dev/docs/howto/contribute for more information.
Please go to https://solara.dev/documentation/advanced/development/contribute for more information.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Run:
pip install solara
```

Or follow the [Installation instructions](https://solara.dev/docs/installing) for more detailed instructions.
Or follow the [Installation instructions](https://solara.dev/documentation/getting_started/installing) for more detailed instructions.

## First script

Expand Down Expand Up @@ -73,7 +73,7 @@ Solara server is starting at http://localhost:8765
Or copy-paste this to a Jupyter notebook cell and execute it (the `Page()` expression at the end
will cause it to automatically render the component in the notebook).

See this snippet run live at https://solara.dev/docs/quickstart
See this snippet run live at https://solara.dev/documentation/getting_started

## Demo

Expand All @@ -100,7 +100,7 @@ By building on top of ipywidgets, we automatically leverage an existing ecosyste

Visit our main website or jump directly to the introduction

[![Introduction](https://dabuttonfactory.com/button.png?t=Introduction&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/docs)
[![Quickstart](https://dabuttonfactory.com/button.png?t=Quickstart&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/docs/quickstart)
[![Introduction](https://dabuttonfactory.com/button.png?t=Introduction&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/documentation)
[![Quickstart](https://dabuttonfactory.com/button.png?t=Quickstart&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/documentation/getting_started)

*Note that the solara.dev website is created using Solara*
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def Page():
solara.Button("Logout", icon_name="mdi-logout", href=auth.get_logout_url())
```
Note that a common use case is to put the avatar in the [AppBar](/api/app_bar).
Note that a common use case is to put the avatar in the [AppBar](/documentation/components/layout/app_bar).
```solara
import solara
from solara_enterprise import auth
Expand Down
8 changes: 4 additions & 4 deletions solara/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def display(*objs, **kwargs):
However, if you require callback functions, use the specific Solara components, e.g.:
* [Plotly](/api/plotly)
* [Altair](/api/altair)
* [Matplotlib](/api/matplotlib)
* [Dataframe](/api/dataframe)
* [Plotly](/documentation/components/viz/plotly)
* [Altair](/documentation/components/viz/altair)
* [Matplotlib](/documentation/components/viz/matplotlib)
* [Dataframe](/documentation/components/viz/dataframe)
```solara
import solara
Expand Down
2 changes: 1 addition & 1 deletion solara/checks.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const div = document.createElement("div")
const div2 = document.createElement("div")
div.innerHTML = `Run <code>${jupyter_python_executable} -m pip install ${needsInstall.join(" ")}</code>. Refresh the page after installation.`
div2.innerHTML = `Visit <a href="https://solara.dev/docs/troubleshoot" target="_blank">https://solara/dev/docs/troubleshoot</a> for more information.`
div2.innerHTML = `Visit <a href="https://solara.dev/documentation/getting_started/troubleshoot" target="_blank">https://solara/dev/documentation/getting_started/troubleshoot</a> for more information.`
rootEl.appendChild(div)
rootEl.appendChild(div2)
}
Expand Down
8 changes: 4 additions & 4 deletions solara/components/applayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def AppBar(children=[]):
This component does not need to be a direct child of the AppLayout, it can be at any level in your component tree.
If a [Tabs](/api/tabs) component is used as direct child of the app bar, it will be shown under the app bar.
If a [Tabs](/documentation/components/lab/tabs) component is used as direct child of the app bar, it will be shown under the app bar.
## Example showing an app bar
```solara
Expand Down Expand Up @@ -204,8 +204,8 @@ def AppLayout(
):
"""The default layout for Solara apps. It consists of an toolbar bar, a sidebar and a main content area.
* The title of the app is set using the [Title](/api/title) component.
* The sidebar content is set using the [Sidebar](/api/sidebar) component.
* The title of the app is set using the [Title](/documentation/components/page/title) component.
* The sidebar content is set using the [Sidebar](/documentation/components/layout/sidebar) component.
* The content is set by the `Page` component provided by the user.
This component is usually not used directly, but rather through via the [Layout system](/documentation/advanced/howto/layout).
Expand All @@ -224,7 +224,7 @@ def AppLayout(
* `children`: The children of the AppLayout. The first child is used as the sidebar content, the rest as the main content.
* `sidebar_open`: Whether the sidebar is open or not.
* `title`: The title of the app shown in the app bar, can also be set using the [Title](/api/title) component.
* `title`: The title of the app shown in the app bar, can also be set using the [Title](/documentation/components/page/title) component.
* `toolbar_dark`: Whether the toolbar should be dark or not.
* `navigation`: Whether the navigation tabs based on routing should be shown.
* `color`: The color of the toolbar.
Expand Down
8 changes: 4 additions & 4 deletions solara/components/button.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from typing import Callable, Dict, List, Optional, Union

from reacton import ipyvue
from reacton import ipyvuetify as v

import solara
import solara.util
from reacton import ipyvue
from reacton import ipyvuetify as v


@solara.component
Expand Down Expand Up @@ -51,7 +50,8 @@ def Page():
- `disabled`: Whether the button is disabled.
- `text`: Whether the button should be displayed as text, it has no shadow and no background.
- `outlined`: Whether the button should be displayed as outlined, it has no background.
- `value`: (Optional) When used as a child of a ToggleButtons component, the value of the selected button, see [ToggleButtons](/api/togglebuttons).
- `value`: (Optional) When used as a child of a ToggleButtons component, the value of the selected button, see
[ToggleButtons](/documentation/components/input/togglebuttons).
- `classes`: Additional CSS classes to apply.
- `style`: CSS style to apply.
Expand Down
3 changes: 1 addition & 2 deletions solara/components/card.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Dict, List, Optional, Union

import reacton.ipyvuetify as v

import solara
from solara.util import _combine_classes

Expand Down Expand Up @@ -79,7 +78,7 @@ def Page():
def CardActions(children: List[solara.Element] = []):
"""Container for actions in a card.
See [Card](/api/card) for an example.
See [Card](/documentation/components/layout/card) for an example.
# Arguments
Expand Down
13 changes: 6 additions & 7 deletions solara/components/cross_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

import ipyvuetify
import reacton.ipyvuetify as v
import traitlets

import solara
import traitlets
from solara import CellAction, ColumnAction

from ..lab.hooks.dataframe import use_df_column_names
Expand Down Expand Up @@ -55,7 +54,7 @@ def CrossFilterSelect(
):
"""A Select widget that will cross filter a DataFrame.
See [use_cross_filter](/api/use_cross_filter) for more information about how to use cross filtering.
See [use_cross_filter](/documentation/api/hooks/use_cross_filter) for more information about how to use cross filtering.
## Arguments
Expand Down Expand Up @@ -170,7 +169,7 @@ def CrossFilterReport(df, classes: List[str] = []):
Shows number of rows filtered, and the total number of rows.
See [use_cross_filter](/api/use_cross_filter) for more information about how to use cross filtering.
See [use_cross_filter](/documentation/api/hooks/use_cross_filter) for more information about how to use cross filtering.
## Arguments
Expand Down Expand Up @@ -214,7 +213,7 @@ def CrossFilterSlider(
):
"""A Slider widget that will cross filter a DataFrame.
See [use_cross_filter](/api/use_cross_filter) for more information about how to use cross filtering.
See [use_cross_filter](/documentation/api/hooks/use_cross_filter) for more information about how to use cross filtering.
## Arguments
Expand Down Expand Up @@ -318,9 +317,9 @@ def update_filter():
def CrossFilterDataFrame(df, items_per_page=20, column_actions: List[ColumnAction] = [], cell_actions: List[CellAction] = [], scrollable=False):
"""Display a DataFrame with filters applied from the cross filter.
This component wraps [DataFrame](/api/dataframe).
This component wraps [DataFrame](/documentation/components/data/dataframe).
See [use_cross_filter](/api/use_cross_filter) for more information about how to use cross filtering.
See [use_cross_filter](/documentation/api/hooks/use_cross_filter) for more information about how to use cross filtering.
# Arguments
Expand Down
5 changes: 2 additions & 3 deletions solara/components/datatable.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

import ipyvuetify as v
import ipywidgets
import traitlets

import solara
import solara.hooks.dataframe
import solara.lab
import traitlets
from solara.lab.hooks.dataframe import use_df_column_names
from solara.lab.utils.dataframe import df_type

Expand Down Expand Up @@ -208,7 +207,7 @@ def Page():
* `cell_actions` - Triggered via clicking on the triple dot icon in the cell (visible when hovering).
* `on_column_header_hover` - Optional callback when the user hovers over the triple dot icon on a header.
* `column_header_info` - Element to display in the column menu popup (visible when hovering), provide an
empty container element (like [Column](/api/column)) to force showing the trigle dot icon (see example).
empty container element (like [Column](/documentation/components/layout/column)) to force showing the trigle dot icon (see example).
"""
return DataTable(
Expand Down
3 changes: 1 addition & 2 deletions solara/components/head.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from typing import List

import reacton

import solara


@reacton.component
def Head(children: List[reacton.core.Element] = []):
"""A component that manager the "head" tag of the page to avoid duplicate tags, such as titles.
Currently only supports the [title](/api/title) tag as child, e.g.:
Currently only supports the [title](/documentation/components/page/title) tag as child, e.g.:
```python
import solara
Expand Down
5 changes: 2 additions & 3 deletions solara/components/head_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import ipyvuetify as vy
import reacton.core
import traitlets

import solara
import traitlets


class HeadTagWidget(vy.VuetifyTemplate):
Expand All @@ -19,7 +18,7 @@ class HeadTagWidget(vy.VuetifyTemplate):
def HeadTag(tagname: str, key=None, attributes: Optional[dict] = None):
"""Add a child element to head element, or replace a meta tag with the same tagname and key.
This component should be used inside a [Head](/api/head) component, e.g.:
This component should be used inside a [Head](/documentation/components/page/head) component, e.g.:
```python
import solara
Expand Down
3 changes: 1 addition & 2 deletions solara/components/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ipyvue as vue
import reacton.ipyvue as vuer

import solara


Expand Down Expand Up @@ -32,7 +31,7 @@ def Link(
## Arguments
* path_or_route: the path or route to navigate to. Paths should be absolute, e.g. '/fruit/banana'.
If a route is given, [`resolve_path`](/api/resolve_path)] will be used to resolve to the absolute path.
If a route is given, [`resolve_path`](/documentation/api/routing/resolve_path)] will be used to resolve to the absolute path.
* children: the children of the link. If a child is clicked, the link will be followed.
* nofollow: If True, the link will not be followed by web crawlers (such as google).
* style: CSS styles to apply to the HTML link element. Either a string or a dictionary.
Expand Down
2 changes: 1 addition & 1 deletion solara/components/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def Meta(name: Optional[str] = None, property: Optional[str] = None, content: Optional[str] = None):
"""Add a meta tag to the head element, or replace a meta tag with the same name and or property.
This component should be used inside a [Head](/api/head) component, e.g.:
This component should be used inside a [Head](/documentation/components/page/head) component, e.g.:
```python
import solara
Expand Down
14 changes: 5 additions & 9 deletions solara/components/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import reacton
import reacton.ipyvuetify as v

import solara
import solara.widgets
from solara.util import _combine_classes
Expand Down Expand Up @@ -159,7 +158,7 @@ def HBox(children=[], grow=True, align_items="stretch", classes: List[str] = [])
def Row(children=[], gap="12px", justify="start", margin: int = 0, classes: List[str] = [], style: Union[str, Dict[str, str], None] = None):
"""Lays out children in a row, side by side, with the given gap between them.
See also [Column](/api/column).
See also [Column](/documentation/components/layout/column).
Example with three children side by side:
Expand Down Expand Up @@ -200,7 +199,7 @@ def Page():
def Column(children=[], gap="12px", align="stretch", margin: int = 0, classes: List[str] = [], style: Union[str, Dict[str, str], None] = None):
"""Lays out children in a column on top of each other, with the given gap between them.
See also [Row](/api/row).
See also [Row](/documentation/components/layout/row).
Example with three children on top of each other:
Expand Down Expand Up @@ -287,17 +286,14 @@ def on_points_callback(data):
"plotly_hover": on_hover,
"plotly_unhover": on_unhover,
"plotly_selected": on_selection,
"plotly_deselect": on_deselect
"plotly_deselect": on_deselect,
}

callback = event_mapping.get(event_type)
if callback:
callback(data)

fig_element = FigureWidget.element(
on__js2py_pointsCallback=on_points_callback,
on__js2py_relayout=on_relayout
)
fig_element = FigureWidget.element(on__js2py_pointsCallback=on_points_callback, on__js2py_relayout=on_relayout)

def update_data():
fig_widget: FigureWidget = solara.get_widget(fig_element)
Expand Down
2 changes: 1 addition & 1 deletion solara/hooks/use_reactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def MyComponent(value: Union[T, solara.Reactive[T]],
except RuntimeError as e:
raise RuntimeError(
"use_reactive must be called from a component function, inside the render function.\n"
"Do not call it top level, use [solara.reactive()](https://solara.dev/api/reactive) instead."
"Do not call it top level, use [solara.reactive()](https://solara.dev/documentation/api/utilities/reactive) instead."
) from e
on_change_ref.current = on_change

Expand Down
8 changes: 4 additions & 4 deletions solara/lab/components/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def Tab(
(*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](/api/tabs).
Should be a direct child of a [Tabs](/documentation/components/lab/tabs).
## Arguments
* `label`: The label of the tab.
Expand Down Expand Up @@ -64,10 +64,10 @@ def Tabs(
(*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](/api/appbar) component, the tabs
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.
If the children [Tab](/api/tab) elements are passed a `path_or_route` argument, the active tab
If the children [Tab](/documentation/components/lab/tab) elements are passed a `path_or_route` argument, the active tab
will be based on the path of the current page.
Expand All @@ -89,7 +89,7 @@ def Page():
### Tabs with content
This is usually only used when the tabs are placed in the [AppBar](/api/appbar) component.
This is usually only used when the tabs are placed in the [AppBar](/documentation/components/layout/app_bar) component.
```solara
import solara
Expand Down
2 changes: 1 addition & 1 deletion solara/reactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def reactive(value: T) -> Reactive[T]:
Solara web applications. They provide an easy-to-use mechanism for keeping
track of the changing state of data and for propagating those changes to
the appropriate UI components. For managing local or component-specific
state, consider using the [`solara.use_state()`](/api/use_state) function.
state, consider using the [`solara.use_state()`](/documentation/api/hooks/use_state) function.
Reactive variables can be accessed using the `.value` attribute. To modify
Expand Down
Loading

0 comments on commit dc567f7

Please sign in to comment.