Commit Graph

99 Commits

Author SHA1 Message Date
EYHN
7c0a686cd9
refactor(i18n): new hook api (#7273)
# NEW HOOK API

`useI18n`: same as `useAFFiNEI18N`, with additional APIs

```ts
import { useI18n } from '@affine/i18n'

const i18n = useI18n()
i18n['hello world']() -> 你好世界
```

# NEW GLOBAL i18n Instance

`I18n`: use i18n capabilities outside of React

```ts
import { I18n } from '@affine/i18n'

I18n['hello world']() -> 你好世界
```

# NEW TYPES

`I18nKeys` -> all i18n keys

`I18nString` -> An i18n message (key&options)
transfer and store i18n text outside of React
```ts
const msg: I18nString = {
  key: 'helloworld',
  options: {
    arg1: '123'
  }
}

I18n.t(msg) -> 你好世界123
```

before:

```ts
registerCommand('open-page', {
  name: t('command.open-page')
  // ^- translation happens here,
})
```

after:

```ts
registerCommand('open-page', {
  name: { key: 'command.open-page' }
  // ^- store I18nString here, translate when the command render to UI
})
```
2024-06-20 02:19:41 +00:00
Brooooooklyn
0fe672efa5
feat(admin): init project (#7197) 2024-06-18 06:01:13 +00:00
EYHN
20116eb940
chore: remove unused y-indexeddb (#6728) 2024-04-29 09:14:42 +00:00
Brooooooklyn
fed2503782
refactor(server): rename @affine/storage to @affine/server-native (#6682)
- Close https://github.com/toeverything/AFFiNE/issues/6680
2024-04-29 02:14:20 +00: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
06fda3b62c
feat(infra): framework 2024-04-17 15:09:09 +08:00
EYHN
7ce2bfbf0b
style: no import infra submodule (#6278) 2024-03-25 03:55:29 +00:00
LongYinan
332cd3b380
refactor(core): split web entry from core (#6082)
This pr is trying to split `web` and `electron` entries from `core`. It allows more platform-related optimization to be addressed in each entry.
We should remove all browser/electron only codes from `core` eventually, this is the very first step for that.
2024-03-19 07:48:56 +00:00
EYHN
329fc19852
refactor(infra): migrate to new infra (#5565) 2024-01-30 07:16:39 +00:00
Peng Xiao
275ea74772
chore(core): remove affine/cmdk package (#5552)
patch cmdk based on https://github.com/pengx17/cmdk/tree/patch-1
fix https://github.com/toeverything/AFFiNE/issues/5548
2024-01-10 05:25:37 +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
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
265ee81666
refactor(infra): remove old plugin system (#5411)
plugin system need redesign
2023-12-27 02:49:59 +00:00
LongYinan
febe5cc2ae
ci: fix ts-node scripts (#5225)
- Ref: https://github.com/TypeStrong/ts-node/issues/2094
2023-12-07 09:13:00 +00: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
Alex Yang
d9e2d17a26 refactor: cleanup code 2023-10-20 19:28:04 -05:00
Alex Yang
97d8660a54
refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05:00
Joooye_34
bed9310519
refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
Joooye_34
6ea10860b4
refactor(infra): record legacy data to improve testing stability (#4590) 2023-10-13 03:03:42 +00:00
Alex Yang
c911806062
refactor: remove bookmark plugin (#4544) 2023-09-30 00:48:33 -05:00
LongYinan
dd94ea5b45
ci: speedup ci by reduce installation packages in certain job (#4457) 2023-09-29 03:02:26 +00:00
Alex Yang
56f75160f3
refactor: remove unused packages (#4532) 2023-09-28 01:33:42 +00:00
Peng Xiao
e0063ebc9b
feat: new CMD-K (#4408) 2023-09-22 14:31:26 +00:00
Alex Yang
cdad7edf15
test(electron): add cloud test (#4184)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-09-17 20:26:06 +00:00
LongYinan
1aec1ce7d0
test(server): move tests out of src folder (#4366) 2023-09-15 07:34:14 +00:00
LongYinan
aa3b97b056
style: imporve tsconfig (#4358) 2023-09-14 01:47:15 -07:00
Alex Yang
162016884c
refactor: remove unused package (#4291) 2023-09-09 00:00:26 +00:00
Alex Yang
1b6a78cd00
feat!: unified migration logic in server electron, and browser (#4079)
Co-authored-by: Mirone <Saul-Mirone@outlook.com>
2023-09-06 07:44:53 +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
Mirone
d8d6620c5f
chore: bump blocksuite version (#3798) 2023-08-16 22:57:21 -05:00
Alex Yang
651e815b42
chore: bump version (#3771)
Co-authored-by: Mirone <Saul-Mirone@outlook.com>
2023-08-16 12:02:07 -05:00
Alex Yang
67b33d9b8f
feat(storybook): preview app (#3765) 2023-08-15 15:34:02 -05:00
Alex Yang
43b35a77bb
feat: new preload pages (#3674) 2023-08-10 15:56:16 -04:00
Alex Yang
dafd5619e6
feat: support get datasource status (#3645) 2023-08-10 05:05:34 +00:00
Camol
7d16a8348c
chore: add @types/addfine__env to the devDep (#3616) 2023-08-08 15:46:23 +00:00
Alex Yang
7bf77b566d
feat(plugin): add vue example (#3592) 2023-08-05 23:59:14 -04:00
Alex Yang
97de0ef5b4
build: use tsconfig bundler (#3581) 2023-08-05 00:00:36 +00:00
Alex Yang
ea76936508
feat: update 404 page (#3580)
Co-authored-by: QiShaoXuan <qishaoxuan777@gmail.com>
2023-08-04 23:11:30 +00:00
Alex Yang
4bb874756d
refactor: lazy download macos maker (#3564) 2023-08-03 17:58:42 -07:00
Alex Yang
0e32803247
refactor: merge plugin-infra into infra (#3540) 2023-08-03 08:48:59 +00:00
Alex Yang
ea34d66e14
feat: add @affine/sdk (#3536) 2023-08-03 04:47:05 +00:00
Alex Yang
1b17743ed3
feat: custom maker dmg (#3501) 2023-08-01 19:20:29 +00:00
Alex Yang
1d43e46f99
chore: add noUnusedLocals and noUnusedParameters rules (#3476)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-07-31 05:47:37 +00:00
Alex Yang
18fcaff5ee
feat(plugin-cli): add cli af (#3465) 2023-07-30 18:10:45 +00:00
Alex Yang
9f43c0ddc8
refactor: plugin loading logic (#3448) 2023-07-29 02:43:52 +00:00
Alex Yang
10f879f29a
refactor(electron): server side plugin (#3360) 2023-07-25 21:32:34 +00:00
Alex Yang
c319e7e707
fix: type check in plugins (#3337) 2023-07-20 19:28:55 +00:00
Alex Yang
b6e5618a2e
chore(core): fix missing stuff (#3302) 2023-07-19 04:30:04 +00:00
Alex Yang
47f12f77f2
refactor!: remove next.js (#3267) 2023-07-18 16:53:10 +00:00
Alex Yang
0230cea16e
refactor: move test utils to package (#3206) 2023-07-13 09:05:01 +00:00