Commit Graph
85 Commits
Author SHA1 Message Date
Yifeng Wang 76568bae9f feat(editor): support connector dom renderer (#12505)
### TL;DR

Added DOM-based renderer for connector elements in the AFFiNE editor.

### What changed?

- Created a new DOM-based renderer for connector elements that uses SVG
for rendering
- Implemented `ConnectorDomRendererExtension` to register the DOM
renderer for connector elements
- Added support for rendering connector paths, endpoints (arrows,
triangles, circles, diamonds), stroke styles, and labels
- Registered the new DOM renderer extension in the connector view setup
- Added comprehensive tests to verify DOM rendering functionality

### How to test?

1. Enable the DOM renderer flag in the editor
2. Create connector elements between shapes or with fixed positions
3. Verify that connectors render correctly with different styles:
   - Try different stroke styles (solid, dashed)
   - Test various endpoint styles (Arrow, Triangle, Circle, Diamond)
   - Add text labels to connectors
4. Check that connectors update properly when connected elements move
5. Verify that connectors are removed when deleted

### Why make this change?

The DOM-based renderer provides an alternative to the Canvas-based
renderer, offering better accessibility and potentially improved
performance for certain use cases. This implementation allows connectors
to be rendered as SVG elements within the DOM, which can be more easily
inspected, styled with CSS, and interacted with by assistive
technologies.
2025-06-23 03:59:45 +00:00
Yifeng Wang 9d2330fc2b fix(editor): possible race condition in viewport clipping (#12503) 2025-05-26 17:08:31 +08:00
Yifeng Wang 8c1013dfe2 fix(editor): canvas element missing rotate during zooming (#12279) 2025-05-15 09:29:42 +08:00
Yifeng Wang 9cabe03386 refactor(editor): add dom renderer entry for canvas element (#12149) 2025-05-14 16:22:16 +08:00
Yifeng Wang ad7868633d test(editor): revert timeout condition in turbo renderer (#12159) 2025-05-07 09:29:12 +08:00
Yifeng Wang 16f7be7f0b perf(editor): avoid redundant dom query when editing single block (#11732) 2025-04-16 17:52:22 +08:00
Yifeng Wang 594e896f74 Merge pull request #11661 from toeverything/0414/vtr_test_layout
test(editor): add tests for turbo renderer layout cache
2025-04-15 09:46:14 +08:00
Yifeng Wang 760a689c07 Merge branch 'canary' into 0414/vtr_test_layout 2025-04-15 09:20:25 +08:00
Yifeng Wang e9d04de399 test(editor): add tests for turbo renderer layout cache 2025-04-14 17:06:13 +08:00
Yifeng Wang e68947c792 fix(editor): integration vitest config warning 2025-04-14 17:04:57 +08:00
Yifeng Wang 2cd0e75810 fix: flaky 2025-04-14 17:04:22 +08:00
Yifeng Wang 06889295e0 Merge pull request #10745 from toeverything/doodl/gfx-turbo-renderer
refactor(editor): add gfx turbo renderer package
2025-03-11 12:48:31 +08:00
Yifeng Wang e9484e8e15 refactor(editor): remove non null asserts in turbo renderer (#10454) 2025-02-27 10:47:26 +08:00
Yifeng Wang 963cc2e40e refactor(editor): reduce redundant canvas refresh on init (#10364) 2025-02-22 21:58:13 +08:00
Yifeng Wang e5315087cb chore(editor): allow remote debug in presets dev entry (#10279) 2025-02-19 15:15:48 +08:00
Yifeng Wang 26de7a56fd refactor(editor): remove redundant getOptional for gfx (#10142) 2025-02-13 11:27:20 +08:00
Yifeng Wang fc77c7d41a refactor(editor): move worker renderer to presets with basic test (#10127) 2025-02-12 19:35:06 -06:00
Yifeng Wang 53e5726d36 refactor(editor): move worker renderer to affine shared (#10081) 2025-02-11 14:16:17 +08:00
Yifeng Wang f7335d8cb6 refactor(editor): switch worker renderer debug ui to tweakpane (#10074) 2025-02-11 11:13:32 +08:00
Yifeng Wang fc4fe481ef refactor(editor): improve worker renderer code structure (#10011) 2025-02-07 14:59:08 +08:00
Yifeng Wang b9ad53ae68 feat(editor): support reusing bitmap cache when panning (#10008) 2025-02-07 04:59:43 +00:00
Yifeng Wang 077a1b38ac refactor(editor): use model coord system in worker renderer (#9969) 2025-02-06 10:36:59 +08:00
Yifeng Wang 64de83b13d chore(editor): switch to edgeless in renderer poc entry (#9950) 2025-02-05 06:36:20 +00:00
Yifeng Wang cbb73d8034 fix(editor): render position of repeated sentence (#9948) 2025-02-05 04:41:24 +00:00
Yifeng Wang 8afc50c730 fix(editor): support worker renderer zoom (#9943) 2025-02-05 12:16:06 +08:00
Yifeng Wang e45ac54709 feat(editor): add canvas worker renderer dev entry (#9719) 2025-01-20 20:40:27 +08:00
Yifeng Wang 777eea124d fix(editor): migrate basic playground examples (#9669) 2025-01-13 23:33:10 +08:00
Yifeng Wang cac0b7fd66 refactor(editor): remove default entry (#9600) 2025-01-09 14:01:48 +08:00
Yifeng Wang 4f10457815 refactor(editor): remove legacy console formatter (#9599) 2025-01-09 12:00:08 +08:00
Yifeng Wang 08ebfb6e70 fix(editor): undefined selected elements (#9429) 2024-12-30 17:25:07 +08:00
Yifeng Wang a77061e848 feat: add block visibility config (#8371) 2024-09-24 17:36:06 +08:00
Yifeng Wang b711b087c5 docs: add electron build troubleshooting (#8102) 2024-09-05 13:39:01 +08:00
Yifeng Wang 416faba2bc chore: support http proxy in bump script (#8098) 2024-09-05 10:14:51 +08:00
Yifeng WangandLongYinan fec2090de5 feat: bump blocksuite (#5767)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-01 16:28:22 +08:00
Yifeng Wang 1cf902bdb6 feat: bump blocksuite (#5735) 2024-01-29 16:40:23 +08:00
Yifeng Wangandxiaoxin 04b9029d1b feat: bump blocksuite (#5720)
Co-authored-by: xiaoxin <hongtao.lye@toeverything.info>
2024-01-26 16:27:58 +08:00
Yifeng Wang 31b1b2dade feat: bump blocksuite (#5343) 2023-12-19 21:53:57 +08:00
Yifeng Wanganddonteatfriedrice af15aa06d4 feat: bump blocksuite (#5286)
Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
2023-12-15 12:57:52 +08:00
Yifeng Wang d507c24570 feat: bump blocksuite (#5228) 2023-12-07 19:28:49 +08:00
Yifeng WangandLongYinan 819f0243d5 feat: bump blocksuite (#5218)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-12-07 18:24:23 +08:00
Yifeng WangandAyushAgrawal-A2 6cbf5b2a92 feat: bump blocksuite (#5194)
Co-authored-by: AyushAgrawal-A2 <ayushagl06@gmail.com>
2023-12-06 18:15:03 +08:00
Yifeng Wangand李华桥 28177657ef chore: bump theme (#4904)
Co-authored-by: 李华桥 <joooye1991@gmail.com>
2023-11-10 15:42:06 +08:00
Yifeng Wang 2117d6b232 chore: bump blocksuite (#4901) 2023-11-10 13:23:29 +08:00
Yifeng Wang d7838633e6 fix: preloading typo (#4197) 2023-09-05 10:18:28 +00:00
Yifeng Wang 10c609348f fix: preload typo (#4096) 2023-09-01 06:59:06 +00:00
Yifeng Wang 23e33a6061 chore: enable databse feature flag (#1895) 2023-04-12 19:23:46 +08:00
Yifeng Wang fd34a99665 build: update env template 2023-04-07 16:03:49 +08:00
Yifeng Wang 5a1e8b0c93 chore: update blocksuite (#1845) 2023-04-07 15:46:37 +08:00
Yifeng Wang 6be94ca906 chore: update blocksuite (#1667) 2023-03-23 17:09:21 +08:00
Yifeng Wang a558d0c868 build: add bump:nightly script (#1632) 2023-03-21 08:24:32 +00:00
Yifeng Wang 45ab08b459 chore: add story label in issue template (#1579) 2023-03-14 19:15:28 +08:00
Yifeng Wang 3961f9f3e0 chore: update template placeholder (#1577) 2023-03-14 18:03:44 +08:00
Yifeng Wang 06f97b5139 chore: remove redundant issue template label (#1576) 2023-03-14 17:59:58 +08:00
Yifeng Wang c746fa8c79 chore: remove legacy issue template (#1575) 2023-03-14 17:43:14 +08:00
Yifeng Wang 546ea6b5ad chore: update template title config (#1574) 2023-03-14 17:34:37 +08:00
Yifeng Wang 98138e1e3b chore: update template format (#1558) 2023-03-14 10:30:50 +08:00
Yifeng Wang aae10d44e8 chore: update blocksuite (#1553) 2023-03-13 18:19:18 +08:00
Yifeng Wang e5173d04ab chore: update blocksuite (#1545) 2023-03-13 13:40:37 +08:00
Yifeng Wang a3ed8f6774 chore: update blocksuite (#1516) 2023-03-10 18:02:16 +08:00
Yifeng Wang 93e0d5ce3b chore: update blocksuite (#1511) 2023-03-10 17:13:35 +08:00
Yifeng Wang b20be2a747 chore: update blocksuite (#1497) 2023-03-10 14:56:54 +08:00
Yifeng Wang d9bae4a853 fix: support min width for workspace list table (#1473) 2023-03-10 09:55:39 +08:00
Yifeng Wang 423ca95298 chore: update blocksuite (#1455) 2023-03-09 16:24:30 +08:00
Yifeng Wang 6594d2d47b docs: expose collaboration part in feature desc (#1453) 2023-03-09 15:51:13 +08:00
Yifeng Wang 7671361485 docs: optimize README style (#1452) 2023-03-09 15:48:21 +08:00
af6efbed7a chore: update blocksuite (#1378)
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
2023-03-07 11:36:52 +00:00
Yifeng Wang b6480bf8a6 chore: remove redundant config 2023-03-04 04:18:45 +08:00
Yifeng WangandHimself65 205092180b chore: bump blocksuite (#1298)
Co-authored-by: Himself65 <himself65@outlook.com>
2023-03-04 04:17:06 +08:00
Yifeng Wang 32a1b7b8a3 fix: bump to migratable blocksuite (#1263) 2023-03-02 18:55:22 +08:00
Yifeng Wang 205b4a5d54 chore: update blocksuite 0.5 (#1260) 2023-03-02 18:48:40 +08:00
Yifeng Wang 8c492d2a83 docs: update deps callout (#1141) 2023-02-20 17:52:37 +08:00
Yifeng Wang 1034b6d517 ci: optimize add-to-project behavior for forks (#1053) 2023-02-16 15:39:32 +08:00
Yifeng Wang e2b17bc310 ci: simplify project automation (#1046) 2023-02-16 12:28:03 +08:00
Yifeng Wang 7d096ba90e ci: auto assign on draft PRs (#1039) 2023-02-16 09:04:56 +08:00
Yifeng Wang 9a1123239f ci: add to project setup (#1038) 2023-02-16 08:46:17 +08:00
Yifeng Wang 6c0db247b7 ci: support pr auto assign (#1004) 2023-02-15 09:18:07 +08:00
Yifeng Wang 18e1eecefc docs: cleanup cla format (#934) 2023-02-09 17:52:00 +08:00
Yifeng Wang 1a2f7b8478 chore: add community link to template (#786) 2023-02-05 08:32:51 +08:00
Yifeng Wang 675e51f906 chore: remove redundant issue template config (#785) 2023-02-05 08:11:04 +08:00
Yifeng Wang 89663bc72a chore: simplify issue template (#784) 2023-02-05 08:00:15 +08:00
Yifeng Wang a0b30db810 Merge pull request #783 from toeverything/document-bump 2023-02-04 11:40:15 +08:00
Yifeng Wang 9c9ce0280f Merge pull request #746 from toeverything/20230123-fix-title 2023-01-24 08:09:27 +08:00
Yifeng Wang 449b08c9c2 feat: compat with surface block structure 2023-01-06 14:34:33 +08:00
Yifeng Wang 6df0e3b946 Merge pull request #673 from hezhizhen/patch-1
fix: typo
2023-01-05 21:58:14 +08:00
Yifeng Wang c287380067 Merge pull request #650 from toeverything/fix-debug-with-block-suite
build: enhance debugging with blocksuite
2023-01-03 23:15:40 +08:00