Commit Graph

72 Commits

Author SHA1 Message Date
CatsJuice
8a02c81745 feat(core): remove toggle workspace onboarding dialog (#6501) 2024-04-10 09:07:59 +00:00
EYHN
97c4ae48b5 fix(infra): fix sync issues on old ids (#6474) 2024-04-09 04:40:15 +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
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
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
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
Brooooooklyn
622e90f176 chore(core): add telemetry switch (#6267) 2024-03-22 10:28:55 +00:00
EYHN
a0b97f948c fix(core): fix stuttering when change doc title (#6269) 2024-03-22 10:06:37 +00:00
Peng Xiao
5693d90451 e2e(core): add test for split view (#6133) 2024-03-18 07:04:06 +00:00
EYHN
b9fc848824 fix(infra): avoid data loss (#6111) 2024-03-14 06:27:49 +00:00
Peng Xiao
d2bad68b74 feat(core): move blocksuite flags to experimental features (#6113) 2024-03-14 05:24:47 +00:00
Peng Xiao
dd9a253772 feat(core): add split view to experimental features settings (#6093) 2024-03-14 05:13:04 +00:00
regischen
fddbb426a6 feat: bump blocksuite (#6078) 2024-03-13 17:04:21 +08: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
633a5bab53 fix(core): fix cmdk not show current page (#6031) 2024-03-06 06:31:38 +00:00
EYHN
5d8dea084c fix(core): fix journal missing after refresh (#6022) 2024-03-05 11:42:09 +00: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
Chen
ebf7a74387 feat: bump blocksuite (#6010) 2024-03-05 14:19:11 +08:00
regischen
d1e6b23e1a feat: bump blocksuite (#5953) 2024-02-29 14:33:50 +08:00
EYHN
fa534869e1 feat(core): new onboarding template (#5951) 2024-02-29 06:02:32 +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
LongYinan
ae41c6c544 chore: bump all dependencies (#5891) 2024-02-23 09:37:14 +00:00
JimmFly
8d746f17de chore: remove preloading pages (#5854) 2024-02-21 12:57:18 +00:00
Ayush Agrawal
6fad241350 feat: bump blocksuite (#5845) 2024-02-20 20:49:41 +08:00
Peng Xiao
d1c4e6141a refactor(component): cmdk ordering (#5722)
Replace internal CMDK command filtering/sorting logic.
The new implementation includes the following for command scoring:
- categories weights
- highlighted fragments
- original command score value

The new logic should be much cleaner and remove some hacks in the original implementation.

Not sure if this is optimal yet. Could be changed later.

fix https://github.com/toeverything/AFFiNE/issues/5699
2024-02-16 13:20:24 +00:00
DarkSky
25e8a2a22f feat: sync client versioning (#5645)
after this pr, server will only accept client that have some major version
the client version <0.12 will be rejected by the server, >= 0.12 can receive outdated messages and notify users
2024-02-05 08:43:50 +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
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
Chen
c566952e09 feat: bump blocksuite (#5673) 2024-01-24 15:13:12 +08:00
LongYinan
fa8655e43e style: apply prefer-node-protocol lint rule (#5627)
it makes it perfectly clear that the package is a Node.js builtin module.
2024-01-19 03:47:08 +00:00
EYHN
4aae3cbba3 docs: initial api reference docs (#5352) 2024-01-02 12:46:27 +00:00
Peng Xiao
3978b2dfd2 refactor(core): onboarding using new transformer api (#5412)
Use new `transformer` to import onboarding json templates.

The json files are generated via this gist
https://gist.github.com/pengx17/ef92c305ac23123803a1a6a20e31f822

Not using the all-in-one `ZipTransformer` to import onboarding via a zip file.
1. The main concerns is that we still need to serve the blob resources via CDN to reduce user's blob usage. Otherwise the user will get the onboarding images being uploaded to cloud server every time he creates a new workspace. In this PR we extracted parts of the code from `ZipTransformer` in blocksuite and mute some code for uploading blobs.
2. it maybe not necessary to use zip for loading snapshots.

This PR is a short term solution. whether or not to tune the transformer api design may need further discussions.

fix TOV-264
2023-12-28 13:59:21 +00:00
EYHN
4e861d8118 refactor(electron): create electron api package (#5334) 2023-12-27 06:38:37 +00:00
EYHN
265ee81666 refactor(infra): remove old plugin system (#5411)
plugin system need redesign
2023-12-27 02:49:59 +00:00
EYHN
9493bd99f9 refactor(infra): move currentPageAtom to core (#5332)
Remove `currentPageAtom` from `infra` to `frontend/core.`
2023-12-25 03:34:28 +00:00
EYHN
05025bf59a refactor(core): remove outline plugin and layout atom (#5326)
@affine/outline is no longer used, this PR deletes this plugin and deletes the code that is no longer used
2023-12-25 03:24:13 +00:00
EYHN
aa74b0617c fix(workspace): dont upgrade subdoc on cloud (#5382) 2023-12-22 15:48:54 +08:00