Skip to content

Commit

Permalink
[DOCS] Describe new config vars for React router (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabalafou authored Oct 23, 2024
1 parent 3d404b6 commit 6805e0c
Showing 1 changed file with 44 additions and 7 deletions.
51 changes: 44 additions & 7 deletions docusaurus-docs/conda-store-ui/references/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ Options:

* `cookie`

Lets users authenticate by logging into `conda-store`. This is the preferred method of authentication.

Lets users authenticate by logging into `conda-store`. This is the preferred method of authentication.
* `token`

Lets users utilize a token generated by `conda-store` to authenticate to the server.
Lets users utilize a token generated by `conda-store` to authenticate to the server.

| Key | Value |
|---------------------------|--------|
Expand Down Expand Up @@ -54,7 +53,6 @@ Otherwise, leave blank.
Options:

* `grayscale`

* `green-accent`

| Key | Value |
Expand All @@ -65,8 +63,47 @@ Options:

* `true`

Show the login icon in the top menubar.

Show the login icon in the top menubar.
* `false`

Hide the login icon in the top menubar.
Hide the login icon in the top menubar.

| Key | Value |
|-----------------------|--------|
|`REACT_APP_ROUTER_TYPE`| string |

The type of React Router that the UI app will use.

Options:

* `browser`

Use the [History
API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to keep
track of app routes visited and to sync the current route with the browser URL
address bar. For more info, refer to
[createBrowserRouter](https://reactrouter.com/en/main/routers/create-browser-router)
in the React Router docs.

* `memory`

Manage the history stack in memory instead of using the browser's history
([createMemoryRouter](https://reactrouter.com/en/main/routers/create-memory-router)).
The [JupyterLab extension][jupyterlab-extension] configures the conda-store-ui to
use the memory router so that it does not conflict with JupyterLab trying to
manage the browser URL and history.

| Key | Value |
|------------------------|--------|
|`REACT_APP_URL_BASENAME`| string |

The URL prefix for the UI app routes, if other than `/`. For example, a
[Nebari](https://github.com/nebari-dev/nebari) deployment that serves the UI at
`/conda-store` should set this variable to `/conda-store`. The value of this
variable is passed directly through to React Router's
[opts.basename](https://reactrouter.com/en/main/routers/create-browser-router#optsbasename).

Only valid when React Router's "browser" router type is used, otherwise ignored.

<!-- Internal links -->
[jupyterlab-extension]: /jupyterlab-conda-store/introduction

0 comments on commit 6805e0c

Please sign in to comment.