diff --git a/.storybook/main.js b/.storybook/main.js index 5c3e0c60..4e589f81 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -3,7 +3,6 @@ const basicConfigs = require("../webpack.config.js"); module.exports = { stories: [ "../src/**/*.stories.mdx", - "../src/docs/markdown/*.md", "../src/**/*.stories.@(ts|tsx)" ], addons: [ @@ -17,13 +16,13 @@ module.exports = { "@storybook/addon-interactions", "@storybook/addon-a11y", - { - name: '@storybook/addon-docs', - options: { + { + name: '@storybook/addon-docs', + options: { configureJSX: true, transcludeMarkdown: true, - }, - }, + }, + }, ], framework: "@storybook/react", core: { diff --git a/.storybook/preview.js b/.storybook/preview.js index b0b66ff7..859ac851 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -4,7 +4,7 @@ import { themeDecorator } from "../src/theme" export const parameters = { options: { storySort: { - order: ['Welcome', 'docs', ['Getting Started', 'Installation', 'Configuration', 'Testing', 'Releasing', 'Extensions', ['JupyterLab',]], ], + order: ['Welcome'], }, }, } diff --git a/src/docs/Testing.stories.mdx b/src/docs/Testing.stories.mdx deleted file mode 100644 index 20af10af..00000000 --- a/src/docs/Testing.stories.mdx +++ /dev/null @@ -1,22 +0,0 @@ -import { Meta, Description } from "@storybook/addon-docs"; - - - -# Unit Testing - -We currently use jest in order to run unit tests. - -```bash -yarn test // find every test with the .test.[tsx|ts] extension -yarn report // show coverage collected after running the first command in the browser -yarn report test/AddChannel.test.tsx // run a single test instead of all -``` diff --git a/src/docs/Welcome.stories.mdx b/src/docs/Welcome.stories.mdx index a61c01bc..b1efa173 100644 --- a/src/docs/Welcome.stories.mdx +++ b/src/docs/Welcome.stories.mdx @@ -2,25 +2,19 @@ import { Meta } from "@storybook/addon-docs"; -# Introduction +# conda-store-ui component documentation -Welcome to the conda-store-ui project documentation! conda-store-ui is a frontend for conda-store-server API. +conda-store-ui is a frontend for conda-store-server API. +It provides a graphical user interface for creating and managing conda environments. -It provides a user interface for creating and storing conda-environments. - -## Docs - -The Documentation for the conda-store-ui, its features, and its usage can be found here. - -## Features - -These are the components that `conda-store-ui` is built on, and provides a playground for these pieces. +This website documents the Storybook components that `conda-store-ui` is built on, and provides a playground for these pieces. +The user documentation for the conda-store-ui can be found at [conda.store](https://conda.store/conda-store-ui/introduction). diff --git a/src/docs/configuration.stories.mdx b/src/docs/configuration.stories.mdx deleted file mode 100644 index 102c5c30..00000000 --- a/src/docs/configuration.stories.mdx +++ /dev/null @@ -1,16 +0,0 @@ -import { Story, Canvas, Meta, Description } from "@storybook/addon-docs"; -import Configuration from '!raw-loader!./markdown/CONFIGURATION.md'; - - - - - diff --git a/src/docs/development.stories.mdx b/src/docs/development.stories.mdx deleted file mode 100644 index 57a5b8b6..00000000 --- a/src/docs/development.stories.mdx +++ /dev/null @@ -1,16 +0,0 @@ -import { Story, Canvas, Meta, Description } from "@storybook/addon-docs"; -import Installation from '!raw-loader!./markdown/INSTALL.md'; - - - - - diff --git a/src/docs/gettingStarted.stories.mdx b/src/docs/gettingStarted.stories.mdx deleted file mode 100644 index d2f7d7b3..00000000 --- a/src/docs/gettingStarted.stories.mdx +++ /dev/null @@ -1,15 +0,0 @@ -import { Meta, Description } from "@storybook/addon-docs"; -import Start from '!raw-loader!./markdown/START.md'; - - - - diff --git a/src/docs/markdown/CONFIGURATION.md b/src/docs/markdown/CONFIGURATION.md deleted file mode 100644 index 94a4f025..00000000 --- a/src/docs/markdown/CONFIGURATION.md +++ /dev/null @@ -1,120 +0,0 @@ -# Configuration - -## Application configuration - -The configuration for conda-store-ui, including the connection details to conda-store, can be done : -- either at compile time, using a `.env` file. -- or at runtime, using `condaStoreConfig` variable - - -### At compile time, using `.env` - -conda-store-ui looks for a `.env` file when packing the bundle. -Below, you'll find the options and the listed descriptions. You are welcome to copy this configuration, otherwise, you can copy and rename the `.env.example` file provided in the repository. - -Sample File: - -```.env -REACT_APP_API_URL=http://localhost:8080/conda-store -REACT_APP_AUTH_METHOD=cookie -REACT_APP_LOGIN_PAGE_URL=http://localhost:8080/conda-store/login?next= -REACT_APP_AUTH_TOKEN= -REACT_APP_STYLE_TYPE=green-accent -REACT_APP_SHOW_AUTH_BUTTON=true -REACT_APP_LOGOUT_PAGE_URL=http://localhost:8080/conda-store/logout?next=/ -``` - -### At runtime, using `condaStoreConfig` - -When using a webpacked version of `conda-store-ui`, you might want to pass it a configuration. -In your HTML file, add the following **before** loading the react app : - -```html - -``` - - -### Options - -The possible options are stored in a key-value format. - -| Key | Value | -|--------------------|--------| -|`REACT_APP_API_URL` | string | - -Base API url that will be used when creating RTK Query queries - -| Key | Value | -|------------------------|--------| -|`REACT_APP_AUTH_METHOD` | string | - -Preferred method of authentication. - -Options: - -* `cookie` - -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. - -| Key | Value | -|---------------------------|--------| -|`REACT_APP_LOGIN_PAGE_URL` | string | - -The URL endpoint used for login authentication. - -| Key | Value | -|----------------------------|--------| -|`REACT_APP_LOGOUT_PAGE_URL` | string | - -The URL endpoint used for logout authentication. - -| Key | Value | -|------------------------|--------------------| -|`REACT_APP_AUTH_TOKEN` | `null` / `string` | - -If using the `token` method for authentication, then input the token as a string. -Otherwise, leave blank. - -| Key | Value | -|---------------------------|--------| -|`REACT_APP_STYLE_TYPE` | string | - -Options: - -* `grayscale` - -* `green-accent` - -| Key | Value | -|----------------------------|--------| -|`REACT_APP_SHOW_AUTH_BUTTON`| bool | - -Options: - -* `true` - -Show the login icon in the top menubar. - -* `false` - -Hide the login icon in the top menubar. - -## Docker-compose configuration -By default, docker-compose uses the latest release of conda-store-server, but there could be cases where a devloper wishes to test against a different versions, such as a release candidate. - -Adding the `CONDA_STORE_SERVER_VERSION` variable to the `.env` file will allow overriding this default and setting whichever version of conda-store-server is desired. - diff --git a/src/docs/markdown/DEVELOPMENT.md b/src/docs/markdown/DEVELOPMENT.md deleted file mode 100644 index 8375f8fc..00000000 --- a/src/docs/markdown/DEVELOPMENT.md +++ /dev/null @@ -1,43 +0,0 @@ -# Development - -To get started with conda-store-ui development, there are a couple of options. This guide will help you to set up your local development environment. - -## Prerequsites -Before setting up conda-store ui, you must prepare your environment. - -We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastructure before starting ensure that you have docker-compose installed. If you need to install docker-compose, please see their [installlation documentation](https://docs.docker.com/compose/install/) - -1. Clone the [conda-store-ui](https://github.com/conda-incubator/conda-store-ui.git) repository. -2. Copy `.env.example` to `.env`. All default settings should work, but if you want to test against a differenct version of conda-store-server, you can specify if in the `.env` file by setting the `CONDA_STORE_SERVER_VERSION` variable to the desired version - -## Local Development with conda-store-ui running in Docker -Running conda-store-ui in Docker is the simplest way to setup your local development environment. - -1. Run `yarn run start:docker` to start the entire development stack. -2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui. -3. You can then login using the default username of `username` and default password of `password`. - -**Note:** Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes. - -## Local Development without running conda-store-ui in Docker - -This setup still uses Docker for supporting services but runs conda-store-ui locally. - -### Set up your environment - -This project uses [Conda](https://conda.io) for package management. To set up Conda, please see their [installation documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html). -1. Change to the project root ` cd conda-store-ui` -2. From the project root create the conda environment `conda env create -f environment_dev.yml` -3. Activate the development environment `conda activate cs-ui-dev-env` -4. Install yarn dependencies `yarn install` - -### Run the application - -1. Run `yarn run start` and wait for the application to finish starting up -2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui. -3. You can then login using the default username of `username` and default password of `password`. - -**Note:** Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes. - - - diff --git a/src/docs/markdown/INTRODUCTION.md b/src/docs/markdown/INTRODUCTION.md deleted file mode 100644 index 97bda1ff..00000000 --- a/src/docs/markdown/INTRODUCTION.md +++ /dev/null @@ -1,15 +0,0 @@ -# Introduction - -Welcome to the conda-store-ui project documentation! conda-store-ui is a frontend for conda-store, allowing interaction with environments through its interface. - -As a pre-requiste, you will need to have access to a running instance of conda-store. - -If you'd like to check conda-store out first, visit [conda.store](https://conda.store/en/latest) - -## Docs - -The Documentation for the application, its features, and its usage can be found here. - -## Features - -These are the components that `conda-store-ui` is built on, and provides a playground for these pieces. diff --git a/src/docs/markdown/START.md b/src/docs/markdown/START.md deleted file mode 100644 index fc01f79b..00000000 --- a/src/docs/markdown/START.md +++ /dev/null @@ -1,30 +0,0 @@ -# Getting Started - -Hello, welcome to our getting started guide! This guide will help you to get `conda-store-ui` up and running! - -## Local Deployment - -For a local deployment, we recommend that you use our provided docker compose file. The docker compose file contains _both_ conda-store-ui and conda-store-server, so it is perfect for a playground! - ------------------------- - -### 1) Clone the repository and `cd` into the root - -```bash -git clone https://github.com/conda-incubator/conda-store-ui.git -cd conda-store-ui -``` - -### 2) Start Docker Compose - -```bash -docker compose up --build -``` - -### 3) Access conda-store-ui, running at [localhost:8000](http://localhost:8000) - -Since this Dockerfile came bundled with conda-store-server, all that's left to worry about is authenticating to the server. - -### 4) Login by locating the login icon, and clicking on it. - -**Note** The default login combination is `username/password` diff --git a/src/docs/release.stories.mdx b/src/docs/release.stories.mdx deleted file mode 100644 index cd2fe9bb..00000000 --- a/src/docs/release.stories.mdx +++ /dev/null @@ -1,26 +0,0 @@ -import { Meta, Description } from "@storybook/addon-docs"; - - - -# Release a new version - -In order to create a new version of this package, follow these steps: - -* Merge PR's and all of the things you want to main, and checkout main - -* Bump the version number in package.json - -* Go to the releases tab, and create a new release. Note that the release version tag must match the new version from package.json - -* Wait for actions to execute and the new package will be uploaded to npm - -Latest Release: https://libraries.io/npm/@conda-store%2Fconda-store-ui