Commit Graph

501 Commits

Author SHA1 Message Date
李华桥 e766208c18 chore: reset merge wrong codes 2023-11-23 22:53:06 +08:00
李华桥 8742f28148 Merge branch 'canary' into stable 2023-11-23 21:31:42 +08:00
JimmFly 4168551783 chore: bump icons version (#5042) 2023-11-23 12:00:51 +00:00
LongYinan 55c6477bcc fix(electron): appimage forge builder (#5043) 2023-11-23 11:46:50 +00:00
Peng Xiao ae8329c590 chore(core): update react-resizable-panels (#5041)
`react-resizable-panels` will throw some errors sometime when showing history modal dialog.
I haven't checked the root cause, but upgrade it to the latest will get rid of the error.
2023-11-23 09:20:12 +00:00
EYHN 23e0137ed8 refactor(workspace): blob sync (#5037)
This pr implements a blob engine.
It exposes a single `BlobStorage` to the `blocksuite`, and in it we sync blobs between multiple storages.

The implement still have few issues, but we can merge this pr first and fix them in future.

* BlobEngine currently **do nothing when delete**, because synchronization logic conflicts with deletion logic.
* BlobEngine sync between storages by querying the blob list at regular intervals. This will **cause many queries**, we can avoid this in the future by subscribing to remote changes.
2023-11-23 07:56:19 +00:00
LongYinan 3499dbbb7f feat: upgrade dependencies and lockfile (#5016)
- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
2023-11-23 05:18:05 +00:00
Flrande d7d47853fe chore: bump blocksuite (#5030) 2023-11-22 20:51:35 +08:00
Flrande a3d880daa3 chore: bump blocksuite (#5026) 2023-11-22 20:12:52 +08:00
liuyi d1476495ae feat(server): impl doc history (#5004) 2023-11-22 07:56:59 +00:00
Peng Xiao 3839a9bd15 build(electron): asar (#4965)
Due to restrictions on how Electron package works, the `node_modules` should not be hoisted and not to use s/h-links at all. This is why we need to have two separate installs for electron and non-electron packages in the build.

Tested via the following script

```bash
#!/bin/bash

echo "step 1: clean up"
find . -name "node_modules" -prune -exec rm -rf '{}' +
# git clean -dfX
build_type=canary

echo "step 2: install web dependencies"
# firstly, build web static
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 SENTRYCLI_SKIP_DOWNLOAD=1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=1 yarn

echo "step 3: generate assets"
BUILD_TYPE="$build_type" yarn workspace @affine/electron generate-assets

# cleanup node_modules
find . -name "node_modules" -prune -exec rm -rf '{}' +

echo "step 4: install electron dependencies"
# install electron deps
yarn config set nmHoistingLimits workspaces
yarn config set enableScripts false
yarn config set nmMode classic
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn workspaces focus @affine/electron @affine/monorepo

echo "step 5: build native"
# build native
yarn workspace @affine/native build
yarn workspace @affine/storage build

echo "step 6: build electron"
# build electron
yarn workspace @affine/electron build

echo "step 7: package electron"
# package
SKIP_GENERATE_ASSETS=1 BUILD_TYPE="$build_type" HOIST_NODE_MODULES=1 yarn workspace @affine/electron package
```
2023-11-21 17:44:30 +00:00
Cats Juice 57d42bf491 refactor(core): remove all MUI related components and utilities (#4941) 2023-11-20 10:51:28 +08:00
EYHN aa4c7407de refactor: new provider (#4900) 2023-11-17 15:50:01 +08:00
Flrande 8b2c3d4c41 chore: bump blocksuite (#4958) 2023-11-16 22:01:03 +08:00
Flrande 931b459fbd chore: bump blocksuite (#4958) 2023-11-16 14:27:39 +08:00
LongYinan 5b0b8cf216 test(e2e): add subdoc migration test (#4921)
test(e2e): add subdoc migration test

fix: remove .only
2023-11-14 14:39:59 +08:00
LongYinan dde779a71d test(e2e): add subdoc migration test (#4921)
test(e2e): add subdoc migration test

fix: remove .only
2023-11-13 18:00:40 +08:00
Peng Xiao bd9f66fbc7 fix(infra): compatibility fix for space prefix (#4912)
It seems there are some cases that [this upstream PR](https://github.com/toeverything/blocksuite/pull/4747) will cause data loss.

Because of some historical reasons, the page id could be different with its doc id.
It might be caused by subdoc migration in the following (not 100% sure if all white screen issue is caused by it) https://github.com/toeverything/AFFiNE/blob/0714c12703ff8840acc180633e5489c755ddfba3/packages/common/infra/src/blocksuite/index.ts#L538-L540

In version 0.10, page id in spaces no longer has prefix "space:"
The data flow for fetching a doc's updates is:
- page id in `meta.pages` -> find `${page-id}` in `doc.spaces` -> `doc` -> `doc.guid`
if `doc` is not found in `doc.spaces`, a new doc will be created and its `doc.guid` is the same with its pageId
- because of guid logic change, the doc that previously prefixed with `space:` will not be found in `doc.spaces`
- when fetching the rows of this doc using the doc id === page id,
  it will return EMPTY since there is no updates associated with the page id

The provided fix in the PR will patch the `spaces` field of the root doc so that after 0.10 the page doc can still be found in the `spaces` map. It shall apply to both of the idb & sqlite datasources.

Special thanks to @lawvs 's db file for investigation!
2023-11-13 17:57:56 +08:00
Peng Xiao a8d89254ce fix(electron): dev reload (#4911) 2023-11-12 03:19:27 +00:00
Joooye_34 30bac7dce2 ci(core): eslint errors for core (#4662) 2023-11-10 10:25:59 +00:00
Yifeng Wang 28177657ef chore: bump theme (#4904)
Co-authored-by: 李华桥 <joooye1991@gmail.com>
2023-11-10 15:42:06 +08:00
Yifeng Wang fc6c553ece chore: bump theme (#4904)
Co-authored-by: 李华桥 <joooye1991@gmail.com>
2023-11-10 15:40:38 +08:00
Yifeng Wang 2117d6b232 chore: bump blocksuite (#4901) 2023-11-10 13:23:29 +08:00
LongYinan 839f500979 ci: disable postinstall on macOS build (#4885) 2023-11-09 11:58:55 +00:00
Peng Xiao 442115632b chore(component): bump bs (#4880) 2023-11-09 04:47:10 +00:00
Joooye_34 a8bff81a7e ci: use resolutions to resolve building error in mac-os (#4878) 2023-11-09 02:43:47 +00:00
Hongtao Lye 12c72e63b1 chore: bump blocksuite version (#4862) 2023-11-08 07:12:48 +00:00
Peng Xiao cfffcad1b8 fix(core): adapt blob in sqlite for svg type (#4845) 2023-11-06 10:09:48 +00:00
JimmFly 9664d142ad feat(core): temporary expansion files are limited to 100M (#4833) 2023-11-06 06:38:46 +00:00
Peng Xiao 7e381e830a perf(core): load all pages after 10s (#4834) 2023-11-03 09:42:29 +00:00
Peng Xiao 65321e39cc refactor(component): virtual rendering page list (#4775)
Co-authored-by: Joooye_34 <Joooye1991@gmail.com>
2023-11-02 14:21:01 +00:00
Hongtao Lye 15024c6c8a chore: bump blocksuite (#4801) 2023-11-02 09:12:23 +00:00
liuyi 6a93203d68 feat(server): sync data with ack (#4791) 2023-11-02 09:05:28 +00:00
LongYinan 6aaf550241 ci: fix wrangler deploy (#4803) 2023-11-01 09:12:00 +00:00
LongYinan 72babe9157 Merge pull request #4751 from toeverything/yarn-4.0.1
chore: upgrade to yarn@4.0.1
2023-10-30 07:49:29 +00:00
DarkSky 95c1a44a0d Merge branch 'master' into payment-system 2023-10-30 01:55:51 -05:00
LongYinan fc3516acfb Merge pull request #4746 from toeverything/data-migrations-system
feat(server): add data migration system
2023-10-30 06:36:18 +00:00
forehalo 98d0ac3c90 feat(server): add data migration system 2023-10-30 11:12:09 +08:00
LongYinan fd76d33421 chore: upgrade to yarn@4.0.1 2023-10-29 16:06:29 +08:00
3720 ef8024c657 feat: new collections (#4530)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-10-27 09:06:59 +00:00
Joooye_34 385de7d33b Merge remote-tracking branch 'origin/master' into payment-system 2023-10-27 16:04:48 +08:00
liuyi 9334a363c7 chore(server): upgrade stripe sdk (#4733) 2023-10-26 12:37:52 +00:00
Joooye_34 1deb6bffd3 feat(core): disable payment in canary (#4722) 2023-10-26 00:50:39 +08:00
JimmFly ae6376edee chore(core): update communities icon (#4719) 2023-10-25 10:45:54 +00:00
JimmFly df69c908fe feat(core): adapt storage progress to payment system (#4713) 2023-10-25 16:18:30 +08:00
LongYinan b13705ba3d ci: remove setup-maker to reduce release duration (#4710) 2023-10-24 10:09:40 +00:00
Flrande 627e5dfbb5 feat: bump blocksuite (#4706) 2023-10-24 09:00:27 +00:00
forehalo df054ac7f6 feat(core): payment backend 2023-10-24 11:40:44 +08:00
dependabot[bot] e75a0743f8 chore: bump @mui/material from 5.14.13 to 5.14.14 (#4678)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 08:07:04 +00:00
dependabot[bot] b52e006bfe chore: bump @mui/icons-material from 5.14.13 to 5.14.14 (#4680)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 07:04:49 +00:00