Skip to content

Commit c719c7a

Browse files
authored
🐛 fix: fix topic scroll issue (lobehub#3505)
* 🔧 chore: only include db file with server test * 🐛 fix: fix topic scroll
1 parent c68cffd commit c719c7a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useSessionStore } from '@/store/session';
1515
import { useUserStore } from '@/store/user';
1616
import { ChatTopic } from '@/types/topic';
1717

18-
import { Placeholder, SkeletonList } from '../SkeletonList';
18+
import { SkeletonList } from '../SkeletonList';
1919
import TopicItem from './TopicItem';
2020

2121
const TopicListContent = memo(() => {
@@ -85,18 +85,18 @@ const TopicListContent = memo(() => {
8585
</Flexbox>
8686
)}
8787
<Virtuoso
88-
components={{ ScrollSeekPlaceholder: Placeholder }}
88+
// components={{ ScrollSeekPlaceholder: Placeholder }}
8989
computeItemKey={(_, item) => item.id}
9090
data={topics}
9191
fixedItemHeight={44}
9292
initialTopMostItemIndex={Math.max(activeIndex, 0)}
9393
itemContent={itemContent}
9494
overscan={44 * 10}
9595
ref={virtuosoRef}
96-
scrollSeekConfiguration={{
97-
enter: (velocity) => Math.abs(velocity) > 350,
98-
exit: (velocity) => Math.abs(velocity) < 10,
99-
}}
96+
// scrollSeekConfiguration={{
97+
// enter: (velocity) => Math.abs(velocity) > 350,
98+
// exit: (velocity) => Math.abs(velocity) < 10,
99+
// }}
100100
/>
101101
</>
102102
);

vitest.server.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default defineConfig({
99
coverage: {
1010
all: false,
1111
exclude: ['src/database/server/core/dbForTest.ts'],
12+
include: ['src/database/server/**/*.ts'],
1213
provider: 'v8',
1314
reporter: ['text', 'json', 'lcov', 'text-summary'],
1415
reportsDirectory: './coverage/server',

0 commit comments

Comments
 (0)