Commit Graph

760 Commits

Author SHA1 Message Date
CatsJuice d6ad7d566f chore(core): adjust ai onboarding dismiss logic, persist dialog and dismiss once closed (#7417) 2024-07-04 07:00:17 +00:00
donteatfriedrice a0ce75c902 fix: ai button should not display in readonly mode (#7415)
[BS-737](https://linear.app/affine-design/issue/BS-737/shared-page-也可以用-ai)
2024-07-03 07:34:07 +00:00
pengx17 cc7740d8d3 fix: some regression issues on quick search refactor (#7410)
- fix PD-1370. doc link resolve issue on pasting
- fix AF-1029
- implement doc creation in doc search

added two test cases to cover the above two issues.
2024-07-03 03:24:50 +00:00
pengx17 10df1fb4b7 fix: menu in peek view content not scrollable issue (#7412)
when using [dialog.overlay](https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/src/Dialog.tsx#L203-L211
), whole app is affected by [react-scroll library](https://github.com/theKashey/react-remove-scroll/blob/8923c513d269190162eb4678c1b80137f5998679/src/SideEffect.tsx#L131-L134
):

In the current implementation, only the contents in the dialog content will be scrollable and cannot be configured in current API.

This PR introduces a simple div overlay to get rid of this issue.

fix BS-696
2024-07-03 02:58:41 +00:00
zzj3720 0bc09a9333 feat(core): update blocksuite feature flag (#7408) 2024-07-03 02:47:20 +00:00
forehalo f0d127fa29 Revert "feat(core): run indexer in worker (#7295)"
This reverts commit c62d79ab14.
2024-07-03 10:16:27 +08:00
pengx17 fc729d6a32 fix: hide find in page command in cmdk (#7413) 2024-07-02 15:48:24 +00:00
pengx17 ef7ba273ab fix: copy share link to clipboard command display issue (#7411)
fix AF-1027
2024-07-02 15:28:30 +00:00
pengx17 2a6ea3c9c6 feat(core): allow keyboard navigation in tags inline editor (#7378)
fix AF-966

- Allow using arrowup/down to navigate the tag list candidates; press enter to add the currently focused tag option;
- Allow using arrowleft/right to navigate the inline tag list (selected) and use backspace to delete focused tag.
2024-07-02 14:25:51 +00:00
EYHN c62d79ab14 feat(core): run indexer in worker (#7295) 2024-07-02 09:18:08 +00:00
EYHN 27d0fc5108 refactor(core): use new backlink indexer (#7296) 2024-07-02 09:18:01 +00:00
EYHN 40e381e272 refactor(core): new quick search service (#7214) 2024-07-02 09:17:54 +00:00
EYHN 15e99c7819 feat(core): docs search service (#7213) 2024-07-02 09:17:47 +00:00
Peng Xiao 8c4a42f0e6 fix: cmd-k keybinding not show when editor input is active (#7398) 2024-07-01 19:31:36 +08:00
Flrande 4d484ea814 feat: bump blocksuite (#7372) 2024-07-01 19:21:14 +08:00
EYHN 3bbb657a78 feat(core): replace ai template (#7396) 2024-07-01 10:24:54 +00:00
KushalSharmaGit d72dbe682c fix: ensure exact tag matching with enter key behavior refinement (#7387)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2024-07-01 10:16:16 +08:00
EYHN 824be0d4c1 fix(core): fix viewtransition and css property missing (#7377) 2024-06-28 18:03:43 +08:00
golok727 fbf676002f fix: code block toolbar z-index issue in right sidebar (#7376)
Closes: [BS-549](https://linear.app/affine-design/issue/BS-549/code-block-%E5%9C%A8%E5%8F%B3%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%9C%89-z-index-%E9%97%AE%E9%A2%98%E8%AF%AD%E8%A8%80%E7%9A%84%E4%BF%A1%E6%81%AF%E5%87%BA%E7%8E%B0%E5%9C%A8%E4%BA%86-tab-%E4%B8%8A%E9%9D%A2),[BS-600](https://linear.app/affine-design/issue/BS-600/the-code-toolbar-remains-visible-when-it-overflows-in-the-ai-panel)
2024-06-28 07:48:50 +00:00
regischen e877f20955 fix: add onboarding entry (#7375)
Don't know why it's missed..
https://github.com/toeverything/AFFiNE/pull/7109
2024-06-28 07:03:33 +00:00
regischen f4f84d2793 fix: click continue with ai not work (#7374) 2024-06-28 14:43:45 +08:00
pengx17 34b6a3bf1f fix: escape key handling compatibility issue with blocksuite (#7365)
fix PD-1347

See
https://github.com/radix-ui/primitives/blob/main/packages/react/use-escape-keydown/src/useEscapeKeydown.tsx#L19-L20

This behavior in radix-ui is not possible to be prevented since escape keydown is bound to document with capturing, unless dialogs in blocksuite is also implemented with radix-ui.
2024-06-28 06:21:36 +00:00
EYHN eca484dc28 fix(core): add loading for insert ai template (#7369) 2024-06-28 14:19:59 +08:00
Fangdun Tsai 855d555480 fix(core): should return a cleanup function (#7371) 2024-06-28 14:18:24 +08:00
forehalo d51fd8b54b fix(core): correct image action icon (#7370)
fix AF-1002

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/5c0ymolP9B7QStCsS1RP/b2e7afb1-e6bf-4589-8c60-32bede366350.png)
2024-06-28 05:24:06 +00:00
pengx17 4f07a2cc2a fix(core): debounce doc update time update (#7363) 2024-06-27 10:37:43 +00:00
Peng Xiao c8f418f9c5 fix: use sgtpooki/file-type for resolving image type (#7326) 2024-06-27 10:08:08 +00:00
Peng Xiao 2c92e97c48 fix: embed doc link rendering (#7361) 2024-06-27 17:58:33 +08:00
Cats Juice fa2305b0e2 feat(core): replace all radio-button-group usage (#7352) 2024-06-27 17:54:30 +08:00
pengx17 81462fe000 refactor(core): view transition api for peek-view modal animation (#7350)
Remaining issue:
modal controls' position is not relatively moved to the parent container during transitioning.
2024-06-27 08:38:16 +00:00
donteatfriedrice 742c10ac94 feat: make width and height of generated image same with input image (#7356)
[BS-641](https://linear.app/affine-design/issue/BS-641/通过image-action生成的图像尺寸应与原图保持一致)
2024-06-27 08:02:32 +00:00
JimmFly 4af6223dc3 chore(core): removed obsolete TODO (#7337)
Cleaned up some TODOs that no longer need to be done
2024-06-27 06:30:29 +00:00
JimmFly f15d1911ee refactor(core): remove the automatic URL change feature (#7339)
close [AF-954](https://linear.app/affine-design/issue/AF-954/center-peek-中-editor-selection-变化不应修改-location-hash)

Since the URL changes constantly with the selection, causing the editor to render frequently and also affecting the use of center peek, we decided to remove the function of automatically changing the URL.
2024-06-27 05:52:04 +00:00
EYHN 595b904d24 fix(core): fix ui flickering on startup (#7349) 2024-06-27 03:33:14 +00:00
Fangdun Tsai a5662e3de2 fix(core): optimize request chat cards fn (#7331) 2024-06-26 23:50:45 +08:00
EYHN dcf766f0ee feat(core): impl ai onboarding templates (#7341) 2024-06-26 13:49:23 +00:00
akumatus 6344456d37 fix: doc update time outdated (#7344)
Fix issue [BS-603](https://linear.app/affine-design/issue/BS-603).

- Move observe `blockUpdated` logic in `blocksuite-editor` component, so it can be excuted on both page-detail and center-peek mode.
- Remove useless `getDocUpdatedAt` service, because blocksuite can get `docMeta` directly.

https://github.com/toeverything/blocksuite/pull/7434

https://github.com/toeverything/AFFiNE/assets/12724894/e01e3f97-f1d0-4d1d-a8ed-e70e27e39bdb
2024-06-26 12:46:00 +00:00
donteatfriedrice 6f9a4bb01a feat: optimize edgeless ai action insert handler (#7342)
[BS-653](https://linear.app/affine-design/issue/BS-653/在-edgeless-text-上使用-ai-功能时,应该在-edgeless-text-内换行插入,而不是新建一个-note)
2024-06-26 10:17:19 +00:00
L-Sun 59fe5fb57a chore(core): update inline reference icon (#7340)
Close [BS-659](https://linear.app/affine-design/issue/BS-659/deleted-doc%E7%8A%B6%E6%80%81%E7%BC%BA%E5%A4%B1)
Related PR: https://github.com/toeverything/blocksuite/pull/7433

Before:
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/aa74cb3f-5eca-4456-992c-a04e58760edd.png)

After:
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/0e2c437c-7317-47fb-8d90-07d32efe53df.png)
2024-06-26 08:34:23 +00:00
pengx17 7baa260e97 refactor(core): image block use peek view workflow (#7329)
depends on https://github.com/toeverything/blocksuite/pull/7424
2024-06-26 07:49:25 +00:00
EYHN 092c639b0a fix(core): optimize performance when editing doc title (#7328) 2024-06-26 07:37:26 +00:00
EYHN ad746b6376 fix(core): fix error overflow (#7335) 2024-06-26 07:25:29 +00:00
akumatus 4df334bfdb fix: cannot read properties of undefined editor.host (#7333)
Fix issue [BS-657](https://linear.app/affine-design/issue/BS-657).

Unable to obtain `editor.host` synchronously on `editor` reference callback. Maybe we should have a separate host reference callback. @pengx17

![截屏2024-06-26 11.58.54.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/7d442ce3-86c9-4f4d-85c5-000d923702b6.png)
2024-06-26 06:31:25 +00:00
EYHN 2d74e4c340 fix(core): fix the page loading style (#7336) 2024-06-26 06:20:20 +00:00
L-Sun 16096978d8 fix(core): add synced doc content to edgeless ai context (#7327)
Closes: [BS-633](https://linear.app/affine-design/issue/BS-633/synced-block-%E7%99%BD%E6%9D%BF%E6%94%AF%E6%8C%81%EF%BC%9A%E4%BD%9C%E4%B8%BA%E4%B8%8A%E4%B8%8B%E6%96%87%E6%8F%90%E4%BE%9B%E7%BB%99-ai#comment-f336c6d5)
Related PR: https://github.com/toeverything/blocksuite/pull/7417

Read content from synced doc model as AI context in edgeless model.
2024-06-26 04:05:19 +00:00
fundon 2278cfc9ce fix(core): direct replacement of old card with new card in ai chat input (#7324)
Closes: [BS-643](https://linear.app/affine-design/issue/BS-643/continue-with-ai-:-在存在候选内容的情况下,点击-continue-with-ai-应该将选区内容直接替换)

https://github.com/toeverything/AFFiNE/assets/27926/ff6e2c31-9d2e-462b-aa7e-6ef1eba50ef5
2024-06-25 15:56:47 +00:00
fundon a92515b5aa fix(core): ai chat opening and append card (#7322)
Closes: [BS-642](https://linear.app/affine-design/issue/BS-642/continue-with-ai-:-侧边栏关闭的情况下,先唤起-侧边栏,同时插入选中的内容)

https://github.com/toeverything/AFFiNE/assets/27926/3022d808-d560-4bc8-8a04-735b76056121
2024-06-25 15:56:44 +00:00
L-Sun 532a628989 fix(core): add synced doc block content to ai context (#7312)
Closes: [AF-955](https://linear.app/affine-design/issue/AF-955/synced-block-%E6%96%87%E6%A1%A3%E6%94%AF%E6%8C%81%EF%BC%9A%E8%AF%BB%E5%8F%96%E6%96%87%E6%A1%A3%E5%86%85%E5%AE%B9%E4%BD%9C%E4%B8%BA-ai-%E7%9A%84%E4%B8%8A%E4%B8%8B%E6%96%87-cotent)

Related PR: https://github.com/toeverything/blocksuite/pull/7405
2024-06-25 10:42:50 +00:00
pengx17 f51da066a8 refactor: image preview component issues in center peek (#7313)
fix AF-948

- remove jotai
- every editor got its own image block modal
- image block uses center peek modal for animation and style
2024-06-25 07:34:18 +00:00
L-Sun daceed922b fix(core): incorrect icon of initial reference (#7314)
Closes: [AF-940](https://linear.app/affine-design/issue/AF-940/doc-created-with-%5B-%5B-syntax-are-by-default-in-doc-mode-but-shown-as)
2024-06-25 01:44:49 +00:00