From 06ff275852474f0f3eca18b4ed3065e048796c5a Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 09:35:23 -0400 Subject: [PATCH 1/5] refactor(Slider.tsx): remove unused import and type declaration fix(Slider.tsx): fix type error in onClick event handler --- client/src/components/ui/Slider.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/components/ui/Slider.tsx b/client/src/components/ui/Slider.tsx index 7a1f326c37a..fefef625196 100644 --- a/client/src/components/ui/Slider.tsx +++ b/client/src/components/ui/Slider.tsx @@ -1,12 +1,9 @@ -'use client'; - import * as React from 'react'; import * as SliderPrimitive from '@radix-ui/react-slider'; import { useDoubleClick } from '@zattoo/use-double-click'; +import type { clickEvent } from '@zattoo/use-double-click'; import { cn } from '../../utils'; -type clickEvent = (event: React.MouseEvent) => void; - interface SliderProps extends React.ComponentPropsWithoutRef { doubleClickHandler?: clickEvent; } @@ -23,7 +20,7 @@ const Slider = React.forwardRef, S { return; }) From 30520d97f4c4e496cada72af86d02d2709672521 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 09:36:15 -0400 Subject: [PATCH 2/5] chore: remove next.js artifacts from ui primitives --- client/src/components/ui/AlertDialog.tsx | 2 -- client/src/components/ui/Checkbox.tsx | 2 -- client/src/components/ui/DropdownMenu.tsx | 2 -- client/src/components/ui/HoverCard.tsx | 2 -- client/src/components/ui/InputNumber.tsx | 2 -- client/src/components/ui/Tabs.tsx | 2 -- 6 files changed, 12 deletions(-) diff --git a/client/src/components/ui/AlertDialog.tsx b/client/src/components/ui/AlertDialog.tsx index 0fcdb7e67a5..45534a57eeb 100644 --- a/client/src/components/ui/AlertDialog.tsx +++ b/client/src/components/ui/AlertDialog.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; diff --git a/client/src/components/ui/Checkbox.tsx b/client/src/components/ui/Checkbox.tsx index f8fa9f13d20..32092795669 100644 --- a/client/src/components/ui/Checkbox.tsx +++ b/client/src/components/ui/Checkbox.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; import { Check } from 'lucide-react'; diff --git a/client/src/components/ui/DropdownMenu.tsx b/client/src/components/ui/DropdownMenu.tsx index 013af3a714a..ab2b0303d86 100644 --- a/client/src/components/ui/DropdownMenu.tsx +++ b/client/src/components/ui/DropdownMenu.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { Check, ChevronRight, Circle } from 'lucide-react'; diff --git a/client/src/components/ui/HoverCard.tsx b/client/src/components/ui/HoverCard.tsx index 69fe6ab1550..a97ed7d4e86 100644 --- a/client/src/components/ui/HoverCard.tsx +++ b/client/src/components/ui/HoverCard.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; import * as HoverCardPrimitive from '@radix-ui/react-hover-card'; diff --git a/client/src/components/ui/InputNumber.tsx b/client/src/components/ui/InputNumber.tsx index b74aa4842be..3b823568c6a 100644 --- a/client/src/components/ui/InputNumber.tsx +++ b/client/src/components/ui/InputNumber.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; // import { NumericFormat } from 'react-number-format'; diff --git a/client/src/components/ui/Tabs.tsx b/client/src/components/ui/Tabs.tsx index 83645e9a5b7..a439407e856 100644 --- a/client/src/components/ui/Tabs.tsx +++ b/client/src/components/ui/Tabs.tsx @@ -1,5 +1,3 @@ -'use client'; - import * as React from 'react'; import * as TabsPrimitive from '@radix-ui/react-tabs'; From d5268d05890db1f1ef535584cb50842cefd68ce8 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 09:36:50 -0400 Subject: [PATCH 3/5] chore(style.css): update font paths to use a variable for the fonts directory chore(vite.config.ts): import the resolve function from the path module --- client/src/style.css | 26 +++++++++++++------------- client/vite.config.ts | 3 ++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/client/src/style.css b/client/src/style.css index 23526be2d41..ff5d089cbdc 100644 --- a/client/src/style.css +++ b/client/src/style.css @@ -13,7 +13,7 @@ font-family: Signifier; font-style: normal; font-weight: 400; - src: url("../fonts/signifier-light.woff2") format("woff2") + src: url("$fonts/signifier-light.woff2") format("woff2") } @font-face { @@ -21,7 +21,7 @@ font-family: Signifier; font-style: italic; font-weight: 400; - src: url("../fonts/signifier-light-italic.woff2") format("woff2") + src: url("$fonts/signifier-light-italic.woff2") format("woff2") } @font-face { @@ -29,7 +29,7 @@ font-family: Signifier; font-style: normal; font-weight: 700; - src: url("../fonts/signifier-bold.woff2") format("woff2") + src: url("$fonts/signifier-bold.woff2") format("woff2") } @font-face { @@ -37,7 +37,7 @@ font-family: Signifier; font-style: italic; font-weight: 700; - src: url("../fonts/signifier-bold-italic.woff2") format("woff2") + src: url("$fonts/signifier-bold-italic.woff2") format("woff2") } @font-face { @@ -45,7 +45,7 @@ font-family: Söhne; font-style: normal; font-weight: 400; - src: url("../fonts/soehne-buch.woff2") format("woff2") + src: url("$fonts/soehne-buch.woff2") format("woff2") } @font-face { @@ -53,7 +53,7 @@ font-family: Söhne; font-style: italic; font-weight: 400; - src: url("../fonts/soehne-buch-kursiv.woff2") format("woff2") + src: url("$fonts/soehne-buch-kursiv.woff2") format("woff2") } @font-face { @@ -61,7 +61,7 @@ font-family: Söhne; font-style: normal; font-weight: 500; - src: url("../fonts/soehne-kraftig.woff2") format("woff2") + src: url("$fonts/soehne-kraftig.woff2") format("woff2") } @font-face { @@ -69,7 +69,7 @@ font-family: Söhne; font-style: italic; font-weight: 500; - src: url("../fonts/soehne-kraftig-kursiv.woff2") format("woff2") + src: url("$fonts/soehne-kraftig-kursiv.woff2") format("woff2") } @font-face { @@ -77,7 +77,7 @@ font-family: Söhne; font-style: normal; font-weight: 600; - src: url("../fonts/soehne-halbfett.woff2") format("woff2") + src: url("$fonts/soehne-halbfett.woff2") format("woff2") } @font-face { @@ -85,7 +85,7 @@ font-family: Söhne; font-style: italic; font-weight: 600; - src: url("../fonts/soehne-halbfett-kursiv.woff2") format("woff2") + src: url("$fonts/soehne-halbfett-kursiv.woff2") format("woff2") } @font-face { @@ -93,7 +93,7 @@ font-family: Söhne Mono; font-style: normal; font-weight: 400; - src: url("../fonts/soehne-mono-buch.woff2") format("woff2") + src: url("$fonts/soehne-mono-buch.woff2") format("woff2") } @font-face { @@ -101,7 +101,7 @@ font-family: Söhne Mono; font-style: normal; font-weight: 700; - src: url("../fonts/soehne-mono-halbfett.woff2") format("woff2") + src: url("$fonts/soehne-mono-halbfett.woff2") format("woff2") } @font-face { @@ -109,7 +109,7 @@ font-family: Söhne Mono; font-style: italic; font-weight: 400; - src: url("../fonts/soehne-mono-buch-kursiv.woff2") format("woff2") + src: url("$fonts/soehne-mono-buch-kursiv.woff2") format("woff2") } /* * { diff --git a/client/vite.config.ts b/client/vite.config.ts index f757b6a2649..5ca55a24589 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -1,6 +1,6 @@ import { defineConfig, loadEnv } from 'vite'; import react from '@vitejs/plugin-react'; -import path from 'path'; +import path, { resolve } from 'path'; import type { Plugin } from 'vite'; // https://vitejs.dev/config/ @@ -42,6 +42,7 @@ export default defineConfig({ resolve: { alias: { '~': path.join(__dirname, 'src/'), + $fonts: resolve('public/fonts'), }, }, }); From 275c953dc8f5c99428c84858ce519d7d45f27c1a Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 10:09:42 -0400 Subject: [PATCH 4/5] chore(client): update @vitejs/plugin-react to version 4.0.4 chore(client): update vite to version 4.4.9 --- client/package.json | 4 ++-- package-lock.json | 40 ++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/client/package.json b/client/package.json index 3a0dd2e1802..68b16776c8a 100644 --- a/client/package.json +++ b/client/package.json @@ -97,7 +97,7 @@ "@types/node": "^20.3.0", "@types/react": "^18.2.11", "@types/react-dom": "^18.2.4", - "@vitejs/plugin-react": "^4.0.0", + "@vitejs/plugin-react": "^4.0.4", "autoprefixer": "^10.4.13", "babel-jest": "^29.5.0", "babel-loader": "^9.1.2", @@ -125,7 +125,7 @@ "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", "typescript": "^5.0.4", - "vite": "^4.3.9", + "vite": "^4.4.9", "vite-plugin-html": "^3.2.0" } } diff --git a/package-lock.json b/package-lock.json index 5f4c826067a..d4225b521f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -173,7 +173,7 @@ "@types/node": "^20.3.0", "@types/react": "^18.2.11", "@types/react-dom": "^18.2.4", - "@vitejs/plugin-react": "^4.0.0", + "@vitejs/plugin-react": "^4.0.4", "autoprefixer": "^10.4.13", "babel-jest": "^29.5.0", "babel-loader": "^9.1.2", @@ -201,7 +201,7 @@ "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", "typescript": "^5.0.4", - "vite": "^4.3.9", + "vite": "^4.4.9", "vite-plugin-html": "^3.2.0" } }, @@ -23261,9 +23261,9 @@ } }, "node_modules/rollup": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.27.0.tgz", - "integrity": "sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==", + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -25802,14 +25802,14 @@ } }, "node_modules/vite": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.7.tgz", - "integrity": "sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==", + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", "dev": true, "dependencies": { "esbuild": "^0.18.10", - "postcss": "^8.4.26", - "rollup": "^3.25.2" + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -30532,7 +30532,7 @@ "@types/node": "^20.3.0", "@types/react": "^18.2.11", "@types/react-dom": "^18.2.4", - "@vitejs/plugin-react": "^4.0.0", + "@vitejs/plugin-react": "^4.0.4", "@zattoo/use-double-click": "1.2.0", "autoprefixer": "^10.4.13", "axios": "^1.3.4", @@ -30597,7 +30597,7 @@ "ts-loader": "^9.4.2", "typescript": "^5.0.4", "url": "^0.11.0", - "vite": "^4.3.9", + "vite": "^4.4.9", "vite-plugin-html": "^3.2.0" } }, @@ -43380,9 +43380,9 @@ } }, "rollup": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.27.0.tgz", - "integrity": "sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==", + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -45196,15 +45196,15 @@ } }, "vite": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.7.tgz", - "integrity": "sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==", + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", "dev": true, "requires": { "esbuild": "^0.18.10", "fsevents": "~2.3.2", - "postcss": "^8.4.26", - "rollup": "^3.25.2" + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "dependencies": { "@esbuild/android-arm": { From 571130629a23e6af5a7645da4d92ecdfc5e6aadb Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 10:20:58 -0400 Subject: [PATCH 5/5] fix(playwright.yml): fix condition for running Playwright tests on pull requests The condition for running Playwright tests on pull requests was not properly formatted. The repository name was not enclosed in quotes. This commit fixes the condition by adding single quotes around the repository name. --- .github/workflows/playwright.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index c70aee3eb8c..c447409f87b 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -13,7 +13,7 @@ on: jobs: tests_e2e: name: Run Playwright tests - if: github.event.pull_request.head.repo.full_name == danny-avila/LibreChat + if: github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat' timeout-minutes: 60 runs-on: ubuntu-latest env: