Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: adjust padding of ask ai panel (#7287)

L-Sunb99e8b1e8ac5
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
index 62a9f973d1..25a60d4cd4 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-panel.ts
@@ -2,6 +2,7 @@ import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import {
type AIItemGroupConfig,
EdgelessRootService,
+ scrollbarStyle,
} from '@blocksuite/blocks';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
@@ -18,28 +19,20 @@ export class AskAIPanel extends WithDisposable(LitElement) {
.ask-ai-panel {
box-sizing: border-box;
- padding: 8px;
+ padding: 8px 4px 8px 8px;
max-height: 374px;
overflow-y: auto;
background: var(--affine-background-overlay-panel-color);
box-shadow: var(--affine-shadow-2);
border-radius: 8px;
z-index: var(--affine-z-index-popover);
+ scrollbar-gutter: stable;
}
- .ask-ai-panel::-webkit-scrollbar {
- width: 5px;
- max-height: 100px;
- }
- .ask-ai-panel::-webkit-scrollbar-thumb {
- border-radius: 20px;
- }
+ ${scrollbarStyle('.ask-ai-panel')}
.ask-ai-panel:hover::-webkit-scrollbar-thumb {
background-color: var(--affine-black-30);
}
- .ask-ai-panel::-webkit-scrollbar-corner {
- display: none;
- }
`;
@property({ attribute: false })