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

[Part 2] Move components to @chainlit/component #366

Merged
merged 28 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0992b9e
refactor: Move useIsDarkMode hooks to @chainlit/components/hooks
alimtunc Sep 5, 2023
d8f033b
refactor: Move <ClipboardCopy/> to @chainlit/components
alimtunc Sep 5, 2023
68ab7e0
refactor: Move <Code/> to @chainlit/components
alimtunc Sep 5, 2023
989b6f9
feat: Add useApi hooks to @chainlit/components
alimtunc Sep 7, 2023
681fe0f
refactor: Move <TextElement/> to @chainlit/components
alimtunc Sep 6, 2023
c7cb19c
refactor: Move <InlinedTextList/> to @chainlit/components
alimtunc Sep 6, 2023
07ab1ab
refactor: Move <SelectInput/> to @chainlit/components
alimtunc Sep 6, 2023
18d2cea
refactor: Move <SelectCategoryInput/> to @chainlit/components
alimtunc Sep 6, 2023
5dd3c7d
refactor: Move <TagsInput/> to @chainlit/components
alimtunc Sep 6, 2023
eba283d
refactor: Clean components
alimtunc Sep 6, 2023
a0a20a9
refactor: Move <SliderInput/> to @chainlit/components
alimtunc Sep 6, 2023
cc55d68
refactor: Move <SwitchInput/> to @chainlit/components
alimtunc Sep 6, 2023
34ac193
feat: Add custom omit to @chainlit/components
alimtunc Sep 6, 2023
461e349
refactor: Move <FormInput/> to @chainlit/components
alimtunc Sep 6, 2023
95fa0bc
refactor: Move <Element/>, <ElementView/> and <ElementSideView/> to @…
alimtunc Sep 7, 2023
6b771e4
build: Remove useless dependencies
alimtunc Sep 7, 2023
f87a547
refactor: Move IMessage and dependant types to @chainlit/components
alimtunc Sep 7, 2023
c029871
refactor: Move IAction types to @chainlit/components
alimtunc Sep 7, 2023
bdacc55
refactor: Move File types to @chainlit/components
alimtunc Sep 7, 2023
e67385d
refactor: Move useUpload hooks to @chainlit/components
alimtunc Sep 7, 2023
c605c2b
refactor: Move IAsk types to @chainlit/components
alimtunc Sep 7, 2023
bce8e39
refactor: Move <RegularButton/> to @chainlit/components
alimtunc Sep 7, 2023
465a5ef
refactor: Move <Collapse/> to @chainlit/components
alimtunc Sep 7, 2023
cf72fea
refactor: Move <InlinedElements/> to @chainlit/components
alimtunc Sep 8, 2023
bac0918
refactor: index should be .ts instead .tsx on @chaintlit/component
alimtunc Sep 8, 2023
daa4a4f
refactor: Move <MessageContainer/> and all related components to @cha…
alimtunc Sep 8, 2023
5eaa17c
refactor: Move front unit test to @chainlit/components
alimtunc Sep 8, 2023
c7975ee
build: Run @chainlit/components tests on CI
alimtunc Sep 8, 2023
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
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit
tests-components:
uses: ./.github/workflows/tests-components.yaml
secrets: inherit
ci:
runs-on: ubuntu-latest
name: Run CI
needs: [mypy, tests]
needs: [mypy, tests, tests-components]
steps:
- name: "Done"
- name: 'Done'
run: echo "Done"
33 changes: 33 additions & 0 deletions .github/workflows/tests-components.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests @chainlit/components

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

on: [workflow_call]

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.9
- name: Use Node.js 16.15.0
uses: actions/setup-node@v3
with:
node-version: '16.15.0'
cache: 'pnpm'
- name: Install JS dependencies
run: pnpm install --no-frozen-lockfile
- name: Build components
run: pnpm run build:components
- name: Lint components
run: pnpm run lint:components
- name: Run tests
run: pnpm test:components
14 changes: 0 additions & 14 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"preinstall": "npx only-allow pnpm",
"dev": "vite",
"build": "tsc && vite build",
"test": "vitest run",
"preview": "vite preview",
"lint": "eslint ./src --ext .ts,.tsx && tsc --noemit",
"format": "prettier src/**/*.{ts,tsx} --write --loglevel error"
Expand All @@ -23,16 +22,13 @@
"draft-js": "^0.11.7",
"formik": "^2.4.3",
"lodash": "^4.17.21",
"mui-chips-input": "^2.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-hot-toast": "^2.4.1",
"react-hotkeys-hook": "^4.4.1",
"react-markdown": "^8.0.7",
"react-resizable": "^3.0.5",
"react-router-dom": "^6.15.0",
"react-syntax-highlighter": "^15.5.0",
"react-virtualized-auto-sizer": "^1.0.20",
"react-window": "^1.8.9",
"react-window-infinite-loader": "^1.0.9",
Expand All @@ -42,26 +38,16 @@
"swr": "^2.2.2",
"usehooks-ts": "^2.9.1",
"uuid": "^9.0.0",
"vitest": "^0.33.0",
"yup": "^1.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.14",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.11",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@types/draft-js": "^0.11.10",
"@types/lodash": "^4.14.197",
"@types/node": "^20.5.7",
"@types/react-resizable": "^3.0.4",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/react-window-infinite-loader": "^1.0.6",
"@types/uuid": "^9.0.3",
"@vitejs/plugin-react": "^4.0.4",
"@vitejs/plugin-react-swc": "^3.3.2",
"immutable": "^4.3.4",
"jsdom": "^22.1.0",
"vite": "^4.4.9",
"vite-tsconfig-paths": "^4.2.0"
}
Expand Down
Loading