Commit Graph
100 Commits
Author SHA1 Message Date
EYHN a2fa9149ff feat(templates): add stickers (#6629) 2024-04-19 06:47:29 +00:00
EYHN 4085cc6728 fix(core): fix subscribe link for pro plan (#6627) 2024-04-19 06:36:38 +00:00
EYHN 6a23fe37a7 feat(core): reduce profile loading time (#6616) 2024-04-18 15:23:12 +00:00
EYHN 08cd940e6b fix(server): fix unstable test (#6621) 2024-04-18 14:53:24 +00:00
EYHN a537f8eb0b fix(electron): cookie expires too short (#6615) 2024-04-18 13:41:56 +00:00
EYHN 09832dc940 feat(core): add subscribe link (#6610) 2024-04-18 13:28:32 +00:00
EYHN f86646b931 feat(core): enrich pwa manifest.json (#6599) 2024-04-17 19:14:25 +08:00
EYHN 4b933466f4 fix(storybook): remove storybook testing (#6595)
remove tests/storybook

@affine/components storybook still exists
2024-04-17 17:27:33 +08:00
EYHN ed96c4ece4 fix(core): fix navigate not working (#6594)
navigate sometimes doesn't work

It seems that we shouldn't pass the parent component's navigate function to the child component, but adding an effect to delay the child component rendering seems to work.
2024-04-17 16:43:29 +08:00
EYHN c83d090282 fix(core): revalidate subscription info when open ai usage panel (#6591) 2024-04-17 16:36:12 +08:00
EYHN 6ca174bb14 fix(core): revalidate subscription info when open ai usage panel 2024-04-17 15:54:01 +08:00
EYHN c7373d4651 feat(infra): framework (#6403)
* Business are implemented in modules
* All modules are split into `services`, `entities`, `stores`, to achieve better abstraction
* most of asynchronous loading has been changed to `effect` implementation, with a good retry strategy
* critical network requests have been cached, app can be used offline normally.
* user session has been cached, and will be used offline.
* `workspace list provider` and `factory provider` are unified into `workspace flavor provider`
* `page` has been rename to `doc`, unified with `blocksuite`
2024-04-17 15:20:13 +08:00
EYHN 06fda3b62c feat(infra): framework 2024-04-17 15:09:09 +08:00
EYHN 8bb597d7ad fix(core): fix flaky e2e (#6559) 2024-04-15 07:11:36 +00:00
EYHN d11d69ddf6 feat(core): move help island to workbench (#6535) 2024-04-15 02:29:15 +00:00
EYHN 1656b33ce3 feat(core): use zip snapshot for onboarding page (#6495) 2024-04-15 02:16:08 +00:00
EYHN 9e7a2fcf0e feat(server): add pro quota to dev user (#6532) 2024-04-12 06:45:18 +00:00
EYHN 1e12d4a2cb feat(core): remove ai from experimental features (#6529) 2024-04-12 06:45:10 +00:00
EYHN c92bec0ebb chore: bump blocksuite (#6448)
## Features
- https://github.com/toeverything/BlockSuite/pull/6679 @pengx17
- https://github.com/toeverything/BlockSuite/pull/6620 @doouding
- https://github.com/toeverything/BlockSuite/pull/6602 @golok727
- https://github.com/toeverything/BlockSuite/pull/6661 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6591 @fundon
- https://github.com/toeverything/BlockSuite/pull/6634 @golok727
- https://github.com/toeverything/BlockSuite/pull/6626 @regischen
- https://github.com/toeverything/BlockSuite/pull/6630 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/6605 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/6614 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6508 @doouding
- https://github.com/toeverything/BlockSuite/pull/6578 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/6572 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6571 @golok727
- https://github.com/toeverything/BlockSuite/pull/6573 @fundon
- https://github.com/toeverything/BlockSuite/pull/6580 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6540 @golok727
- https://github.com/toeverything/BlockSuite/pull/6567 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6565 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6561 @zzj3720

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/6677 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/6681 @fundon
- https://github.com/toeverything/BlockSuite/pull/6673 @fundon
- https://github.com/toeverything/BlockSuite/pull/6652 @fundon
- https://github.com/toeverything/BlockSuite/pull/6641 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6649 @golok727
- https://github.com/toeverything/BlockSuite/pull/6648 @doouding
- https://github.com/toeverything/BlockSuite/pull/6662 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6659 @zkwolf
- https://github.com/toeverything/BlockSuite/pull/6644 @doouding
- https://github.com/toeverything/BlockSuite/pull/6633 @golok727
- https://github.com/toeverything/BlockSuite/pull/6632 @golok727
- https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa
- https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa
- https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa
- https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa
- https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa
- https://github.com/toeverything/BlockSuite/pull/6600 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6617 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6618 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6576 @fundon
- https://github.com/toeverything/BlockSuite/pull/6595 @fundon
- https://github.com/toeverything/BlockSuite/pull/6596 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6574 @fundon
- https://github.com/toeverything/BlockSuite/pull/6593 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/6588 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6590 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6589 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6584 @lawvs
- https://github.com/toeverything/BlockSuite/pull/6579 @fundon
- https://github.com/toeverything/BlockSuite/pull/6538 @golok727
- https://github.com/toeverything/BlockSuite/pull/6570 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6569 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6564 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/6563 @zzj3720

## Refactor
- https://github.com/toeverything/BlockSuite/pull/6683 @doodlewind
- https://github.com/toeverything/BlockSuite/pull/6668 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6635 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/6653 @fundon
- https://github.com/toeverything/BlockSuite/pull/6615 @Flrande
- https://github.com/toeverything/BlockSuite/pull/6534 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/6553 @golok727

## Misc
- chore(examples): cleanup types
- https://github.com/toeverything/BlockSuite/pull/6664 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6657 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6654 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6587 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/6562 @donteatfriedrice
2024-04-10 12:25:37 +00:00
EYHN 939fa9cef0 fix(component): sign up password max length notify (#6467)
The input `maxLength` causes password to be automatically truncated without notice user.
2024-04-10 06:20:21 +00:00
EYHN 97c4ae48b5 fix(infra): fix sync issues on old ids (#6474) 2024-04-09 04:40:15 +00:00
EYHN 366e0a4b60 feat(server): adjust telemetry config (#6424) 2024-04-02 03:44:48 +00:00
EYHN 8bd2408b0c fix(core): selfhost should not use favicon from affine.pro (#6425) 2024-04-02 03:31:34 +00:00
EYHN 80c7750f4a fix(core): selfhost redirect url (#6426) 2024-04-01 13:26:39 +00:00
EYHN 9c6eba8971 fix(electron): fix build script (#6422) 2024-04-01 07:51:35 +00:00
EYHN 1c648c2425 test(infra): add test for livedata with react (#6397) 2024-03-29 07:10:40 +00:00
EYHN 4e7652f108 fix(infra): fix white screen issue (#6350) 2024-03-28 02:12:25 +00:00
EYHN ba9dad95b4 fix(core): improve performance (#6345) 2024-03-27 14:01:54 +00:00
EYHN 30b8b12703 fix(infra): fix sqlite not save data (#6336)
SQLiteDB will not save subdoc data that does not exist on rootdoc, so we must save rootdoc first, and then save subdoc
2024-03-27 04:25:23 +00:00
EYHN cccf864ed9 fix(core): duplicate window controls in trash (#6329)
fix https://github.com/toeverything/AFFiNE/issues/6310
2024-03-27 02:37:53 +00:00
EYHN 16063340d0 fix(core): fix meta.xxx is undefined (#6321) 2024-03-26 08:53:14 +00:00
EYHN b6bba523ff fix(infra): large page list performance (#6319) 2024-03-26 07:53:53 +00:00
EYHN 3e547ce4cc fix(core): hidden modals when workspace fallback (#6301) 2024-03-25 13:52:08 +00:00
EYHN da12a0e48e fix(core): fix error when switch to local workspace (#6144) 2024-03-25 21:35:10 +08:00
EYHN a8cd1579f5 feat(infra): livedata effect (#6281) 2024-03-25 06:09:45 +00:00
EYHN f2adbdaba4 style: enable import-x/no-duplicates (#6279) 2024-03-25 03:55:33 +00:00
EYHN 7ce2bfbf0b style: no import infra submodule (#6278) 2024-03-25 03:55:29 +00:00
EYHN b93871f045 feat(electron): define runtimeConfig in esbuild (#6287) 2024-03-25 03:55:26 +00:00
EYHN d59e1389ec chore(electron): config vitest swc (#6282) 2024-03-25 03:55:23 +00:00
EYHN 82cacd09d6 fix(core): fix flaky e2e (#6293) 2024-03-25 02:58:52 +00:00
EYHN 2b42a75e5a style: enable rxjs/finnish (#6276)
chore(infra): use finnish notation for observables

do rename
2024-03-24 17:04:51 +00:00
EYHN 34703a3b7d feat(infra): new doc sync engine (#6205)
https://github.com/toeverything/AFFiNE/blob/eyhn/feat/new-sync/packages/common/infra/src/workspace/engine/doc/README.md
2024-03-22 16:43:26 +00:00
EYHN a0b97f948c fix(core): fix stuttering when change doc title (#6269) 2024-03-22 10:06:37 +00:00
EYHN 39cde560d1 fix(templates): fix typo in onboarding template (#6221) 2024-03-20 16:19:28 +00:00
EYHN 5623c0967c feat(electron): enable css text autospace (#6218)
before

![CleanShot 2024-03-20 at 10.38.50@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/80a59a2b-ede7-453a-889a-6c54a967c27d.png)

after

![CleanShot 2024-03-20 at 10.39.08@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/5e98d9e1-ec8e-4cc7-804b-e4347c62ee6e.png)
2024-03-20 02:47:49 +00:00
EYHN 78f7e3a45e fix(core): catch page load error (#6134) 2024-03-15 08:44:36 +00:00
EYHN 9ba47f43bb fix(core): fix active view undefined (#6131)
close https://github.com/toeverything/AFFiNE/issues/6127, #6132
2024-03-15 03:45:41 +00:00
EYHN 12c04a8575 feat(core): allow switch workspace in loading fallback (#6129) 2024-03-15 03:45:32 +00:00
EYHN 96c67afc11 fix(core): catch auth error (#6128) 2024-03-15 03:45:23 +00:00
EYHN b9fc848824 fix(infra): avoid data loss (#6111) 2024-03-14 06:27:49 +00:00
EYHN fd9084ea6a feat(infra): computed livedata (#6091) 2024-03-13 06:26:05 +00:00
EYHN cacc2d311e feat(infra): livedata flatten (#6083) 2024-03-13 06:06:18 +00:00
EYHN 05b79aae89 fix(core): fix tags includes missing error (#6096)
fix https://toeverything.sentry.io/issues/5059796018/events/0899e77a3f6842088568b4cc42b814d7/
2024-03-13 02:43:28 +00:00
EYHN eca35ded2f fix(core): fix page priority load (#6072)
When refactoring, I planned to put the logic of loading current pages priority in `PageManager.open`, but I forgot, so the current page will not be loaded priority.

But currently `PageManager.open` has been used in many places, but only one priority page can be set, so the logic of setting the priority page is still placed in the detail page.
2024-03-12 05:09:14 +00:00
EYHN 3672366fea fix(core): fix missing windows controls (#6067)
fix #6064
2024-03-12 02:43:45 +00:00
EYHN ba4637a6bd fix(core): add view error boundary (#6036) 2024-03-11 07:09:47 +00:00
EYHN 5091174da2 fix(core): remove unexpected loading (#6035) 2024-03-09 15:01:18 +00:00
EYHN ae22d6469d fix(core): fix unit test (#6040) 2024-03-09 15:01:16 +00:00
EYHN 633a5bab53 fix(core): fix cmdk not show current page (#6031) 2024-03-06 06:31:38 +00:00
EYHN dce3b59c52 fix(core): fix falsy e2e (#6027) 2024-03-05 15:25:19 +00:00
EYHN 5d8dea084c fix(core): fix journal missing after refresh (#6022) 2024-03-05 11:42:09 +00:00
EYHN ceec54b423 fix(docs): fix bug-report template (#6020) 2024-03-05 09:52:57 +00:00
EYHN e9d51f6c96 fix(component): journal header button no responce (#6021) 2024-03-05 09:40:19 +00:00
EYHN 7c55472b78 docs: update bug-report.yml (#6018) 2024-03-05 16:27:14 +08:00
EYHN 7c76c25a9c refactor(core): new back&forward button base on workbench (#6012)
# feature:

## In Browser:
- hidden back&forward button in sidebar.
- back and forward is equal with `window.history.back()` `window.history.forward()`

## In Desktop:
- Back and forward can be controlled through the sidebar, cmdk, and shortcut keys.
- back and forward act on the currently **active** view.
- buttons change disable&enable style based on current active view history

# Refactor:

Move app-sidebar and app-container from @affine/component to @affine/core
2024-03-05 07:01:24 +00:00
EYHN a9be19ce6c fix(core): fix style break when scroll to block (#6001) 2024-03-04 11:43:10 +00:00
EYHN d935cf9d4d fix(core): dont break workspace when page load failed (#5988) 2024-03-04 11:32:56 +00:00
EYHN c599715963 feat(core): split right sidebar (#5971)
https://github.com/toeverything/AFFiNE/assets/13579374/c846c069-aa32-445d-b59b-b773a9b05ced

Now each view has a general container, the yellow area is the general container part, and the green part is the routing specific part.

![CleanShot 2024-03-01 at 11.47.35@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/9a9f6ad6-2207-42e5-ae66-f7426bc9f3fc.png)
2024-03-04 06:42:12 +00:00
EYHN de939bb6f6 fix(core): fix page mode scroll bar (#5955) 2024-03-01 04:46:15 +00:00
EYHN a231884d9e fix(storybook): fix storybook test (#5970) 2024-03-01 02:30:04 +00:00
EYHN 78ce30db69 fix(core): fix editor sidebar (#5965) 2024-02-29 13:59:20 +00:00
EYHN fa534869e1 feat(core): new onboarding template (#5951) 2024-02-29 06:02:32 +00:00
EYHN 606397e319 feat(core): workbench system (#5837) 2024-02-27 04:14:07 +00:00
EYHN 5cd488fe1d refactor(core): remove collection atom (#5832) 2024-02-27 03:50:56 +00:00
EYHN ad9b0303c4 refactor(core): refactor atom to use di (#5831)
To support multiple instances, this PR removes some atoms and implements them using the new DI system.

removed atom

- `pageSettingsAtom`
- `currentPageIdAtom`
- `currentModeAtom`
2024-02-27 03:50:53 +00:00
EYHN 0dabb08217 chore: create default user for devcontainer (#5917)
## **Type**
enhancement

___

## **Description**
- Added a command to `.devcontainer/build.sh` to create a default user (`affine`) in the database for development purposes.
- Introduced error handling in `.devcontainer/setup-user.sh` to ensure the script stops on the first error.
- Modified the git fetch command in `.devcontainer/setup-user.sh` to fetch the `canary` branch from `origin` with a depth of 1, optimizing the setup process.

___

## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement
</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>build.sh</strong><dd><code>Add Default User Creation to Dev Container Build Script</code>&nbsp; &nbsp; </dd></summary>
<hr>

.devcontainer/build.sh

<li>Added command to create a default user with username and password <br>'affine'.<br> <li> Ensured database push command is followed by a newline.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5917/files#diff-165b66803397b501866b23a0532418e9ad3eb2ab642274f9679383c76d18136f">+4/-1</a>&nbsp; &nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>setup-user.sh</strong><dd><code>Enhance User Setup Script with Error Handling and Specific Git Fetch</code></dd></summary>
<hr>

.devcontainer/setup-user.sh

<li>Introduced error handling with 'set -e' to stop on first error.<br> <li> Modified 'git fetch' to specifically fetch 'canary' branch from <br>'origin' with depth of 1.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5917/files#diff-8c5e76719e2ff0a3bf2b59d108dc9cf88bdae00c317728454cfa5108f2fc76af">+3/-1</a>&nbsp; &nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> ✨ **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
2024-02-27 03:32:03 +00:00
EYHN 6ccc4f1501 chore: start dev server on devcontainer (#5914) 2024-02-26 13:47:06 +00:00
EYHN ee4918b3b8 chore: update devcontainer build.sh (#5912) 2024-02-26 13:47:00 +00:00
EYHN 3f7f78c8f4 fix(core): fix app boot speed (#5885) 2024-02-23 07:07:03 +00:00
EYHN 0fff5588e6 fix(core): disable sidebar user select (#5862)
close #5846
2024-02-22 07:58:14 +00:00
EYHN 799fa9cfa6 fix(workspace): fix sync stuck (#5762)
* remove MultipleBatchSyncSender
* add timeout (30 seconds) on socket.emit
2024-02-01 06:58:09 +00:00
EYHN 329fc19852 refactor(infra): migrate to new infra (#5565) 2024-01-30 07:16:39 +00:00
EYHN 1e3499c323 feat(infra): page infra (#5618) 2024-01-30 06:31:26 +00:00
EYHN 2e71c980cf feat(infra): new workspace infra (#5617)
This PR copying @affine/workspace into common/infra, and adding definitions for services and unit tests.
2024-01-30 06:31:24 +00:00
EYHN 4f7e0d012d chore: fix vitest error on tinykeys (#5693) 2024-01-30 06:31:21 +00:00
EYHN 88cd83fed1 feat(infra): standard lifecycle service (#5564) 2024-01-30 06:31:19 +00:00
EYHN b3a8e62984 feat(infra): standard storage service (#5563) 2024-01-30 06:31:15 +00:00
EYHN 48eb6c50e1 feat(infra): di container (#5497)
docs: https://insider.affine.pro/share/055f9c4b-497a-43ec-a1c9-29d5baf184b9/N785YJ__oLMb2fUaLOv-k
2024-01-30 06:31:13 +00:00
EYHN c9f8e49f75 feat(infra): livedata (#5562)
LiveData is a reactive data type.

## basic usage

@example
```ts
const livedata = new LiveData(0); // create livedata with initial value

livedata.next(1); // update value

console.log(livedata.value); // get current value

livedata.subscribe(v => { // subscribe to value changes
 console.log(v); // 1
});
```

## observable

LiveData is a rxjs observable, you can use rxjs operators.

@example
```ts
new LiveData(0).pipe(
  map(v => v + 1),
  filter(v => v > 1),
  ...
)
```

NOTICE: different from normal observable, LiveData will always emit the latest value when you subscribe to it.

## from observable

LiveData can be created from observable or from other livedata.

@example
```ts
const A = LiveData.from(
  of(1, 2, 3, 4), // from observable
  0 // initial value
);

const B = LiveData.from(
  A.pipe(map(v => 'from a ' + v)), // from other livedata
  '' // initial value
);
```

NOTICE: LiveData.from will not complete when the observable completes, you can use `spreadComplete` option to change
this behavior.

## Why is it called LiveData

This API is very similar to LiveData in Android, as both are based on Observable, so I named it LiveData.
2024-01-30 06:31:11 +00:00
EYHN 74a3a795bd fix(workspace): check session before get workspaces (#5621) 2024-01-18 04:46:52 +00:00
EYHN d1c2b2a7b0 fix(core): workspace not found after import (#5571)
close TOV-393
2024-01-11 09:47:24 +00:00
EYHN 5aee480c50 refactor(core): move page list to core (#5556) 2024-01-10 11:09:39 +00:00
EYHN 4aae3cbba3 docs: initial api reference docs (#5352) 2024-01-02 12:46:27 +00:00
EYHN 54c6b445ea fix(workspace): make ci stable (#5496) 2024-01-02 12:21:35 +00:00
EYHN 104c21d84c refactor(workspace): split workspace interface and implementation (#5463)
@affine/workspace -> (@affine/workspace, @affine/workspace-impl)
2024-01-02 10:58:01 +00:00
EYHN 9d0b3b4947 refactor(core): move workspace atoms to core (#5459)
@affine/workspace/atom -> @affine/core/modules/workspace
2024-01-02 10:06:48 +00:00
EYHN 4b217e6b89 refactor(core): move hooks to core (#5458)
* move @toeverything/hooks -> @affine/core/hooks
* delete @toeverything/hooks

hooks are all business-related logic and are deeply coupled with other parts.

Move them into the core and then reconstruct them by feature.
2024-01-02 08:05:46 +00:00
EYHN 6844b282ac refactor(component): adjust active editor atom (#5457)
before:

set global `blocksuiteEditorAtom` state in `<BlocksuiteEditorImpl />`

after:

Rename `blocksuiteEditorAtom` to `activeBlocksuiteEditorAtom`

And move the logic of setting this atom to `<PageDetailEditor />`.

benefit:

* make BlocksuiteEditor pure
* keep @toeverything/component clear
* Clarify the purpose of `activeBlocksuiteEditorAtom`
2024-01-02 07:30:09 +00:00
EYHN 9d51f9596f refactor(component): make component pure (#5427) 2023-12-28 09:57:26 +00:00
EYHN 0b9cd00fd3 refactor(core): adjust graphql hook (#5339) 2023-12-28 07:43:25 +00:00