Commit Graph

66 Commits

Author SHA1 Message Date
Saul-Mirone 897c7d4284 refactor(editor): should not rely on doc collection type (#9501) 2025-01-03 06:30:27 +00:00
doouding cb5d7eaabc feat: add scroll wheel zoom setting (#9476)
### Changed
Add `scroll wheel to zoom` setting option, when the option enables, user can zoom in and out with scroll wheel without pressing the cmd/ctrl key.
2025-01-03 06:09:10 +00:00
doouding a4e94ab72f feat: add shortcut of zooming to selection (#9447)
### Changed
- change edgeless shortcut `cmd + 0`, `cmd + 1` to `alt + 0`, `alt + 1`
- add new shortcut `alt + 2` to zoom to currently selected elements
2025-01-03 03:57:05 +00:00
Saul-Mirone 8b6c81f76d refactor(editor): reduce dependency to doc collection (#9492) 2025-01-03 01:59:25 +00:00
Saul-Mirone edb5e1d87a refactor(editor): job should not rely on doc collection directly (#9488) 2025-01-02 10:50:15 +00:00
Saul-Mirone ad422d2f05 refactor(editor): move crud to doc (#9479) 2025-01-02 07:27:08 +00:00
Saul-Mirone be387a6f33 refactor(editor): set readonly (#9475) 2025-01-02 04:02:15 +00:00
Saul-Mirone 6c33eaace0 refactor(editor): extract frame title widget (#9458) 2024-12-31 10:12:03 +00:00
L-Sun b51de2ac4c fix(editor): add index checking to selected elements array (#9453)
Close https://toeverything.sentry.io/issues/6187666983/?alert_rule_id=15031714&alert_type=issue&notification_uuid=fe3f4b9d-1e86-420e-a715-c3ca0fa932e4&project=4506307500179456&referrer=slack
2024-12-31 08:05:13 +00:00
Saul-Mirone 597b631918 refactor(editor): extract color picker component (#9456) 2024-12-31 07:23:37 +00:00
Saul-Mirone 9dc1b5e25b refactor(editor): remove duplicated method (#9451) 2024-12-31 06:32:12 +00:00
Saul-Mirone 1e34ec8487 refactor(editor): extract data view block (#9452) 2024-12-31 06:15:35 +00:00
doodlewind 2b47625deb refactor(editor): render presentation toolbar on demand (#9442) 2024-12-31 02:01:35 +00:00
Saul-Mirone c28f918527 refactor(editor): extract database block (#9435)
Part of: [BS-2269](https://linear.app/affine-design/issue/BS-2269/%E8%BF%81%E7%A7%BB-database-block-%E5%88%B0-affine-%E6%96%87%E4%BB%B6%E5%A4%B9%E4%B8%8B%E5%B9%B6%E5%BC%80%E5%90%AF-nouncheckedindexedaccess)
2024-12-30 12:59:57 +00:00
Saul-Mirone e526106f45 refactor(editor): extract surface ref block (#9433) 2024-12-30 12:09:26 +00:00
Saul-Mirone b66a64bc9a refactor(editor): use spec builder (#9424) 2024-12-30 08:42:58 +00:00
Flrande 4fee0e2eb3 fix(editor): should delete collapsed siblings when delete heading (#9376) 2024-12-30 08:12:04 +00:00
Saul-Mirone e3b6841944 refactor(editor): reorg block specs (#9421) 2024-12-30 05:59:25 +00:00
fundon b9f2650369 feat(editor): store real color values in edgeless (#9254)
### What's Changed!

* adds theme type: `ThemeSchema`
* adds default theme: `DefaultTheme`
* stores real color values
2024-12-30 03:36:35 +00:00
fundon a5641ae608 feat(editor): update edgeless color palette (#9243)
Closes: [BS-1475](https://linear.app/affine-design/issue/BS-1475/颜色主题更新) [BS-1803](https://linear.app/affine-design/issue/BS-1803/fill-color色板影响的yuan素) [BS-1804](https://linear.app/affine-design/issue/BS-1804/border-color色板影响的yuan素) [BS-1815](https://linear.app/affine-design/issue/BS-1815/连线文字配色略瞎)

### What's Changed

* refactor `EdgelessLineWidthPanel` component, the previous width is fixed and cannot be used in the new design
* refactor `EdgelessColorPanel` and `EdgelessColorButton` components, make them simple and reusable
* delete redundant `EdgelessOneRowColorPanel` component
* unity and update color palette, if the previously set color is not in the latest color palette, the custom color button will be selected
2024-12-30 03:36:34 +00:00
Saul-Mirone cec4a4b2c0 refactor(editor): extract drag handle widget (#9415) 2024-12-29 06:51:48 +00:00
Saul-Mirone b96a03b283 refactor(editor): remote selection widget (#9408) 2024-12-28 08:47:09 +00:00
Saul-Mirone 1e4b1807be refactor(editor): query methods in edgeless api (#9407) 2024-12-28 07:48:41 +00:00
Saul-Mirone dc92d78895 refactor(editor): remove re-exports (#9406) 2024-12-28 06:51:41 +00:00
Saul-Mirone 901965b61e refactor(editor): remove components in blocks/_common (#9401) 2024-12-28 01:10:23 +00:00
Saul-Mirone 6ebefbbf2b refactor(editor): extract code block (#9397) 2024-12-27 14:45:11 +00:00
Saul-Mirone cbfe38b189 refactor(editor): add middlewares in shared adapter (#9395) 2024-12-27 12:32:44 +00:00
Saul-Mirone 76d9712f21 chore(editor): remove pie menu (#9394) 2024-12-27 12:32:42 +00:00
Saul-Mirone 80dc0e8271 refactor(editor): extract edgeless text (#9375) 2024-12-27 10:48:12 +00:00
Saul-Mirone 6da10f9a93 refactor(editor): merge get surface util (#9371) 2024-12-27 09:42:13 +00:00
pengx17 6977b0a948 fix(core): optimize at menu config loading 2 (#9366)
fix AF-2028

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">Recording at 2024-12-27 11.50.54.mp4</video>
2024-12-27 09:26:03 +00:00
donteatfriedrice fee86304ae refactor(editor): extract adapters to shared (#9344)
Extract AttachmentAdapter, ImageAdapter, NotionTextAdapter to shared.
2024-12-27 08:52:03 +00:00
doouding 7dbb85c8c2 fix: sentry AFFINE-84T (#9368)
Fixes [BS-2243](https://linear.app/affine-design/issue/BS-2243/typeerror-cannot-read-properties-of-undefined-reading-length)
2024-12-27 07:07:53 +00:00
Saul-Mirone 2b27d62b0e refactor(editor): cleanup ts-expect-error (#9369) 2024-12-27 05:14:23 +00:00
Saul-Mirone 3ae3ae98c8 refactor(editor): extract edgeless legacy slots (#9363) 2024-12-27 04:22:52 +00:00
doouding 71272203b0 fix: beginPath before drawing drag indicator (#9364)
Fixes [BS-2238](https://linear.app/affine-design/issue/BS-2238/frame-套一个-mindmap-,拖动行为不可用)
2024-12-27 04:02:57 +00:00
Brooooooklyn 706b614006 style: add sonarjs/no-gratuitous-expressions rule (#9360) 2024-12-27 03:30:20 +00:00
Saul-Mirone 5eb48343a3 chore(editor): cleanup dead code (#9359) 2024-12-27 03:13:23 +00:00
Saul-Mirone d60e9a3885 fix(editor): block selection delete conflict with native selection (#9340)
Closes: [BS-2228](https://linear.app/affine-design/issue/BS-2228/[bug]-选区删除拖拽失灵)
2024-12-26 09:46:39 +00:00
Saul-Mirone 6afa1d542f feat(editor): add edgeless crud extension (#9335) 2024-12-26 08:58:06 +00:00
doodlewind 71b5cddea1 fix(editor): use nullable inline editor root element (#9320)
Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
2024-12-26 07:55:15 +00:00
Flrande cb4dd127fd fix(editor): merge drag function and fix it (#9329) 2024-12-26 07:41:07 +00:00
Saul-Mirone fad0237d94 refactor(editor): extract html adapter to shared (#9319) 2024-12-26 04:05:10 +00:00
Saul-Mirone 0220ba4572 fix: should bring children to new doc created (#9316)
Closes: [BS-2186](https://linear.app/affine-design/issue/BS-2186/created-linked-doc-%E6%97%B6%EF%BC%8C%E4%BC%9A%E6%B8%85%E9%99%A4list%E7%9A%84-children)
2024-12-26 03:37:10 +00:00
Saul-Mirone a595a145f0 fix(editor): should remove drag preview after drop (#9313)
Closes: [BS-2219](https://linear.app/affine-design/issue/BS-2219/拖拽后,原编辑器内容有残留)
2024-12-26 02:41:09 +00:00
Saul-Mirone 2ffd0e561c refactor(editor): extract note block (#9310) 2024-12-26 01:30:44 +00:00
Saul-Mirone 5274441e14 refactor(editor): extract image block (#9309) 2024-12-25 13:26:29 +00:00
Saul-Mirone ebd97752bf refactor(editor): extract attachment block (#9308) 2024-12-25 12:19:58 +00:00
Saul-Mirone d8bc145465 refactor(editor): extract bookmark block (#9304) 2024-12-25 11:22:29 +00:00
akumatus 5e2e58de09 fix: font of AI panel should not be affected by the font of Editor settings (#9305)
Fix issue [BS-2210](https://linear.app/affine-design/issue/BS-2210).
2024-12-25 10:54:58 +00:00