Commit Graph

8858 Commits

Author SHA1 Message Date
yoyoyohamapi 8cfdc48b57 refactor(core): ai message style (#10950)
### TL;DR
Refactor style of AI chat message

> CLOSE AF-2338, AF-2328, AF-2327

### What Changed
* Adjust style of chat action message
* Adjust style of chat error message
* Refactor style of chat message box
2025-03-20 06:39:27 +00:00
yoyoyohamapi 99491eb3c5 refactor(core): reorganize chat-panel components (#10935)
### TL;DR
Split complex chat message component into smaller, reusable units with ​finer granularity

> CLOSE AF-2323 AF-2326

### What Changed
* Split messages into components:
  * `<chat-message-assistant />`
  * `<chat-message-user />`
  * `<chat-message-action />`
* Split message content into types:
  * `<chat-content-images />`
  * `<chat-content-rich-text />`
  * `<chat-content-pure-text />`
2025-03-20 06:39:27 +00:00
fundon 1f2caca3f5 fix(editor): should not show toolbar when elements have been deleted (#11026)
Closes: [BS-2691](https://linear.app/affine-design/issue/BS-2691/[bug]-当-edgeless-为空的时候,点击-space-会在左上角出现一个莫名的-toolbar)
2025-03-20 06:01:57 +00:00
Saul-Mirone 92d76ba571 refactor(editor): merge inline to std (#11025) 2025-03-20 05:46:56 +00:00
yoyoyohamapi 5aa36efab0 refactor(core): simplify chat panel user message rendering (#10910)
### TL;DR
Refactor style of  user chat message

> CLOSE AF-2323 AF-2324 AF-2325

### What Changed
* Refactor style of user message.
* Refactor style of image message.
2025-03-20 04:59:10 +00:00
donteatfriedrice e83f7eba00 feat(editor): add embed iframe provider google docs (#10998)
Related [BS-2835](https://linear.app/affine-design/issue/BS-2835/支持更多-embed-iframe-providers)
2025-03-20 04:42:26 +00:00
EYHN bfe2525b50 fix(core): public user avatar missing (#11023) 2025-03-20 04:25:56 +00:00
Saul-Mirone 75580e881b refactor(editor): move gfx frame title to widget (#11021) 2025-03-20 04:10:56 +00:00
EYHN 120e193c58 feat(core): add notifications settings (#11004) 2025-03-20 03:52:56 +00:00
donteatfriedrice 46ed76ecb0 feat(editor): add embed iframe provider excalidraw (#10997) 2025-03-20 03:14:42 +00:00
CatsJuice 54ee2ee5ec fix(component): correct notification card's border radius (#10802) 2025-03-20 02:54:27 +00:00
EYHN 55cb4dc5e7 feat(core): adjust guard service support loading state (#10989) 2025-03-20 10:53:41 +08:00
fundon b88e7f0e35 chore(editor): remove redundant card-style-panel component (#10973)
Moved `CardStylePanel` into `CardStyleDropdownMenu`.
2025-03-20 02:08:22 +00:00
fundon 1c0c698375 chore(editor): remove redundant edgeless-align-panel component (#10972) 2025-03-20 02:08:22 +00:00
fundon 8b995ea420 chore(editor): remove edgeless element toolbar (#10900) 2025-03-20 02:08:21 +00:00
fundon 831f290f84 refactor(editor): edgeless toolbar chevron down icon (#10898) 2025-03-20 02:08:20 +00:00
fundon a7acd5c5b1 refactor(editor): fix edgeless toolbar theme (#10897) 2025-03-20 02:08:20 +00:00
fundon ccc210f88a refactor(core): edgeless toolbar ai action config extension (#10884) 2025-03-20 02:08:19 +00:00
fundon ac705c724e refactor(editor): edgeless toolbar linked doc custom config extension (#10883) 2025-03-20 02:08:19 +00:00
fundon a004a2cfab refactor(editor): edgeless toolbar more actions (#10882) 2025-03-20 02:08:18 +00:00
fundon 39704aac66 refactor(editor): edgeless toolbar alignment actions (#10881) 2025-03-20 02:08:18 +00:00
fundon e4b8b367ce refactor(editor): edgeless toolbar add frame action (#10880) 2025-03-20 02:08:17 +00:00
fundon 4a4893a380 refactor(editor): edgeless toolbar add group action and release group action (#10879) 2025-03-20 02:08:17 +00:00
fundon 07a64eb004 refactor(editor): edgeless toolbar lock and unlock actions (#10878) 2025-03-20 02:08:16 +00:00
fundon bd9b78f7d2 refactor(editor): edgeless toolbar quick connect action (#10876) 2025-03-20 02:08:16 +00:00
fundon 54bc60aa4d refactor(editor): edgeless shape toolbar config extension (#10821) 2025-03-20 02:08:16 +00:00
fundon 1acc7e5a9e refactor(editor): edgeless text toolbar config extension (#10811) 2025-03-20 02:08:15 +00:00
Saul-Mirone cdd405bbe5 refactor(editor): improve edgeless editors (#11019) 2025-03-20 01:49:56 +00:00
Saul-Mirone 258c70cf07 refactor(editor): store should not rely on inline (#11017) 2025-03-20 01:33:29 +00:00
akumatus ee337a16af feat(core): support collection search for ai chat (#10987)
Close [BS-2787](https://linear.app/affine-design/issue/BS-2787).
Close [BS-2788](https://linear.app/affine-design/issue/BS-2788).

![截屏2025-03-19 14.15.54.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/573450f9-791b-4cd9-9c75-df93bf9966b4.png)
2025-03-20 00:34:12 +00:00
forehalo f889886b31 refactor(server): e2e utilities (#11000) 2025-03-19 17:00:20 +00:00
forehalo 21c4a29f55 refactor(server): mail service (#10934) 2025-03-19 17:00:19 +00:00
forehalo b3a245f47a chore(server): better internal error stack (#11009) 2025-03-19 16:41:56 +00:00
Saul-Mirone b3c6333694 refactor(editor): remove note block service (#11015) 2025-03-20 01:04:20 +09:00
Saul-Mirone 2701be8d08 refactor(editor): remove empty block services (#11014) 2025-03-20 01:04:20 +09:00
Saul-Mirone 76dc55f328 refactor(editor): remove legacy block service spec slots (#11013) 2025-03-20 01:04:18 +09:00
doouding 1c8d25bc29 feat: add ElementTransformManager for edgeless element basic manipulation (#10824)
### Overview:
We've been working with some legacy code in the default-tool and edgeless-selected-rect modules, which are responsible for fundamental operations like moving, resizing, and rotating elements. Currently, these operations are hardcoded, making it challenging to extend functionalities without diving deep into the code.

### What's Changing:
Introducing `ElementTransformManager` to streamline the handling of basic transformations (move, resize, rotate) while allowing the business logic to dictate when these actions occur.

Providing two ways to extend the transformations behaviour:
- Extends inside element view definition: Elements can decide how to handle move/resize events, such as enforcing size constraints.
- Extension mechanism provided by this manager: Adjust or completely override default drag behaviors, like snapping elements into alignment.

### Code Examples:
Delegate element movement to TransformManager:
```typescript
class DefaultTool {
  override dragStart(event) {
    if(this.dragType === DragType.ContentMoving) {
      const transformManager = this.std.get(TransformManagerIdentifier);
      transformManager.startDrag({ selectedElements, event });
    }
  }
}
```

 Enforce minimum width inside view definition:
```typescript
class EdgelessNoteBlock extends GfxBlockComponent {
  onResizeDelta({ dw, dh }) {
    const bound = this.model.elementBound;
    bound.w = Math.min(MAX_WIDTH, bound.w + dw);
    bound.h = Math.min(MAX_HEIGHT, bound.h + dh);
    this.model.xywh = bound.serialize();
  }
}
```

Use extension to implement element snapping:
```typescript
import { TransformerExtension } from '@blocksuite/std/gfx';

// Just extends the TransformerExtension
class SnapManager extends TransformerExtension {
  static override key = 'snap-manager';
  onDragInitialize() {
    return {
      onDragMove(context) {
        const { dx, dy } = this.getAlignmentMoveDistance(context.elements);
        context.dx = dx;
        context.dy = dy;
      }
    }
  }
}
```

### Others

The migration will be divided into several PRs. This PR mostly focus on refactoring elements movement part of `default-tool`.
- Delegate elements movement to `TransformManager`
- Rewrite the default tool extension into `TransformManager` extension
- Add drag handler interface to gfx view (both `GfxBlockComponent` and `GfxElementModelView`) to allow element to define how it gonna react on drag
2025-03-19 15:30:06 +00:00
fengmk2 89a0880bb3 feat(server): record pending updates count to metrics (#10991)
close CLOUD-161
2025-03-19 15:10:25 +00:00
fundon c98f0900cc refactor(editor): edgeless mindmap toolbar config extension (#10803) 2025-03-19 14:50:55 +00:00
fundon 7f34667b78 refactor(editor): edgeless connector toolbar config extension (#10798) 2025-03-19 14:50:55 +00:00
darkskygit b099546164 feat(server): copilot job models (#10732) 2025-03-19 14:34:14 +00:00
forehalo dd31ef95db chore: bump otel packages in a group (#11001) 2025-03-19 14:17:02 +00:00
donteatfriedrice f6e32d8894 feat(editor): add embed iframe provider miro (#10996) 2025-03-19 13:57:30 +00:00
Saul-Mirone ee65d66d67 refactor(editor): remove code block service (#11010) 2025-03-19 13:38:10 +00:00
Saul-Mirone 1c6a876e6a refactor(editor): improve config extension (#11006) 2025-03-19 13:38:10 +00:00
Saul-Mirone c1e16aeaa7 refactor(editor): remove paragraph service (#11003) 2025-03-19 13:38:09 +00:00
Brooooooklyn 9a697dc9bb chore(server): change the embedding params (#10994) 2025-03-19 13:18:59 +00:00
forehalo 33d57b455a chore(server): revert access control in sync module (#11011) 2025-03-19 12:58:56 +00:00
fundon 03ffc688c3 refactor(editor): edgeless brush toolbar config extension (#10796) 2025-03-19 12:34:19 +00:00
fundon c44a339bd9 refactor(editor): edgeless group toolbar config extension (#10787) 2025-03-19 12:34:19 +00:00