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

Wd/split client #546

Merged
merged 6 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ I've copy/pasted the whole document there, without the previous two headings.
- [Install python dependencies](#install-python-dependencies)
- [Start the Chainlit server from source](#start-the-chainlit-server-from-source)
- [Start the UI from source](#start-the-ui-from-source)
- [Develop locally on `libs/components`](#develop-locally-on--libs-components-)
- [Develop locally on `libs/react-components`](#develop-locally-on-libsreact-components)
- [Run the tests](#run-the-tests)
- [Run one test](#run-one-test)

Expand Down Expand Up @@ -117,18 +117,18 @@ pnpm run dev --port 5174

If you visit `http://127.0.0.1:5174/`, it should connect to your local server. If the local server is not running, it should say that it can't connect to the server.

## Develop locally on `libs/components`
## Develop locally on `libs/react-components`

Reusable UI components are living in the separate npm package `libs/components`. The main Chainlit UI build and import that package automatically.
Reusable UI components are living in the separate npm package `libs/react-components`. The main Chainlit UI build and import that package automatically.

You can enable hot module replacement for development.

```sh
cd libs/components
cd libs/react-components
pnpm run build:watch
```

This will watch for file changes in `libs/components` and automatically rebuild the library as you develop.
This will watch for file changes in `libs/react-components` and automatically rebuild the library as you develop.

## Run the tests

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests-components.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Tests @chainlit/components
name: Tests @chainlit/react-components

# on:
# push:
# paths:
# - 'libs/components'
# - 'libs/react-components'

on: [workflow_call]

Expand All @@ -26,8 +26,8 @@ jobs:
- name: Install JS dependencies
run: pnpm install --no-frozen-lockfile
- name: Build components
run: pnpm run build:components
run: pnpm run build:react-components
- name: Lint components
run: pnpm run lint:components
run: pnpm run lint:react-components
- name: Run tests
run: pnpm test:components
run: pnpm test:react-components
8 changes: 3 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@
"format": "prettier src/**/*.{ts,tsx} --write --loglevel error"
},
"dependencies": {
"@chainlit/components": "workspace:^",
"@chainlit/react-components": "workspace:^",
"@chainlit/react-client": "workspace:^",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.9",
"@mui/lab": "^5.0.0-alpha.122",
"@mui/material": "^5.14.10",
"formik": "^2.4.3",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-hotkeys-hook": "^4.4.1",
"react-router-dom": "^6.15.0",
"react-speech-recognition": "^3.10.0",
"recoil": "^0.7.6",
"recoil": "^0.7.7",
"regenerator-runtime": "^0.14.0",
"socket.io-client": "^4.7.2",
"swr": "^2.2.2",
"usehooks-ts": "^2.9.1",
"uuid": "^9.0.0",
"yup": "^1.2.0"
Expand Down
Loading