Commit Graph

810 Commits

Author SHA1 Message Date
fundon
e927d02c96 fix(editor): improve link popup positioning with autoUpdate (#11510)
Closes: [BS-3038](https://linear.app/affine-design/issue/BS-3038/遇到一个新bug-抽象的一p)

Maybe the `mock selection widget` is needed.
2025-04-07 13:33:11 +00:00
Saul-Mirone
1f45cc5dec refactor(editor): unify directories naming (#11516)
**Directory Structure Changes**

- Renamed multiple block-related directories by removing the "block-" prefix:
  - `block-attachment` → `attachment`
  - `block-bookmark` → `bookmark`
  - `block-callout` → `callout`
  - `block-code` → `code`
  - `block-data-view` → `data-view`
  - `block-database` → `database`
  - `block-divider` → `divider`
  - `block-edgeless-text` → `edgeless-text`
  - `block-embed` → `embed`
2025-04-07 12:34:40 +00:00
forehalo
40f218c898 chore: set base version to 0.21 2025-04-07 16:10:32 +08:00
fundon
6e10fe6205 fix(editor): popover style on link popup (#11495)
Closes: [BS-3039](https://linear.app/affine-design/issue/BS-3039/这个输入框样式也g了)
2025-04-07 06:43:37 +00:00
fundon
eb0bcd9b99 fix(editor): improve menu content UX on toolbar (#11491)
* Added scrollbar style

![Screenshot 2025-04-07 at 11.50.19.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/c2a44dcc-7f24-44d5-a855-e2c1671e85f9.png)

* Used `padding` instead of `offset`
2025-04-07 06:30:07 +00:00
L-Sun
4e33059d58 fix(editor): remove copy-as-png from toolbar of surface-ref (#11493) 2025-04-07 06:03:49 +00:00
Saul-Mirone
c306d98370 fix(editor): range sync in lit portal (#11490)
Closes: BS-3032
2025-04-07 05:38:20 +00:00
Saul-Mirone
8c473cf685 fix(editor): adjust block meta info (#11488)
Closes: BS-2901
2025-04-07 05:12:04 +00: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
donteatfriedrice
568a390b75 feat(editor): support markdown adapter preprocessed with latex delimiters (#11431)
To close [BS-2870](https://linear.app/affine-design/issue/BS-2870/支持识别-和-[-包裹内容为公式)

## Add Markdown Preprocessor Extension and Enhanced LaTeX Support

### Markdown Preprocessor Extension
This PR introduces a new preprocessor extension for Markdown adapters that allows preprocessing of content before conversion:

Adds a new PreprocessorManager for handling text transformations
Introduces extensible preprocessor interface that supports different processing levels (block/slice/doc)

Integrates preprocessor extension into the existing Markdown adapter workflow

### LaTeX Support Enhancement
Extends LaTeX support to handle both traditional and alternative syntax:
Adds support for backslash LaTeX syntax:

Block math: ```\[...\] ``` alongside existing ```$$...$$```
Inline math: ```\(...\) ``` alongside existing ```$...$```

Implements LaTeX preprocessor to standardize syntax before conversion

Updates tests to cover both syntax variants
2025-04-07 02:18:04 +00:00
Saul-Mirone
854569af2d refactor(editor): remove lasso tool (#11481) 2025-04-07 01:12:28 +00:00
Saul-Mirone
bb1270061a feat(editor): gfx template package (#11480) 2025-04-06 12:24:13 +00:00
Saul-Mirone
41499c1cd6 refactor(editor): merge implementation of createTemplateJob (#11474) 2025-04-05 12:59:48 +00:00
Saul-Mirone
aed7f40568 refactor(editor): improve element adapters (#11473) 2025-04-05 09:40:13 +00:00
Saul-Mirone
0fbca31c27 refactor(editor): improve edgeless clipboard config (#11472) 2025-04-05 03:48:26 +00:00
Saul-Mirone
2a1306c58c refactor(editor): separate the element renders (#11461) 2025-04-04 13:09:46 +00:00
Saul-Mirone
5a1106fb88 refactor(editor): extract brush element renderer (#11460) 2025-04-04 13:09:45 +00:00
Saul-Mirone
138e7f60de refactor(editor): extensionalize surface canvas renderer (#11456) 2025-04-04 13:09:45 +00:00
renovate[bot]
0f7a739b3b chore: bump up all non-major dependencies (#11351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-04-04 18:37:22 +08:00
CatsJuice
46d8d30e62 feat(editor): disable clickToDrag for edgeless toolbar shape and mindmap (#11310) 2025-04-04 05:10:05 +00:00
JimmFly
7a1d5ab252 feat(core): upgrade icons package (#11435) 2025-04-04 04:52:49 +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
L-Sun
90a3bd53cd chore(editor): telemetry for slash menu (#11438)
Close [BS-2959](https://linear.app/affine-design/issue/BS-2959/slash-menu埋点)
2025-04-03 13:31:09 +00:00
L-Sun
f2865c7bb0 fix(editor): prevent white edges in grid background by rounding grid gap (#11454)
Close [BS-2147](https://linear.app/affine-design/issue/BS-2147/%E7%A7%BB%E5%8A%A8%E7%AB%AF%EF%BC%8C%E5%8D%95%E6%8C%87%E6%BB%91%E5%8A%A8%E6%97%B6%E4%BC%9A%E5%87%BA%E7%8E%B0%E5%AF%B9%E9%BD%90%E7%BA%BF)
2025-04-03 13:17:47 +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
01429f8f66 fix(editor): clear remote selection when editor is deactive (#11450)
Closes: BS-3022
2025-04-03 09:36:28 +00:00
Saul-Mirone
773db7860a feat(editor): not sync selection from awareness (#11420) 2025-04-03 09:22:26 +00:00
L-Sun
727c540fda fix(editor): disable pointer event in surface-ref content (#11448)
Close [BS-3016](https://linear.app/affine-design/issue/BS-3016/当在-page-下框选时,如果遇到-affine-surface-ref-block-则会阻断框选)
Close [BS-3020](https://linear.app/affine-design/issue/BS-3020/inserted-frame-%E7%82%B9%E5%87%BB%E9%87%8C%E9%9D%A2%E7%9A%84%E5%9B%BE%E7%89%87%E4%BC%9A%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80)
2025-04-03 09:05:27 +00:00
L-Sun
56e98f26ff refactor(editor): update surface-ref placeholder (#11440)
Close [BS-2996](https://linear.app/affine-design/issue/BS-2996/删除的-inserted-frame-需要更新样式)
2025-04-03 09:05:27 +00:00
fundon
dd109459a9 fix(editor): adjust button background color of inner toolbar in dark mode (#11439)
Closes: [BS-3018](https://linear.app/affine-design/issue/BS-3018/在-dark-主题下,imagesurface-ref-inner-toolbar-没背景色)
2025-04-03 08:39:53 +00:00
fundon
e334347592 fix(editor): disable touch events on toolbar (#11447)
Closes: [BS-3021](https://linear.app/affine-design/issue/BS-3021/在-toolbar-上禁止-touch-事件冒泡,触发白板缩放)
2025-04-03 08:27:06 +00:00
L-Sun
64ed23d473 fix(editor): missing refFlavour in creation of surface-ref (#11445) 2025-04-03 07:57:10 +00:00
pengx17
a4c76ff485 fix(editor): link popover ui in modal (#11415)
fix AF-2316
2025-04-03 05:11:46 +00:00
donteatfriedrice
9206145a48 feat(editor): remove embed iframe feature flag (#11432)
Close [BS-3019](https://linear.app/affine-design/issue/BS-3019/remove-embed-iframe-feature-flag)
2025-04-03 04:59:52 +00:00
L-Sun
f2646796fc refactor(editor): remove unused modal (#11428) 2025-04-03 04:21:20 +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
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
L-Sun
b53b2acfe3 fix(ios): mobile modal occlusion issues (#11427)
Close [BS-2925](https://linear.app/affine-design/issue/BS-2925/移动端-dialog-遮挡相关)
2025-04-03 01:51:57 +00:00
L-Sun
80a663efe7 fix(ios): adjust bootom padding of body when keyboard toolbar existed (#11410)
Close [BS-2919](https://linear.app/affine-design/issue/BS-2919/【移动端】ios-页面底部点几,页面定位有问题,光标和浮层重叠,并且看不到新添加的-block)
Close [BS-2918](https://linear.app/affine-design/issue/BS-2918/【移动端】ios-添加标题无法展示对应-block,滑动页面也无效,光标位置也不对)

## Changes
- Fixed body padding calculation when keyboard toolbar is present
- Removed redundant position controller logic and simplified the implementation
2025-04-03 01:51:57 +00:00
L-Sun
5109ceccec fix(ios): can not open keyboard in editor (#11401)
Close [BS-2917](https://linear.app/affine-design/issue/BS-2917/【移动端】ios-唤起键盘的edge-case)

This PR fixes an issue where the keyboard cannot be re-triggered on iOS devices after the keyboard toolbar is hidden or executing some actions in keyboard toolbar.

Key changes:
- Preserve and restore the initial input mode when keyboard toolbar shows/hides
- Improve virtual keyboard service interface to better handle keyboard state
- Add proper cleanup of input mode state in component lifecycle
2025-04-03 01:51:56 +00:00
fundon
2026f12daa fix(editor): improve color preview in custom tab of color picker (#11411)
Closes: [BS-3002](https://linear.app/affine-design/issue/BS-3002/color-picker-上-lightdark-按钮颜色丢失)

[Screen Recording 2025-04-02 at 17.19.34.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/13288c59-ef11-4cbb-aec7-934a8a689feb.mov" />](https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/13288c59-ef11-4cbb-aec7-934a8a689feb.mov)
2025-04-03 01:38:27 +00:00
fundon
fde97dcf78 fix(editor): improve some experiences on note toolbar (#11413)
Closes: [BS-3004](https://linear.app/affine-design/issue/BS-3004/page-block-ui-adjust)
2025-04-02 13:11:33 +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
donteatfriedrice
b8fd6370f8 fix(editor): remove embed iframe toolbar edit item (#11396) 2025-04-02 08:40:56 +00:00
doouding
36b1ca4327 feat: render placeholder in edgeless mode (#11387)
Complete [BS-2997](https://linear.app/affine-design/issue/BS-2997/在白板上渲染-inserted-frame-group-时提供占位)
2025-04-02 06:59:25 +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
pengx17
08eb248cb4 fix(core): add toDocSearchParams for better typeschecking doc search params (#11383) 2025-04-02 04:46:22 +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
L-Sun
8d9f5327a1 chore(editor): update slash menu tooltips of latex and loom (#11350)
Close [BS-2983](https://linear.app/affine-design/issue/BS-2983/slash-menu-loom没有tooltip)
Close [BS-2953](https://linear.app/affine-design/issue/BS-2982/slash-menu中latex没有tooltip)
2025-04-02 01:11:18 +00:00
Saul-Mirone
7f98420061 chore: allow cursor in none-contenteditable blocks (#11366) 2025-04-01 13:20:08 +00:00