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
LongYinan
588b3bcf33
chore: revert "chore: bump up @reforged/maker-appimage version to v4" ( #5736 )
...
link #5709
This reverts commit 59788aa334 .
2024-01-29 08:41:35 +00:00
Yifeng Wang
1cf902bdb6
feat: bump blocksuite ( #5735 )
2024-01-29 16:40:23 +08:00
DarkSky
fc8a48fb43
feat: add business blob limit ( #5734 )
2024-01-29 08:32:35 +00:00
LongYinan
0044be972f
chore: bump up @blocksuite/icons version to v2.1.44 ( #5732 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons ) | [`2.1.43` -> `2.1.44`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.43/2.1.44 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>toeverything/icons (@​blocksuite/icons)</summary>
### [`v2.1.44`](13299f7ede...bc31d70961 )
[Compare Source](13299f7ede...bc31d70961 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-29 07:39:17 +00:00
LongYinan
25e8b8306f
fix: path issue on Windows ( #5725 )
2024-01-29 07:18:25 +00:00
DarkSky
070d5ca471
feat: impl unlimited features ( #5659 )
2024-01-26 08:28:54 +00:00
Yifeng Wang
04b9029d1b
feat: bump blocksuite ( #5720 )
...
Co-authored-by: xiaoxin <hongtao.lye@toeverything.info >
2024-01-26 16:27:58 +08:00
Cats Juice
387e292ed9
fix(core): journal title's day tag may be invalid ( #5703 )
...
Fix [TOV-470](https://linear.app/affine-design/issue/TOV-470/journal-invalid-date )
2024-01-26 07:55:35 +00:00
JimmFly
18068f4ae2
feat(core): add collection and tag filters to all pages ( #5567 )
...
close TOV-69
Added the `filterMode` parameter to the `/all` route.
Abstracted the `PageList` and associated components into more universal ones.
Added the `useTagMetas` hook to get and update the workspace tags.
https://github.com/toeverything/AFFiNE/assets/102217452/7595944d-a056-40c2-8d89-d8df9e901a4b
2024-01-26 07:42:47 +00:00
Peng Xiao
b867dcbdeb
fix: add padding between editor and link panel ( #5713 )
...
Fix [AFF-561](https://linear.app/affine-design/issue/AFF-561/bi-directional-link-与文本编辑区域的-top-padding )
2024-01-26 07:32:22 +00:00
Cats Juice
6ca2043697
feat(component): optimize week-date-picker keyboard navigation ( #5684 )
2024-01-26 07:05:19 +00:00
Peng Xiao
e8a6b6ad5e
fix(core): bidi links rendering issue ( #5707 )
2024-01-26 06:07:04 +00:00
LongYinan
59788aa334
chore: bump up @reforged/maker-appimage version to v4 ( #5709 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@reforged/maker-appimage](https://togithub.com/SpacingBat3/ReForged ) | [`^3.3.1` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@reforged%2fmaker-appimage/3.3.1/4.0.0 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>SpacingBat3/ReForged (@​reforged/maker-appimage)</summary>
### [`v4.0.0`](1657b03766...f829e7a954 )
[Compare Source](1657b03766...f829e7a954 )
### [`v3.3.2`](45d28765c2...1657b03766 )
[Compare Source](45d28765c2...1657b03766 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-26 02:41:08 +00:00
DarkSky
fdffe90892
fix: consume blob stream correctly ( #5706 )
...
- use correctly endpoint in r2
- consume blob stream correctly
2024-01-25 10:59:53 +00:00
LongYinan
db3891ba33
chore: bump up @blocksuite/icons version to v2.1.43 ( #5702 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons ) | [`2.1.42` -> `2.1.43`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.42/2.1.43 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>toeverything/icons (@​blocksuite/icons)</summary>
### [`v2.1.43`](fe902db67e...13299f7ede )
[Compare Source](fe902db67e...13299f7ede )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-25 08:56:39 +00:00
Cats Juice
e7307d969c
chore(core): remove journal experimental flag ( #5698 )
2024-01-25 05:33:57 +00:00
Joooye_34
bd8c7751db
chore: update base version to 0.12.0 ( #5695 )
2024-01-25 05:17:35 +00:00
Cats Juice
9aa421d5e1
fix(core): modify journal page title today style, add weekday tag ( #5687 )
...
fix [TOV-434](https://linear.app/affine-design/issue/TOV-434/修改-journal-中-「today」的字体大小和日期-title-大小 )
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/ac0ab085-5ff7-4d27-a0b1-11d97fdd8074 ">
<img width="100%" alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/3b311130-ded2-4651-badd-65dd059b7bc5 ">
</picture>
2024-01-24 13:07:20 +00:00
Cats Juice
3f96b9778f
fix(core): change journal header week-date-picker's max-width ( #5688 )
...
Fix [TOV-444](https://linear.app/affine-design/issue/TOV-444/修改-journal-date-picker-max-width )
2024-01-24 12:54:34 +00:00
JimmFly
ad1521fd81
feat(core): adjust member order ( #5685 )
...
close #5686
`Owner >> Unaccepted > Admin > Write > Read`
This algorithm contains two parts: firstly, it calculates the weight of the Member (calculateWeight), and then, it uses set weights to sort the Members (useMembers).
In the calculateWeight part, the computation of the weight involves three primary factors:
1. **Permission Level**: The `Owner` is given the highest weight of `4`, followed by `Admin` with a weight of `3`, then `Write` with a weight of `2`, and finally, `Read`, with a weight of `1`.
2. **Acceptance Status**: `Unaccepted` members have a higher weight, this weight is `1`.
3. The weight corresponding to the permission level, if the member does not exist, this weight is 0.
These three `factors` are stored in the factors array and then processed through the reduce function for weighted sum calculation. Among them, `factor * Math.pow(10, arr.length - 1 - index)` means the more significant weight factors (i.e., the earlier factors) will be assigned a higher value.
Sorting rules are primarily based on the weight values obtained from the calculateWeight function. If the weights are identical, it then sorts by name, here assuming the weight of the name being `null` is the highest. If the names are not `null`, they are sorted alphabetically.
2024-01-24 12:44:01 +00:00
liuyi
0f67c683c9
fix(server): add metrics missing attributes ( #5682 )
2024-01-24 08:06:34 +00:00
JimmFly
25897dc404
feat(workspace): add blob and storage limit ( #5535 )
...
close TOV-343 AFF-508 TOV-461 TOV-460 TOV-419
Add `isOverCapacity ` status to detect if blob usage exceeds limits.
Add `onCapacityChange` and `onBlobSet` to monitor if the storage or blob exceeds the capacity limit.
Global modals `LocalQuotaModal` and `CloudQuotaModal` have been added, with the upload size of the blob being limited within the modal components.
The notification component has been adjusted, now you can pass in `action` click events and `actionLabel` .
2024-01-24 07:34:51 +00:00
Chen
c566952e09
feat: bump blocksuite ( #5673 )
2024-01-24 15:13:12 +08:00
liuyi
151a53c575
fix(server): disable payment module requirements temporarily ( #5683 )
2024-01-24 03:17:21 +00:00
Peng Xiao
a687e7c0ed
fix(core): workspace feature should be workspace specific ( #5677 )
...
fix TOV-429
2024-01-24 03:07:51 +00:00
Peng Xiao
c2a978f0f2
fix: create page button offset issue on non-windows desktop app ( #5669 )
...
fix TOV-428
2024-01-24 02:56:04 +00:00
Peng Xiao
f62b67de61
fix(core): should set lang when locale changes ( #5679 )
...
this + https://github.com/toeverything/design/pull/110 should fix #5591
fix TOV-457
Reason: HTML requires `lang` to be set to render the correct CJK glyphs.
https://heistak.github.io/your-code-displays-japanese-wrong
<img width="692" alt="image" src="https://github.com/toeverything/AFFiNE/assets/584378/1d350219-5157-42cb-8e98-76d92d55b41e ">
2024-01-24 02:43:22 +00:00
Peng Xiao
65b538ee45
chore: bump @toeverything/theme ( #5680 )
2024-01-24 02:43:19 +00:00
DarkSky
8bbe2e3bb1
feat: use custom image/preview link ( #5584 )
...
dep toeverything/blocksuite#5969
2024-01-23 08:53:57 +00:00
liuyi
62169c59c8
fix(server): del staled update count cache if unmatch ( #5674 )
2024-01-23 08:19:29 +00:00
Cats Juice
8300df4a26
fix(core): correct typo in onboarding 'get start' ( #5666 )
2024-01-23 04:54:22 +00:00
Cats Juice
6c8621bdcd
chore(core): bump @toeverything/theme, add cssVar use case ( #5667 )
2024-01-23 04:39:07 +00:00
LongYinan
021105c115
chore: bump up @blocksuite/icons version to v2.1.42 ( #5668 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons ) | [`2.1.41` -> `2.1.42`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.41/2.1.42 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>toeverything/icons (@​blocksuite/icons)</summary>
### [`v2.1.42`](fdca7d8e2e...fe902db67e )
[Compare Source](fdca7d8e2e...fe902db67e )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-23 04:27:58 +00:00
Peng Xiao
ecdb5b3407
fix(core): properties adapter reactivitiy issue ( #5661 )
2024-01-23 01:41:44 +00:00
Cats Juice
45cc75a814
ci(component): deploy ui storybook ( #5655 )
2024-01-22 10:25:33 +00:00
Cats Juice
35e7b41ca8
fix(component): adjust the style of Switch to match the design ( #5636 )
...
closes #5635
2024-01-22 10:14:32 +00:00
Joooye_34
fccdf8ede7
feat: bump blocksuite ( #5642 )
...
f0c45fd...4e2c95a
2024-01-22 08:37:32 +00:00
Peng Xiao
0ed26f51af
feat(core): adopt editor features for journal ( #5638 )
2024-01-22 08:25:31 +00: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
Peng Xiao
735e1cb117
feat(core): page info adapter for journal ( #5561 )
...
Page info adapter + schema.
Adapted for journal features.

2024-01-22 08:25:27 +00:00
liuyi
e516e0db23
refactor(server): plugin modules ( #5630 )
...
- [x] separates modules into `fundamental`, `core`, `plugins`
- [x] optional modules with `@OptionalModule` decorator to install modules with requirements met(`requires`, `if`)
- [x] `module.contributesTo` defines optional features that will be enabled if module registered
- [x] `AFFiNE.plugins.use('payment', {})` to enable a optional/plugin module
- [x] `PaymentModule` is the first plugin module
- [x] GraphQLSchema will not be generated for non-included modules
- [x] Frontend can use `ServerConfigType` query to detect which features are enabled
- [x] override existing provider globally
2024-01-22 07:40:28 +00:00
DarkSky
ae8401b6f4
feat: skip update quota if same as latest activated quota ( #5631 )
2024-01-22 06:50:05 +00:00
JimmFly
353b27d796
refactor(component): adapt the questionnaire component to the desktop client ( #5514 )
...
close TOV-240
Windows desktop:
<img width="1145" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/6b12a6bd-c020-4d02-a366-e97e1afd1e10 ">
MacOS desktop:
<img width="1187" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/9a3c909c-b283-4ddc-a187-3db12b26a7f5 ">
Web:
<img width="1438" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/e8e04258-9275-470d-a3f8-5d18f5b29eb3 ">
2024-01-19 10:07:18 +00: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