donteatfriedrice
b8e7ca3214
test(editor): fix flaky embed iframe e2e test ( #11530 )
2025-04-08 08:37:12 +00:00
donteatfriedrice
43809838ef
test(editor): add embed iframe block e2e tests ( #11502 )
...
Close [BS-2669](https://linear.app/affine-design/issue/BS-2669/iframe-embed-block-添加测试 )
2025-04-07 09:43:36 +00:00
forehalo
40f218c898
chore: set base version to 0.21
2025-04-07 16:10:32 +08:00
fundon
8a13eca271
fix(editor): should focus on input of popover on toolbar ( #11485 )
...
Related to: https://github.com/toeverything/AFFiNE/pull/11429
2025-04-07 03:04:34 +00:00
Saul-Mirone
854569af2d
refactor(editor): remove lasso tool ( #11481 )
2025-04-07 01:12:28 +00:00
CatsJuice
46d8d30e62
feat(editor): disable clickToDrag for edgeless toolbar shape and mindmap ( #11310 )
2025-04-04 05:10:05 +00:00
yoyoyohamapi
030af6f426
test(core): edgeless shape e2e ( #11446 )
...
### TL;DR
Add Edgeless shape ai e2e tests.
### What Changed
- Add Edgeless shape make it real e2e
- Add Edgeless shape generate image e2e
- Fix Edgeless generate headings e2e
2025-04-03 16:53:20 +00:00
akumatus
6cf182190c
refactor(core): remove useless chat-input components ( #11426 )
...
Close [BS-2583](https://linear.app/affine-design/issue/BS-2583 ).
2025-04-03 14:53:50 +00:00
fundon
363476a46c
fix(editor): add hoverable container for image and surface-ref ( #11458 )
...
Closes: [BS-3012](https://linear.app/affine-design/issue/BS-3012/hover-yuan素时冲突 )
2025-04-03 13:43:55 +00:00
forehalo
c8d22d97d5
refactor: webpack config ( #11421 )
2025-04-03 11:55:56 +00:00
fundon
565d7b2b1e
fix(editor): should not show inner toolbar of surface-ref in edgeless ( #11453 )
...
Closes: [BS-3015](https://linear.app/affine-design/issue/BS-3015/toolbar-有时会出现空状态且被显示 ) [BS-3023](https://linear.app/affine-design/issue/BS-3023/surface-ref-inner-toolbar-的标题圆角 )
2025-04-03 11:13:09 +00:00
Saul-Mirone
773db7860a
feat(editor): not sync selection from awareness ( #11420 )
2025-04-03 09:22:26 +00:00
fundon
a1500e3ee1
fix(editor): textarea not focusing in AI panel ( #11429 )
...
Closes: [BS-3006](https://linear.app/affine-design/issue/BS-3006/insider上面,圈选yuan素后,ad-hoc的ai对话框焦点控制有大问题(无法对焦,总是会跳走) )
2025-04-03 03:27:26 +00:00
yoyoyohamapi
c61df18ab9
test(core): chat with collection & tags ( #11388 )
...
### TL:DR
* AI chat with collection E2E
* AI chat with tag E2E
> Close BS-3007
2025-04-03 02:46:08 +00:00
fundon
03dd073cb4
fix(editor): add recent open doc with mode button ( #11419 )
...
Closes: [BS-3013](https://linear.app/affine-design/issue/BS-3013/open-doc-分开两个按钮:一个快捷按钮和一个菜单 )
Split into two buttons: `recent open doc with mode button` and `open doc with dropdown menu`.
2025-04-03 02:06:14 +00:00
Flrande
51b3f2b057
fix(editor): do not display format bar with embed node ( #11371 )
...
Close [BS-2895: 点击inline名字区域不需要显示format toolbar](https://linear.app/affine-design/issue/BS-2895/点击inline名字区域不需要显示format-toolbar )
2025-04-02 09:21:32 +00:00
doouding
ef76c83184
fix: connector should remain the same when its target or source switch to other
...
shape type (#11369 )
Fixes [BS-1431](https://linear.app/affine-design/issue/BS-1431/改变-shape-形状后,connector-丢失 )
2025-04-02 05:10:30 +00:00
fundon
d9fade8045
fix(core): should display date as original title of journal ( #11375 )
...
Closes: [BS-2991](https://linear.app/affine-design/issue/BS-2991/linked-journal添加alias后,toolbar上获取不到标题 )
2025-04-02 01:24:43 +00:00
fundon
8427293d36
fix(core): fix target block cannot be reached when clicking affine-link multiple times ( #10473 )
...
Closes: [BS-2702](https://linear.app/affine-design/issue/BS-2702/超链接无法滚动到指定block )
2025-04-01 14:46:35 +00:00
fundon
f374f2695f
fix(core): add shortcuts to open doc dropdown menu ( #11358 )
...
Closes: [BS-2992](https://linear.app/affine-design/issue/BS-2992/走查toolbar上的open-in-button )
[Screen Recording 2025-04-01 at 16.37.57.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/cf4b1baf-aa2c-4f37-9c62-f7202d0f7c42.mov " />](https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/cf4b1baf-aa2c-4f37-9c62-f7202d0f7c42.mov )
2025-04-01 12:39:13 +00:00
L-Sun
cad4dde4b1
fix(editor): missing doc mode extension in frame preview ( #11348 )
...
Close [BS-2777](https://linear.app/affine-design/issue/BS-2777/frame-preview里的embed-card展示的doc-mode不对 )
2025-04-01 11:57:53 +00:00
fundon
7af5e53838
refactor(editor): image toolbar config extension ( #11329 )
...
Closes: [BS-2378](https://linear.app/affine-design/issue/BS-2378/image-toolbar-迁移 )
2025-04-01 10:04:28 +00:00
L-Sun
e7f5601303
fix(editor): undo should remove the new frame created by dragging ( #11303 )
...
Close [BS-2848](https://linear.app/affine-design/issue/BS-2848/但我发现frame创建后,要撤销两次才能删掉 )
2025-04-01 04:41:44 +00:00
renovate
1be83dc330
chore: bump up express version to v5 ( #11333 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [express](https://expressjs.com/ ) ([source](https://redirect.github.com/expressjs/express )) | [`^4.21.2` -> `^5.0.0`](https://renovatebot.com/diffs/npm/express/4.21.2/5.1.0 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [@types/express](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express ) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express )) | [`^4` -> `^5.0.0`](https://renovatebot.com/diffs/npm/@types%2fexpress/4.17.21/5.0.1 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>expressjs/express (express)</summary>
### [`v5.1.0`](https://redirect.github.com/expressjs/express/blob/HEAD/History.md#510--2025-03-31 )
[Compare Source](https://redirect.github.com/expressjs/express/compare/5.0.1...v5.1.0 )
\========================
- Add support for `Uint8Array` in `res.send()`
- Add support for ETag option in `res.sendFile()`
- Add support for multiple links with the same rel in `res.links()`
- Add funding field to package.json
- perf: use loop for acceptParams
- refactor: prefix built-in node module imports
- deps: remove `setprototypeof`
- deps: remove `safe-buffer`
- deps: remove `utils-merge`
- deps: remove `methods`
- deps: remove `depd`
- deps: `debug@^4.4.0`
- deps: `body-parser@^2.2.0`
- deps: `router@^2.2.0`
- deps: `content-type@^1.0.5`
- deps: `finalhandler@^2.1.0`
- deps: `qs@^6.14.0`
- deps: `server-static@2.2.0`
- deps: `type-is@2.0.1`
### [`v5.0.1`](https://redirect.github.com/expressjs/express/blob/HEAD/History.md#501--2024-10-08 )
[Compare Source](https://redirect.github.com/expressjs/express/compare/v5.0.0...5.0.1 )
\==========
- Update `cookie` semver lock to address [CVE-2024-47764](https://nvd.nist.gov/vuln/detail/CVE-2024-47764 )
### [`v5.0.0`](https://redirect.github.com/expressjs/express/blob/HEAD/History.md#500--2024-09-10 )
[Compare Source](https://redirect.github.com/expressjs/express/compare/4.21.2...v5.0.0 )
\=========================
- remove:
- `path-is-absolute` dependency - use `path.isAbsolute` instead
- breaking:
- `res.status()` accepts only integers, and input must be greater than 99 and less than 1000
- will throw a `RangeError: Invalid status code: ${code}. Status code must be greater than 99 and less than 1000.` for inputs outside this range
- will throw a `TypeError: Invalid status code: ${code}. Status code must be an integer.` for non integer inputs
- deps: send@1.0.0
- `res.redirect('back')` and `res.location('back')` is no longer a supported magic string, explicitly use `req.get('Referrer') || '/'`.
- change:
- `res.clearCookie` will ignore user provided `maxAge` and `expires` options
- deps: cookie-signature@^1.2.1
- deps: debug@4.3.6
- deps: merge-descriptors@^2.0.0
- deps: serve-static@^2.1.0
- deps: qs@6.13 .0
- deps: accepts@^2.0.0
- deps: mime-types@^3.0.0
- `application/javascript` => `text/javascript`
- deps: type-is@^2.0.0
- deps: content-disposition@^1.0.0
- deps: finalhandler@^2.0.0
- deps: fresh@^2.0.0
- deps: body-parser@^2.0.1
- deps: send@^1.1.0
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-01 02:24:11 +00:00
fundon
eac8f32f4c
refactor(editor): basic styles of font and panel ( #11290 )
...
* Updated `border-radius` of panel to `8px`. [BS-2901](https://linear.app/affine-design/issue/BS-2901/meta-info-ui-issue ) [BS-2810](https://linear.app/affine-design/issue/BS-2810/toolbarpicker-圆角更新为-8px )
* Refactored basic styles of font and panel.
<img width="549" alt="Screenshot 2025-03-31 at 12 56 36" src="https://github.com/user-attachments/assets/4a827e1e-f802-4251-a563-4a34b891a5e3 " />
2025-04-01 01:35:59 +00:00
Brooooooklyn
d31e0c0e71
ci: run some optimize on CI e2e ( #11330 )
2025-03-31 15:23:21 +00:00
L-Sun
c9e14ac0db
fix(editor): sync gfx block transform update with RAF to prevent stale transform ( #11322 )
...
Close [BS-2866](https://linear.app/affine-design/issue/BS-2866/presentation-mode中的note消失 )
## Problem
When using RequestAnimationFrame (RAF) for GFX block updates, there was a timing issue where the transform update would lag behind the RAF callback, causing the block to display with the previous frame's transform state.
## Solution
1. Refactored the block state management to use signals for better reactivity
2. Moved block visibility state management from `viewport-element.ts` to `gfx-block-component.ts`
3. Added `transformState$` signal to track block state
4. Synchronized transform updates with RAF using `effect` to ensure updates happen in the correct frame
5. Added test case to verify note visibility in presentation mode
2025-03-31 12:47:01 +00:00
L-Sun
fec698fd8b
chore(editor): improve selection of doc in canvas ( #11314 )
...
Close [BS-2705](https://linear.app/affine-design/issue/BS-2705/[improvement]-通过-viability-control-选择-hide-in-edgeless )
This PR disabled selecting operation of notes that are only shown in page mode.
2025-03-31 12:35:02 +00:00
fundon
f1882061a2
fix(editor): should exit drawing tools menu when Escape is pressed ( #11306 )
...
Closes: [BS-2978](https://linear.app/affine-design/issue/BS-2978/二级菜单的激活状态错误 ) [BS-2977](https://linear.app/affine-design/issue/BS-2977/pen和highlighter没做esc )
2025-03-31 11:05:01 +00:00
Brooooooklyn
47a8d15878
ci: start devServer before test running to avoid tests timeout ( #11297 )
2025-03-31 10:39:34 +00:00
EYHN
baf1aad412
fix(core): fix flaky e2e test ( #11308 )
2025-03-31 09:10:54 +00:00
Fangdun Tsai
6850871bfb
fix(editor): fix callout tests ( #11301 )
2025-03-31 08:37:20 +00:00
doouding
18cb4199fa
fix: note should hide collapse button in presentation mode ( #11292 )
...
Fixes [BS-1003](https://linear.app/affine-design/issue/BS-1003/ppt-演示状态下-note-会显示折叠箭头 )
2025-03-31 16:17:44 +08:00
EYHN
24c382d3aa
feat(core): enable callout in canary ( #11302 )
2025-03-31 08:10:18 +00:00
Mirone
9f939d823e
fix(editor): slash menu e2e ( #11289 )
2025-03-31 11:13:34 +08:00
yoyoyohamapi
317d3e7ea6
test(core): split and enhance copilot e2e tests ( #11007 )
...
### TL;DR
Split and enhance copilot e2e tests.
### What Changed
#### Tests Structure
The e2e tests are organized into the following categories:
1. **Basic Tests (`/basic`)**: Tests for verifying core AI capabilities including feature onboarding, authorization workflows, and basic chat interactions.
2. **Chat Interaction Tests (`/chat-with`)**: Tests for verifying the AI's interaction with various object types, such as attachments, images, text content, Edgeless elements, etc.
3. **AI Action Tests (`/ai-action`)**: Tests for verifying the AI's actions, such as text translation, gramma correction, etc.
4. **Insertion Tests (`/insertion`)**: Tests for verifying answer insertion functionality.
#### Tests Writing
Writing a copilot test cases is easier and clear
e.g.
```ts
test('support chat with specified doc', async ({ page, utils }) => {
// Initialize the doc
await focusDocTitle(page);
await page.keyboard.insertText('Test Doc');
await page.keyboard.press('Enter');
await page.keyboard.insertText('EEee is a cute cat');
await utils.chatPanel.chatWithDoc(page, 'Test Doc');
await utils.chatPanel.makeChat(page, 'What is EEee?');
await utils.chatPanel.waitForHistory(page, [
{
role: 'user',
content: 'What is EEee?',
},
{
role: 'assistant',
status: 'success',
},
]);
const { content } = await utils.chatPanel.getLatestAssistantMessage(page);
expect(content).toMatch(/EEee/);
});
```
#### Summary
||Cases|
|------|----|
|Before|19||
|After|151||
> Close BS-2769
2025-03-29 03:41:09 +00:00
Saul-Mirone
205cd7a86d
refactor(editor): rename block-std to std ( #11250 )
...
Closes: BS-2946
2025-03-28 07:20:34 +00:00
L-Sun
af91a0217f
refactor(editor): inner toolbar surface-ref block with extension ( #11246 )
...
This PR refactor `surface-ref` toolbar with `ToolbarExtension`
2025-03-28 05:48:24 +00:00
fundon
2c4278058b
feat(editor): add highlighter ( #10573 )
...
Closes: [BS-2909](https://linear.app/affine-design/issue/BS-2909/新增highlighter )
### What's Changed!
Currently the highlighter tool is very similar to brush, but for the future, it's a standalone module.
* Added `Highlighter` element model
* Added `Highlighter` tool
* Added `Highlighter` entry to the global toolbar
2025-03-27 08:53:26 +00:00
Saul-Mirone
d9d5aa407a
fix: split view focus ( #11217 )
...
# After:
https://github.com/user-attachments/assets/990d500d-2da7-488e-ac32-dd7bd229f896
# Before:
https://github.com/user-attachments/assets/6676766a-c76a-414b-a35e-53d2cda10c24
2025-03-27 05:27:59 +00:00
Saul-Mirone
0a8d8e0a6b
feat: seperate createDoc and createStore ( #11182 )
2025-03-26 11:03:47 +00:00
L-Sun
c23b8f604b
fix(editor): incorrect edgeless viewport in peek view ( #11040 )
...
### What Changes
- Fixed incorrect edgeless viewport display in peek view
- Moved page block viewport fit animation logic from `EdgelessRootBlockComponent` to note config extension
- Disabled page block viewport fit animation in peek view, using default `fitToScreen` instead
- @doodlewind Fixed viewport resizing issues by adding a immediate update mechanism to ensure proper rendering during peek view operations. The setViewportByBound is only called once during peek view initialization, so there are barely perf overhead.
- Updated related test cases
- Refactored peek view test cases to make them clearer and more reliable
- Added new test helper function `getViewportBound` for getting viewport boundary information
2025-03-26 09:29:05 +00:00
doouding
ace5d44a61
refactor: rewrite dblclick and selection logic of default-tool ( #11036 )
...
continue #10824
### Changed
- Moved double-click-to-edit behavior from the default tool to individual model views
- Introduced `onSelected` callback interface in gfx view components to allows developers to override default selection logic
2025-03-26 07:32:43 +00:00
akumatus
aefbc11aab
feat(core): add candidates popover in ai chat-panel ( #11178 )
...
Close [BS-2853](https://linear.app/affine-design/issue/BS-2853 ).
2025-03-25 15:50:11 +00:00
fundon
583bbf3463
fix(editor): improve affine-link toolbar ( #11159 )
...
Closes: [BS-2884](https://linear.app/affine-design/issue/BS-2884/[ui]-hover-邮箱的-toolbar )
2025-03-25 07:58:41 +00:00
L-Sun
a2e3d318ba
refactor(editor): adjust ui of surface-ref inner toolbar ( #11129 )
...
Close [BS-2803](https://linear.app/affine-design/issue/BS-2803/inserted-frame-ui%E8%B0%83%E6%95%B4 )
Close [BS-2815](https://linear.app/affine-design/issue/BS-2815/inserted-group-ui调整 )
### What Changes
- Add an inner toolbar for hovered `surface-ref-block`
- Simplify viewport related codes of `surface-ref-block`
- Expose popover floating options from `affine-menu-button`
https://github.com/user-attachments/assets/916b0a22-6271-4a6f-b338-6630e0426967
2025-03-25 03:48:12 +00:00
Saul-Mirone
80d451cc51
fix(editor): flaky e2e test ( #11144 )
2025-03-24 13:21:37 +00:00
fundon
63762b75a1
feat(core): save recent open mode of internal links ( #11086 )
...
Closes: [BS-2865](https://linear.app/affine-design/issue/BS-2865/internal-links-保存用户最近的打开方式 )
Added `openDocMode` in settings.
https://github.com/user-attachments/assets/a452da73-83e4-4ef5-9b57-58291fc22785
2025-03-24 06:12:47 +00:00
Flrande
29fdbb7105
fix(editor): disable popover when start with space ( #11092 )
2025-03-24 03:53:17 +00:00
Saul-Mirone
1f0fc9d47a
feat(editor): gfx connector package ( #11091 )
2025-03-22 14:39:05 +00:00