Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs enhancement #127

Merged
merged 12 commits into from
Apr 30, 2024
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The UIX library is designed with a modular approach that makes it easy for deve

**Main features**
* [Cross-network reactivity](./docs/manual/02%20Cross-Realm%20Imports.md#Reactivity)
* [Server side rendering with partial hydration](./docs/manual/07%20Rendering%20Methods.md)
* [Server side rendering with partial hydration](./docs/manual/08%20Rendering%20Methods.md)
* [Hybrid backend/frontend routing](./docs/manual/05%20Entrypoints%20and%20Routing.md)
* [Cross-realm imports](./docs/manual/02%20Cross-Realm%20Imports.md)
* [Shared memory](./docs/manual/02%20Cross-Realm%20Imports.md#Synchronization)
Expand All @@ -37,9 +37,9 @@ UIX aims to simplify all phases of the app development cycle, including design,
This is why UIX ships with integrated features such as:
* Hot reloading
* [Testing library](https://github.com/unyt-org/unyt-tests/)
* [Stage management](./docs/manual/08%20Configuration.md#app-deployment-stages)
* [Stage management](./docs/manual/09%20Configuration.md#app-deployment-stages)
* Version management
* [Automated deployment](./docs/manual/13%20Deployment.md)
* [Automated deployment](./docs/manual/15%20Deployment.md)

## Documentation

Expand All @@ -53,17 +53,20 @@ This is why UIX ships with integrated features such as:
4. [Components](./docs/manual/04%20Components.md)
5. [Entrypoints and Routing](./docs/manual/05%20Entrypoints%20and%20Routing.md)
6. [Component States](./docs/manual/06%20Component%20States.md)
7. [Rendering Methods](./docs/manual/07%20Rendering%20Methods.md)
8. [Configuration](./docs/manual/08%20Configuration.md)
9. [Localization](./docs/manual/09%20Localization.md)
10. [Functions and Contexts](./docs/manual/10%20Functions%20and%20Contexts.md)
11. [Styles and Themes](./docs/manual/11%20Styles%20and%20Themes.md)
12. [Shadow DOM](./docs/manual/12%20Shadow%20DOM.md)
13. [Utility Functions](./docs/manual/13%20Utility%20Functions.md)
14. [Deployment](./docs/manual/14%20Deployment.md)
15. [HTTP Tunneling](./docs/manual/15%20HTTP%20Tunneling.md)
16. [Plugins](./docs/manual/16%20Plugins.md)
17. [Tutorials](./docs/manual/17%20Tutorials.md)
7. [Persistent Contexts](./docs/manual/07%20Persistent%20Contexts.md)
8. [Rendering Methods](./docs/manual/08%20Rendering%20Methods.md)
9. [Configuration](./docs/manual/09%20Configuration.md)
10. [Localization](./docs/manual/10%20Localization.md)
11. [Functions and Contexts](./docs/manual/11%20Functions%20and%20Contexts.md)
12. [Styles and Themes](./docs/manual/12%20Styles%20and%20Themes.md)
13. [Shadow DOM](./docs/manual/13%20Shadow%20DOM.md)
14. [Utility Functions](./docs/manual/14%20Utility%20Functions.md)
15. [Deployment](./docs/manual/15%20Deployment.md)
16. [HTTP Tunneling](./docs/manual/16%20HTTP%20Tunneling.md)
17. [Plugins](./docs/manual/17%20Plugins.md)
18. [Guide](./docs/manual/18%20Guide.md)
19. [Rendering](./docs/manual/19%20Rendering.md)
20. [App Communication](./docs/manual/20%20App%20Communication.md)

## Examples
Feel free to browse a collection of UIX projects on [uix.unyt.org/templates](https://uix.unyt.org/templates).
Expand Down
10 changes: 5 additions & 5 deletions docs/manual/01 Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ UIX encourages the use of standard web APIs wherever possible, and provides a si
and intuitive abstraction layer for more advanced features.

> [!NOTE]
> The [UIX Guide](./17%20Guide.md) gives a comprehensive overview for developers who are new to UIX.
> The [UIX Guide](./18%20Guide.md) gives a comprehensive overview for developers who are new to UIX.


## Main Features

* [Cross-network reactivity](02%20Cross-Realm%20Imports.md#Reactivity)
* [Server side rendering with partial hydration](07%20Rendering%20Methods.md)
* [Server side rendering with partial hydration](08%20Rendering%20Methods.md)
* [Hybrid backend/frontend routing](05%20Entrypoints%20and%20Routing.md)
* [Cross-realm imports](./02%20Cross-Realm%20Imports.md#cross-realm-imports)
* [Restorable state](06%20Persistent%20Contexts.md)
Expand All @@ -32,9 +32,9 @@ and intuitive abstraction layer for more advanced features.
UIX aims to simplify all phases of the app development cycle, including design, development, testing and distribution, in order to make the developer experience as convenient as possible.
This is why UIX ships with integrated features such as:
* Hot reloading
* [Stage management](./08%20Configuration.md#app-deployment-stages)
* [Stage management](./09%20Configuration.md#app-deployment-stages)
<!-- * Version management -->
* [Automated deployment](./13%20Deployment.md)
* [Automated deployment](./15%20Deployment.md)
* [Testing library](https://github.com/unyt-org/unyt-tests/)

## Installation
Expand Down Expand Up @@ -82,7 +82,7 @@ and starts the app locally.


## Running your UIX app
To run your UIX app, make sure the [app.dx](./08%20Configuration.md#the-app-dx-file) configuration file exists.
To run your UIX app, make sure the [app.dx](./09%20Configuration.md#the-app-dx-file) configuration file exists.
Execute the `uix` command in the root directory of your application (where the `app.dx` is located) to initialize and run the project.

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/03 JSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ accept other values:
#### Scoped stylesheets

The special `stylesheet` attribute can be used on JSX elements to apply a whole CSS
stylesheet to the scope of the element (See [Element-scoped styles](./11%20Style%20and%20Themes.md#element-scoped-styles]))
stylesheet to the scope of the element (See [Element-scoped styles](./12%20Style%20and%20Themes.md#element-scoped-styles]))


#### Class
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/04 Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ const parent =

## Styling

See [Styles and Themes](./11%20Style%20and%20Themes.md)
See [Styles and Themes](./12%20Style%20and%20Themes.md)
4 changes: 2 additions & 2 deletions docs/manual/05 Entrypoints and Routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ should not be available on the backend.

## 2. Just a backend entrypoint
UI generated on the backend entrypoint is "moved" to the frontend client.
UIX supports [multiple methods](./07%20Rendering%20Methods.md) for backend rendering.
UIX supports [multiple methods](./08%20Rendering%20Methods.md) for backend rendering.

## 3. Backend and frontend entrypoints (route merging)
When entrypoint exports for both the frontend and the backend are available, they are automatically merged.
Expand All @@ -53,7 +53,7 @@ export default <div>Content</div> satisfies Entrypoint;
```

Like other entrypoint values, HTML Elements are DATEX compatible and their content can be synchronized.
Keep in mind that the content is not updated when it is provided with [`renderStatic`](./07%20Rendering%20Methods.md#static-rendering).
Keep in mind that the content is not updated when it is provided with [`renderStatic`](./08%20Rendering%20Methods.md#static-rendering).

```tsx
const counter = $$(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ counter.val++; // increments the counter value each time the backend is restarte
console.log(counter); // logs 1,2,3,4... on each backend restart
```

You can read more about (eternal) contexts in the chapter [Functions and Contexts](./10%20Functions%20and%20Contexts.md).
You can read more about (eternal) contexts in the chapter [Functions and Contexts](./11%20Functions%20and%20Contexts.md).


## Session data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default renderStatic(
When using backend rendering, there is no UIX or DATEX library loaded on the client-side.
All reactivity happens on the backend.

You can still execute JavaScript on the frontend using [`@frontend` decorators or `:frontend` labels](10%20Functions%20and%20Contexts.md#scenario-3-event-handlers-in-the-frontend-context),
You can still execute JavaScript on the frontend using [`@frontend` decorators or `:frontend` labels](./11%20Functions%20and%20Contexts.md#scenario-3-event-handlers-in-the-frontend-context),
but keep in mind that only default browser APIs are available.

Example:
Expand All @@ -277,7 +277,7 @@ export default renderBackend(
> Event handlers assigned to a JSX element (like the `onclick` handler on the increment button in the example above) are always executed in their origin context per default.
> This means that when the HTML element is created on the backend, the event handler is also called on the backend per default.
>
> You can read more about this behaviour in the chapter [Functions and Contexts](./10%20Functions%20and%20Contexts.md)
> You can read more about this behaviour in the chapter [Functions and Contexts](./11%20Functions%20and%20Contexts.md)

> [!WARNING]
> Reactivity with backend rendering is still experimental and not yet fully supported. When using backend rendering,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const stage = app.stage // "production"
```

In `app.dx` files, the `#public.uix.stage` helper function can be used to access the stage,
enabling custom [deployment configurations](./13%20Deployment.md).
enabling custom [deployment configurations](./15%20Deployment.md).

## The .dx files

Expand All @@ -107,7 +107,7 @@ Per default, a `.dx` config file can contain the following options:
* `connect`: (boolean) Connect to the supranet on start (default: true)
* `keys`: (Crypto.ExportedKeySet) Set custom private + public keys for this endpoint

Additional options may be passed in for backend endpoints `.dx` configurations (See [Deployment](./11%20Deployment.md)).
Additional options may be passed in for backend endpoints `.dx` configurations (See [Deployment](./15%20Deployment.md)).


### The "stage" helper function
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Now, you can start your app like always with the `uix` command.

## GitHub deployment

The `git_deploy` [plugin](./15%20Plugins.md) can be used in a `app.dx` file to automate app deployment:
The `git_deploy` [plugin](./17%20Plugins.md) can be used in a `app.dx` file to automate app deployment:

```datex
plugin git_deploy (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ HTTP Tunneling can be disabled by starting the UIX app with `--http-over-datex=f
> loading times. Traffic is encrypted, but can in theory be read and modified
> by the unyt.app relay endpoint.<br>
> You can still use your custom `unyt.app` domain (or other domains that you own)
> when deploying your app on a [docker host](./13%20Deployment.md#remote-docker-hosts)
> when deploying your app on a [docker host](./15%20Deployment.md#remote-docker-hosts)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DATEX is especially useful for dynamic (reactive) data, but can also be used to

# Hybrid rendering with HTTP and DATEX

When using [hybrid rendering](./07%20Rendering%20Methods.md#hybrid-rendering), static HTML content is first served via HTTP and hydrated with dynamic DATEX data afterwards:
When using [hybrid rendering](./08%20Rendering%20Methods.md#hybrid-rendering), static HTML content is first served via HTTP and hydrated with dynamic DATEX data afterwards:

![](./res/communication/hybrid-datex-http.svg)

Expand Down