Commit Graph

36 Commits

Author SHA1 Message Date
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
JimmFly 8d746f17de chore: remove preloading pages (#5854) 2024-02-21 12:57:18 +00:00
JimmFly c353b0d30f chore: replace ambiguous "page" with "doc" (#5761)
close TOV-532
2024-02-21 12:47:17 +00: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
Flrande 2e3ffeced9 feat: bump blocksuite (#5812) 2024-02-08 08:18:03 +08:00
Peng Xiao f41b7d7e71 feat(component): react wrapper for blocksuite editor (#5606)
A React wrapper for blocksuite editor from title/meta/doc/edgless fragments.
This PR only **clones** the `AffineEditorContainer`'s existing behavior and make it easier for extension in affine later.

fix TOV-315

### Some core issues:

A customized version of `createComponent` from `@lit/react`. The [existing and solutions in the community](https://github.com/lit/lit/issues/4435) does not work well in our case.
Alternatively in this PR the approach we have is to create web component instances in React lifecycle and then append them to DOM. However this make it hard to wrap the exported Lit component's using React and therefore we will have an additional wrapper tag for the wrapped web component.

To mitigate the migration issue on using React instead of Lit listed on last day, we now use [a proxy to mimic the wrapped React component](https://github.com/toeverything/AFFiNE/pull/5606/files#diff-5b7f0ae7b52a08739d50e78e9ec803c26ff3d3e5437581c692add0de12d3ede5R142-R183) into an `AffineEditorContainer` instance.
2024-01-22 08:25:29 +00:00
Cats Juice 70ea1e5ef8 feat(core): journal sidebar dater-picker navigation (#5558) 2024-01-18 12:34:23 +00:00
JimmFly 971f2beed1 fix(core): disable quick search when the link-popup is visitable (#5409)
close AFF-471
2024-01-04 11:36:50 +00:00
Peng Xiao 6cb62ed25d feat: bump blocksuite (#5453)
Change history: https://github.com/toeverything/blocksuite/compare/e3abcbb...master
2024-01-03 02:10:19 +00:00
Yifeng Wang af15aa06d4 feat: bump blocksuite (#5286)
Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
2023-12-15 12:57:52 +08:00
Peng Xiao ce64685176 refactor(core): side bar resizing (#5280)
Rewrite sidebar panel using a customized react-resizable-panels version that supports sidebar pixel sizing (not using flex percentages).

Now the left & right sidebar using the same `ResizePanel` impl.

fix https://github.com/toeverything/AFFiNE/issues/5271
fix TOV-163
fix TOV-146
fix TOV-168
fix TOV-109
fix TOV-165
2023-12-13 07:52:01 +00:00
EYHN b782b3fb1b fix(core): polling to search in cmdk (#5274)
This is a temporary solution until https://github.com/toeverything/blocksuite/issues/5668 be solved.
2023-12-12 18:42:07 +08:00
LongYinan 923844f302 fix: add eqeqeq lint rule (#5106) 2023-11-29 04:43:31 +00:00
JimmFly f06bdd9a39 fix(core): cmdk crash when entering double quotes (#5008)
Due to a bug in the upstream repository, a temporary fix was implemented until the issue in the upstream repository is resolved.
https://github.com/pacocoursey/cmdk/issues/189
2023-11-21 12:51:22 +00:00
JimmFly 4ef1f4c046 fix(core): escape cmdk value (#4947)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-11-20 10:49:32 +08:00
EYHN aa4c7407de refactor: new provider (#4900) 2023-11-17 15:50:01 +08:00
JimmFly 1fe5a0fffa feat(core): auto select block when jump to block (#4858)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-11-10 03:02:56 +00:00
JimmFly 0a88be7771 feat(core): add jump to block for cmdk (#4802) 2023-11-02 11:49:49 +00:00
JimmFly af9663d3e7 fix(core): adjust payment related text (#4797) 2023-11-02 08:22:54 +00:00
3720 ef8024c657 feat: new collections (#4530)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-10-27 09:06:59 +00:00
JimmFly 5226d6c568 feat(core): add search result highlighting (#4667)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-10-24 05:54:37 +00:00
Alex Yang d05897b724 chore: prohibit unnecessary await (#4586) 2023-10-12 05:04:58 +00:00
Alex Yang 8f5ee9234c test: remove deprecated api usage (#4577) 2023-10-11 06:05:06 +00:00
JimmFly 69db99636b feat(core): add editor commanads (#4514)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-10-02 03:22:12 +00:00
Peng Xiao e0063ebc9b feat: new CMD-K (#4408) 2023-09-22 14:31:26 +00:00
Alex Yang 40e094dcdd test: fix e2e (#4390) 2023-09-17 03:50:26 +00:00
Alex Yang 4f97ea8a5d test: cover share page e2e (#4126) 2023-09-02 00:57:04 -05:00
Alex Yang 70b5a9deeb test: improve data migration suite (#4124) 2023-09-02 03:31:07 +00:00
Alex Yang 2f6c4e3696 feat!: affine cloud support (#3813)
Co-authored-by: Hongtao Lye <codert.sn@gmail.com>
Co-authored-by: liuyi <forehalo@gmail.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: X1a0t <405028157@qq.com>
Co-authored-by: JimmFly <yangjinfei001@gmail.com>
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
Co-authored-by: xiaodong zuo <53252747+zuoxiaodong0815@users.noreply.github.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: Qi <474021214@qq.com>
Co-authored-by: danielchim <kahungchim@gmail.com>
2023-08-29 05:07:05 -05:00
Alex Yang 3b6e145b23 fix(core): search feature not working (#3902) 2023-08-22 19:38:02 -05:00
Alex Yang 507b5dcfb3 test: loose cmdk result check (#3888) 2023-08-21 23:17:45 -05:00
Alex Yang b5afbe385f test: fix flaky title insert (#3884) 2023-08-21 19:19:59 -05:00
Alex Yang bf00299bc7 ci: do not build core in e2e test (#3882) 2023-08-21 18:36:39 -05:00
danielchim eda5ff4d3f feat: e2e for recent search list (#3872) 2023-08-21 12:01:53 -05:00
Alex Yang bbf5f0efe0 chore: bump version (#3567) 2023-08-04 23:55:28 +00:00
Alex Yang 0230cea16e refactor: move test utils to package (#3206) 2023-07-13 09:05:01 +00:00