chore(editor): adjust min width of edgeless note (#10153)

Close [BS-2499](https://linear.app/affine-design/issue/BS-2499/所有notes最小宽度调整为218px)

### What changes
- adjusted min width of edgeless note
  - placeholder show ellipsis in min edgeless note
- refactored somes button of `change-note-button.ts` with `isPageBlock`
This commit is contained in:
L-Sun
2025-02-13 12:40:14 +00:00
parent 96bde3ceaf
commit 3ada4bee0d
6 changed files with 23 additions and 60 deletions
@@ -6,3 +6,4 @@ export * from './note-block';
export * from './note-edgeless-block';
export * from './note-service';
export * from './note-spec';
export { isPageBlock } from './utils';
@@ -126,6 +126,10 @@ export const paragraphBlockStyles = css`
.affine-paragraph-placeholder {
position: absolute;
display: none;
max-width: 100%;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
left: 0;
bottom: 0;
pointer-events: none;
+2 -2
View File
@@ -2,10 +2,10 @@ import { z } from 'zod';
import { createEnumMap } from '../utils/enum.js';
export const NOTE_MIN_WIDTH = 450 + 24 * 2;
export const NOTE_MIN_WIDTH = 170 + 24 * 2;
export const NOTE_MIN_HEIGHT = 92;
export const DEFAULT_NOTE_WIDTH = NOTE_MIN_WIDTH;
export const DEFAULT_NOTE_WIDTH = 450 + 24 * 2;
export const DEFAULT_NOTE_HEIGHT = NOTE_MIN_HEIGHT;
export enum NoteShadow {