L-Sun
37fbfbcf3e
fix(editor): zindex of frame child not updated ( #10580 )
...
Close [BS-2689](https://linear.app/affine-design/issue/BS-2689/[bug]-%E5%BD%93%E5%B1%82%E7%BA%A7%E4%BD%8E%E4%BA%8E-frame-%E7%9A%84yuan%E7%B4%A0%E8%A2%AB%E6%8B%96%E5%85%A5-frame-%E6%97%B6%E5%B1%82%E7%BA%A7%E5%BA%94%E8%AF%A5%E8%A2%AB%E8%87%AA%E5%8A%A8%E6%8B%89%E9%AB%98%E5%B5%8C%E5%85%A5-frame )
2025-03-03 10:51:27 +00:00
zzj3720
5c5c9f8dcd
fix(editor): insertion position of new rows and columns is incorrect in table block ( #10516 )
...
fix: BS-2714
2025-02-28 12:06:28 +00:00
L-Sun
90b37ce65c
fix(core): editor blur unexpectedly when clicking blank area ( #10501 )
...
### Before
https://github.com/user-attachments/assets/3c4b20e1-6d89-4dc7-a51f-04b6e9a89486
### After
https://github.com/user-attachments/assets/86b93403-597e-4dbb-ab65-90908342c230
2025-02-28 07:05:06 +00:00
Saul-Mirone
1d865ad883
test(editor): collab table test ( #10506 )
...
1. **Table UI Enhancements - Test IDs Added**
- Added `data-testid` attributes to several table components for better testability:
- `add-column-button` for the column addition button
- `add-row-button` for the row addition button
- `drag-column-handle` for column drag handles
- `drag-row-handle` for row drag handles
2. **New Test Infrastructure**
- Added new testing utilities in `tests/kit/src/bs/`:
- `misc.ts`: Added `waitNextFrame` utility function for handling animation frame timing in tests
- `table.ts`: Added comprehensive table testing utilities including:
- `createTable`: Creates a new table with initial cells
- `getCellText`: Retrieves text from a specific table cell
- `inputToCell`: Inputs text into a specific table cell
- `clickDeleteButtonInTableMenu`: Handles table deletion operations
3. **New Collaboration Test**
- Added a new test file `tests/affine-local/e2e/blocksuite/table/collab.spec.ts` that tests table collaboration features:
- Tests synchronization between two pages (A and B)
- Verifies table operations sync correctly:
- Adding columns and rows
- Inputting cell content
- Deleting columns and rows
- Validates cell content consistency across both pages
- Tests the complete table manipulation workflow in a collaborative setting
4. **Package Configuration Update**
- Modified `tests/kit/package.json` to expose new test utilities:
- Added new export mapping: `"./bs/*": "./src/bs/*.ts"` to make the new table testing utilities accessible
This PR primarily focuses on improving table testing infrastructure and adding comprehensive collaboration tests for the table functionality, while also enhancing component testability through data-test-ids.
2025-02-28 04:37:12 +00:00
fundon
caa4dfedfc
fix(editor): adjust black and white in shape text color palettes to pure black and pure white ( #10450 )
...
Closes: [BS-2697](https://linear.app/affine-design/issue/BS-2697/检查shape-text-color黑白不映射的pr合并状态 )
https://github.com/user-attachments/assets/732612e9-5e43-453f-aef2-5f32f5a08614
2025-02-27 06:05:42 +00:00
L-Sun
2732b96d00
fix(editor): overflow of embed github card in edgeless note ( #10442 )
...
This PR fixes the overflow of the `embed-github-card` inside edgeless notes.
https://github.com/user-attachments/assets/21775d0f-e4c8-4fcc-86d8-aafb27033358
2025-02-26 09:33:57 +00:00
fundon
c058f94e15
chore(editor): improve color formatting tests ( #10429 )
2025-02-26 08:19:54 +00:00
Saul-Mirone
adcc6b578c
refactor(editor): move editor components to frontend core ( #10335 )
...
### TL;DR
Moved editor components from BlockSuite presets to AFFiNE core and updated imports accordingly.
### What changed?
- Relocated `EdgelessEditor` and `PageEditor` components from BlockSuite presets to AFFiNE core
- Removed basic editor examples from playground
- Updated import paths across the codebase to reference new component locations
- Added editor effects registration in AFFiNE core
- Removed editor exports from BlockSuite presets
### How to test?
1. Launch the application
2. Verify both page and edgeless editors load correctly
3. Confirm editor functionality remains intact including:
- Document editing
- Mode switching
- Editor toolbars and controls
- Multiple editor instances
### Why make this change?
This change better aligns with AFFiNE's architecture by moving editor components closer to where they are used. It reduces coupling with BlockSuite presets and gives AFFiNE more direct control over editor customization and implementation.
2025-02-21 04:28:54 +00:00
Saul-Mirone
90b0982dd3
fix(editor): hide edgeless only note in synced doc block ( #10277 )
...
Closes: [BS-2616](https://linear.app/affine-design/issue/BS-2616/embed-view-%E5%B1%95%E7%A4%BA%E4%B8%8D%E8%AF%A5%E5%87%BA%E7%8E%B0%E7%9A%84-note-%E5%86%85%E5%AE%B9 )
2025-02-19 08:40:26 +00:00
donteatfriedrice
319d909ac8
fix(editor): paste surface-ref block to another doc as embed-linked-doc block ( #10274 )
...
[BS-2155](https://linear.app/affine-design/issue/BS-2155/复制-insert-frame-group-粘贴后,应当变为-block-ref-link )
2025-02-19 07:02:27 +00:00
donteatfriedrice
15e9acefc2
fix(editor): paste when select multiple block texts ( #10227 )
...
[BS-2512](https://linear.app/affine-design/issue/BS-2512/选中多段粘贴,多段只有第一段会被replace,这个bug还在 )
2025-02-18 12:13:55 +00:00
Flrande
cedee0a1b2
fix(editor): split at the start of list with children ( #10244 )
2025-02-18 09:10:00 +00:00
L-Sun
011c18de8b
fix(editor): hide collpased content during dragging note ( #10133 )
...
Close [BS-2531](https://linear.app/affine-design/issue/BS-2531/%E6%8B%96%E5%8A%A8%E6%8A%98%E5%8F%A0%E7%9A%84note%E6%97%B6%EF%BC%8C%E4%B8%8D%E6%98%BE%E7%A4%BA%E9%9A%90%E8%97%8F%E5%86%85%E5%AE%B9 ), [BS-2536](https://linear.app/affine-design/issue/BS-2536/page-block%E9%A1%B6%E9%83%A8toolbar )
2025-02-13 04:18:11 +00:00
L-Sun
54d194afe7
fix(editor): set edgeless note style will override collapse state ( #10098 )
...
Close [BS-2489](https://linear.app/affine-design/issue/BS-2489/%E6%94%B9%E5%8F%98note-style%E4%BC%9A%E9%87%8D%E7%BD%AEcollapse%E7%8A%B6%E6%80%81 )
2025-02-11 14:29:25 +00:00
L-Sun
0b3c7a578e
fix(editor): collapsed page block visibility ( #10097 )
...
This PR fixed that doc title is not hidden when page block is collapsed
2025-02-11 14:29:24 +00:00
L-Sun
42bdae16fb
fix(editor): only render emoji in page block header ( #10096 )
2025-02-11 14:29:23 +00:00
L-Sun
9f56a21d8a
feat(editor): add animation for switching to edgeless mode firstly ( #10021 )
...
Close [BS-2327](https://linear.app/affine-design/issue/BS-2327/page-block-%E5%9C%A8-edgeless-%E5%88%87%E6%8D%A2%E7%BC%A9%E6%94%BE%E5%8A%A8%E7%94%BB )
### What Changes:
- Add a zoom animation when switching to edgeless mode firstly
- Move viewport record from `sessionStorage` to `localStorage`
https://github.com/user-attachments/assets/dac11aab-76bd-44b1-8c0e-4a8a10919841
2025-02-10 07:41:10 +00:00
L-Sun
891d9df0b1
feat(editor): show doc title in page block ( #9975 )
...
Close [BS-2392](https://linear.app/affine-design/issue/BS-2392/page-block-需要显示文章title )
### What Changes
- Add `<doc-title>` to edgeless page block (a.k.a the first page visible note block)
- Refactors:
- Move `<doc-title>` to `@blocksuite/affine-component`, but you can aslo import it from `@blocksuite/preset`
- Extract `<edgeless-note-mask>` and `<edgeless-note-background>` from `<affine-edgeless-note>` to a seperate file
- Rewrite styles of `<affine-edgeless-note>` with `@vanilla-extract/css`
https://github.com/user-attachments/assets/a0c03239-803e-4bfa-b30e-33b919213b12
2025-02-06 21:18:28 +00:00
Oleg
e3fac97b9b
fix(web): minor bug fixes ( #9696 )
...
Co-authored-by: Mirone <Saul-Mirone@outlook.com >
2025-01-27 14:21:41 +09:00
L-Sun
829980bace
refactor(editor): toc dragging with std.dnd ( #9883 )
...
Close [BS-2458](https://linear.app/affine-design/issue/BS-2458/toc-dnd重构 )
### What Changes
- Refactor toc note card dnd with `std.dnd`
- Extract note display mode change to command `changeNoteDisplayMode`
- It will reorder notes when the display mode changed from `EdgelessOnly` to page mode visible (a.k.a `DocOnly` or `Both`)
2025-01-24 13:27:17 +00:00
L-Sun
02bcecde72
refactor(editor): simplify TOC implementation with signal and context ( #9873 )
...
### What Changes
1. Used `@preact/signal` and `@lit/context` to simplify repetitive passing of properties of TOC components,
2. Fixed TOC invalid when editor changed, such as click new page button.
2025-01-23 17:01:04 +08:00
L-Sun
4839f0f369
refactor(editor): shadowless TOC with valilla extract css ( #9856 )
...
Close [BS-2474](https://linear.app/affine-design/issue/BS-2474/使用shadowlesselement重构toc )
This PR refactor TOC with `ShadowlessElement` and `@valilla-extract/css`
2025-01-22 16:24:31 +00:00
L-Sun
16d4430ec9
test(editor): move tests of toc to affine ( #9833 )
2025-01-21 13:34:59 +00:00
Flrande
b6a8d644f8
test(editor): add tests for heading toggle ( #9820 )
2025-01-21 09:35:33 +00:00
L-Sun
7400cf225f
refactor(editor): highlight selected cards of TOC based on signal ( #9807 )
...
Close [BS-2314](https://linear.app/affine-design/issue/BS-2314/添加打开toc时,将note-block-高亮 ), [BS-1868](https://linear.app/affine-design/issue/BS-1868/toc-里面-note之间顺序可拖动性,在page和edgeless里面是不同的,这个是设计的行为么 ?)
This PR refactor the highlight logic of note cards of TOC panel:
- notes block selected in edgeless note
- notes block covered by text or block selection in page mode
- note cards selected in TOC for dragging
Other changes:
- remove not used codes
- add tests for highlight note cards
2025-01-21 07:50:57 +00:00
zzj3720
2e18ae59e3
refactor(editor): do not create a tag column by default anymore ( #9789 )
...
close: BS-2423
2025-01-20 06:59:10 +00:00
L-Sun
6ba802fb17
feat(editor): append note to page button ( #9762 )
...
Close [BS-2310](https://linear.app/affine-design/issue/BS-2310/note-display-in-page-%E7%9A%84%E8%A1%8C%E4%B8%BA ), [BS-2312](https://linear.app/affine-design/issue/BS-2312/edgeless-note-%E7%9A%84-element-toolbar-%E6%B7%BB%E5%8A%A0display-in-page%E6%8C%89%E9%92%AE ) and [BS-2313](https://linear.app/affine-design/issue/BS-2313/添加display-in-page的toast提示,以及打开toc的按钮 )
2025-01-19 08:35:02 +00:00
L-Sun
d8727c2001
fix(editor): close embed edit modal on editor unmount ( #9765 )
...
Close [BS-2436](https://linear.app/affine-design/issue/BS-2436/should-close-embed-card-edit-modal-after-editor-unmount )
### What Changes:
- fix(editor): close embed edit modal on editor unmount
- test(editor): add test to embed edit modal when switching mode
2025-01-17 11:53:09 +00:00
L-Sun
969ac30874
fix(editor): reactive heading icon ( #9729 )
...
Close [BS-2407](https://linear.app/affine-design/issue/BS-2407/[bug]-edgeless-里选中-title-后更改,hint-没有改变 )
2025-01-16 08:32:15 +00:00
L-Sun
94c9717a35
feat(editor): edgeless page block toolbar ( #9707 )
...
Close [BS-2315](https://linear.app/affine-design/issue/BS-2315/page-block-header )
### What Changes
- Add header toolbar to page block (the first note in canvas)
- Add e2e tests
- Add some edgeless e2e test utils. **The package `@blocksuite/affine` was added to `"@affine-test/kit"`**
2025-01-15 12:04:44 +00:00
fundon
0b2d11e6b1
fix(editor): text highlighting ( #9708 )
2025-01-15 10:57:27 +00:00
zzj3720
c016f8e37e
feat(editor): support linked-doc in rich-text column ( #9634 )
...
close: BS-2345
2025-01-10 14:43:40 +00:00
zzj3720
8e8058a44c
feat(editor): support pasting Excel data into database block ( #9618 )
...
close: BS-2338
2025-01-09 14:35:19 +00:00
pengx17
83c587f8ad
feat(core): at menu journal entries ( #8877 ) ( #8935 )
...
fix AF-1790
fix AF-1774
added `DateSelectorDialog` for selecting a date through blocksuite;
added `AtMenuConfigService` for constructing the at menu config
fix AF-1776
fix PD-1942
resubmitted to replace #8877
2024-11-27 03:08:11 +00:00
JimmFly
10963da706
refactor(core): improve editor gap appendParagraph function ( #8567 )
...
close AF-1257
Every time we clicked on an empty space at the bottom, a new Paragraph block was created.
Now we change it so that if there is already an empty Paragraph block at the bottom, we focus it instead of creating a new one.
2024-10-24 10:53:18 +00:00
pengx17
4b6c4ed546
feat(core): doc database properties ( #8520 )
...
fix AF-1454
1. move inline tags editor to components
2. add progress component
3. adjust doc properties styles for desktop
4. subscribe bs database links and display in doc info
5. move update/create dates to doc info
6. a trivial e2e test
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4 ">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4 ">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4 ">10月23日.mp4</video>
2024-10-24 07:38:45 +00:00
L-Sun
afb21f734e
fix(core): fix position of toc in peekview ( #8441 )
...
Close [BS-1536](https://linear.app/affine-design/issue/BS-1536/peekview中的toc没有fixed )
2024-10-08 02:44:33 +00:00
L-Sun
620d20710a
chore: bump bs ( #7899 )
...
Bump blocksuite from https://github.com/toeverything/blocksuite/pull/7934
## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7985 @L-Sun
## Misc
- https://github.com/toeverything/BlockSuite/pull/7971 @L-Sun
- https://github.com/toeverything/BlockSuite/pull/7965 @doouding
2024-08-16 08:46:16 +00:00
L-Sun
ff68efb206
chore: bump blocksuite ( #7776 )
...
## Features
- https://github.com/toeverything/BlockSuite/pull/7859 @akumatus
- https://github.com/toeverything/BlockSuite/pull/7855 @darkskygit
- https://github.com/toeverything/BlockSuite/pull/7858 @donteatfriedrice
## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7843 @doouding
- https://github.com/toeverything/BlockSuite/pull/7863 @L-Sun
- https://github.com/toeverything/BlockSuite/pull/7865 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7860 @doouding
- https://github.com/toeverything/BlockSuite/pull/7857 @fundon
## Refactor
- https://github.com/toeverything/BlockSuite/pull/7862 @L-Sun
## Misc
- https://github.com/toeverything/BlockSuite/pull/7833 @L-Sun
- https://github.com/toeverything/BlockSuite/pull/7864 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7861 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7849 @Saul-Mirone
2024-08-07 09:45:09 +00:00
L-Sun
f6279ee47f
chore(core): remove outline viewer feature flag ( #7770 )
2024-08-07 03:46:15 +00:00
L-Sun
bd31c8388c
fix(core): update outline viewer style ( #7641 )
...
## What changes
- Update responsive style and fix some bug of outline viewer (https://github.com/toeverything/blocksuite/pull/7759 )
- Change left and right padding of full-width editor from `15px` to `72px`
- Hide outline viewer when side outline panel is opened ([BS-987](https://linear.app/affine-design/issue/BS-987/逻辑-bug-toc-入口和-toc-侧边栏共存 ))
- Add entries of outline panel and frame panel in more menu of detail page header ( [BS-996](https://linear.app/affine-design/issue/BS-996/page-mode-下的-page-option-缺少-view-table-of-contents-的入口 ) , [BS-1006](https://linear.app/affine-design/issue/BS-1006/edgeless-mode-的-page-options-里缺少-view-all-frames ))
- Add outline viewer to dock peek preview ( [BS-995](https://linear.app/affine-design/issue/BS-995/center-peek-里缺少-quick-toc-的入口 ) )
- Add more e2e tests for outline viewer
2024-08-05 03:57:48 +00:00
L-Sun
2093685385
chore: bump blocksuite ( #7680 )
2024-07-31 21:57:51 +08:00
L-Sun
622715d2f3
feat(core): outline viewer (quick toc) ( #7614 )
...
Close: [BS-949](https://linear.app/affine-design/issue/BS-949/outline-viewer-加入到affine )
Details are in this PR: https://github.com/toeverything/blocksuite/pull/7704
2024-07-29 10:19:57 +00:00
Peng Xiao
005c02f148
fix(core): flaky tests ( #5804 )
2024-02-06 03:20:54 +00:00
Yifeng Wang
6cbf5b2a92
feat: bump blocksuite ( #5194 )
...
Co-authored-by: AyushAgrawal-A2 <ayushagl06@gmail.com >
2023-12-06 18:15:03 +08:00
Alex Yang
8f5ee9234c
test: remove deprecated api usage ( #4577 )
2023-10-11 06:05:06 +00:00
Alex Yang
4f97ea8a5d
test: cover share page e2e ( #4126 )
2023-09-02 00:57:04 -05:00
Alex Yang
70b5a9deeb
test: improve data migration suite ( #4124 )
2023-09-02 03:31:07 +00:00
Alex Yang
4472a2a0b0
fix: page validation logic ( #3626 )
2023-08-09 00:37:53 +00:00
Alex Yang
d101db2a39
chore: bump version ( #3606 )
2023-08-07 23:01:47 -04:00