From c719c7a702cc5c1b5ec62c7d035960876a47ed67 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Mon, 19 Aug 2024 02:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20fix=20topic=20scroll=20is?= =?UTF-8?q?sue=20(#3505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔧 chore: only include db file with server test * 🐛 fix: fix topic scroll --- .../@topic/features/TopicListContent/index.tsx | 12 ++++++------ vitest.server.config.ts | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx b/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx index b5baf275559a5..82ea0fa14195c 100644 --- a/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx +++ b/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx @@ -15,7 +15,7 @@ import { useSessionStore } from '@/store/session'; import { useUserStore } from '@/store/user'; import { ChatTopic } from '@/types/topic'; -import { Placeholder, SkeletonList } from '../SkeletonList'; +import { SkeletonList } from '../SkeletonList'; import TopicItem from './TopicItem'; const TopicListContent = memo(() => { @@ -85,7 +85,7 @@ const TopicListContent = memo(() => { )} item.id} data={topics} fixedItemHeight={44} @@ -93,10 +93,10 @@ const TopicListContent = memo(() => { itemContent={itemContent} overscan={44 * 10} ref={virtuosoRef} - scrollSeekConfiguration={{ - enter: (velocity) => Math.abs(velocity) > 350, - exit: (velocity) => Math.abs(velocity) < 10, - }} + // scrollSeekConfiguration={{ + // enter: (velocity) => Math.abs(velocity) > 350, + // exit: (velocity) => Math.abs(velocity) < 10, + // }} /> ); diff --git a/vitest.server.config.ts b/vitest.server.config.ts index 4843987e71e00..84906f5986fc1 100644 --- a/vitest.server.config.ts +++ b/vitest.server.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ coverage: { all: false, exclude: ['src/database/server/core/dbForTest.ts'], + include: ['src/database/server/**/*.ts'], provider: 'v8', reporter: ['text', 'json', 'lcov', 'text-summary'], reportsDirectory: './coverage/server',