feat(editor): update footnote node style and config (#10392)

[BS-2581](https://linear.app/affine-design/issue/BS-2581/优化-footnote-node-正文样式)
This commit is contained in:
donteatfriedrice
2025-02-24 08:15:04 +00:00
parent 8b4175c44d
commit 1b2a4377fd
6 changed files with 57 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import type { AIChatBlockModel } from '@affine/core/blocksuite/ai/blocks/ai-chat
import { createPageModePreviewSpecs } from '@affine/core/blocksuite/block-suite-editor/specs/preview';
import { AINetworkSearchService } from '@affine/core/modules/ai-button/services/network-search';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { FootNoteNodeConfigExtension } from '@blocksuite/affine/blocks';
import { useFramework } from '@toeverything/infra';
import { useMemo } from 'react';
@@ -12,6 +13,11 @@ export type AIChatBlockPeekViewProps = {
host: EditorHost;
};
// Disable hover effect for footnote node in center peek preview mode
const FOOTNOTE_CONFIG = FootNoteNodeConfigExtension({
disableHoverEffect: true,
});
export const AIChatBlockPeekView = ({
model,
host,
@@ -20,6 +26,7 @@ export const AIChatBlockPeekView = ({
const searchService = framework.get(AINetworkSearchService);
return useMemo(() => {
const previewSpecBuilder = createPageModePreviewSpecs(framework);
previewSpecBuilder.extend([FOOTNOTE_CONFIG]);
const networkSearchConfig = {
visible: searchService.visible,
enabled: searchService.enabled,