Commit Graph

448 Commits

Author SHA1 Message Date
EYHN
96c67afc11
fix(core): catch auth error (#6128) 2024-03-15 03:45:23 +00:00
Cats Juice
ee75b468e6
fix(core): shared page's present button not working (#6117) 2024-03-15 03:32:37 +00:00
Cats Juice
7fdb1f2d97
feat(core): adjust split view ui (#6076) 2024-03-14 06:41:29 +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
05b79aae89
fix(core): fix tags includes missing error (#6096)
fix https://toeverything.sentry.io/issues/5059796018/events/0899e77a3f6842088568b4cc42b814d7/
2024-03-13 02:43:28 +00:00
Peng Xiao
20bce48132
fix: experimental settings sometimes not show (#6090) 2024-03-13 02:07:51 +00:00
Peng Xiao
3f27b7e5f7
fix(core): adjust suspense loading for some components (#6088)
Adjust setting & user info popover suspense to make them a little bit more responsive
2024-03-12 15:18:43 +00:00
Peng Xiao
e333b4d348
fix(core): make sidebar switch transition smooth (#6085) 2024-03-12 14:56:45 +00:00
liuyi
fb3a0e7b8f
refactor(server): auth (#5895)
Remove `next-auth` and implement our own Authorization/Authentication system from scratch.

## Server

- [x] tokens
  - [x] function
  - [x] encryption

- [x] AuthController
  - [x] /api/auth/sign-in
  - [x] /api/auth/sign-out
  - [x] /api/auth/session
  - [x] /api/auth/session (WE SUPPORT MULTI-ACCOUNT!)

- [x] OAuthPlugin
  - [x] OAuthController
  - [x] /oauth/login
  - [x] /oauth/callback
  - [x] Providers
    - [x] Google
    - [x] GitHub

## Client

- [x] useSession
- [x] cloudSignIn
- [x] cloudSignOut

## NOTE:

Tests will be adding in the future
2024-03-12 10:00:09 +00:00
regischen
5c1e904335
fix: linked doc jump (#6074) 2024-03-12 16:02:56 +08:00
Lye Hongtao
d5386bee41
fix: std might not be ready when onLoad invoked (#6075) 2024-03-12 16:02:42 +08:00
JimmFly
f832ada98c
fix(core): cannot scroll when dragging (#6070)
close TOV-671
2024-03-12 05:43:47 +00:00
EYHN
eca35ded2f
fix(core): fix page priority load (#6072)
When refactoring, I planned to put the logic of loading current pages priority in `PageManager.open`, but I forgot, so the current page will not be loaded priority.

But currently `PageManager.open` has been used in many places, but only one priority page can be set, so the logic of setting the priority page is still placed in the detail page.
2024-03-12 05:09:14 +00:00
EYHN
3672366fea
fix(core): fix missing windows controls (#6067)
fix #6064
2024-03-12 02:43:45 +00:00
Peng Xiao
716f679914
feat(electron): mica styles for windows (#5802)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/1b59f076-fc43-42a0-899d-007aeb16a4d6.png)
2024-03-11 09:41:09 +00:00
JimmFly
b26efa4940
feat(core): add tag operation to tag list (#5998)
https://github.com/toeverything/AFFiNE/assets/102217452/11745733-0d7b-494b-97fd-33e40a240a02
2024-03-11 08:36:07 +00:00
EYHN
ba4637a6bd
fix(core): add view error boundary (#6036) 2024-03-11 07:09:47 +00:00
Peng Xiao
c93077f643
fix: divider styles issue (#6058)
Using height: 1 as divider may have some display issues on Chrome. No idea why yet.
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/42b342fb-d109-4bf7-b458-e870099710bc.png)
2024-03-11 06:04:55 +00:00
EYHN
5091174da2
fix(core): remove unexpected loading (#6035) 2024-03-09 15:01:18 +00:00
LongYinan
3aba2d220b
fix: backlinks jump (#6034)
Fix [AFF-656](https://linear.app/affine-design/issue/AFF-656/back-links-看起来都坏了)
2024-03-06 11:06:02 +00:00
JimmFly
c7dd6778ac
fix(core): disable doc info and backlinks in readonly mode (#6033)
close AFF-671

<img width="1422" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/ef80b195-3d67-4751-82d9-12973f331798">
2024-03-06 10:07:20 +00:00
EYHN
633a5bab53
fix(core): fix cmdk not show current page (#6031) 2024-03-06 06:31:38 +00:00
Fangdun Tsai
5d63ca0bab
fix(core): canvas font loading in desktop (#6025) 2024-03-06 13:42:56 +08:00
fourdim
0ff1e8d2f7 fix: breaking function signature on showImportModal onSuceessHandler (#6011)
This will fix the breaking change introduced in
da781df473
This should be merged after the next BlockSuite bump.
2024-03-05 18:51:39 +00:00
EYHN
dce3b59c52
fix(core): fix falsy e2e (#6027) 2024-03-05 15:25:19 +00:00
EYHN
5d8dea084c
fix(core): fix journal missing after refresh (#6022) 2024-03-05 11:42:09 +00:00
JimmFly
c1afdb9bd6
fix(core): unexpected line breaks (#6019) 2024-03-05 10:02:22 +00:00
Lye Hongtao
5bebcec2eb
feat: bump blocksuite (#6015)
## Features
- https://github.com/toeverything/BlockSuite/pull/6379 @doodlewind
- https://github.com/toeverything/BlockSuite/pull/6375 @doodlewind
- https://github.com/toeverything/BlockSuite/pull/6370 @donteatfriedrice

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/6380 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/6377 @doouding
- https://github.com/toeverything/BlockSuite/pull/6376 @fourdim
- https://github.com/toeverything/BlockSuite/pull/6374 @regischen

## Misc
- docs: update examples desc
- ci: start publishing 0.13 canary
2024-03-05 07:35:05 +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
Lye Hongtao
b06aeb22dd
fix: view in edgeless button of surface block (#6013)
Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
Co-authored-by: Chen <99816898+donteatfriedrice@users.noreply.github.com>
2024-03-05 14:35:53 +08:00
Chen
ebf7a74387
feat: bump blocksuite (#6010) 2024-03-05 14:19:11 +08:00
Cats Juice
358e1e99c5
feat(core): set journal's really created time (#5968)
closes #5958;

This makes the creation date of the journal correspond to the date, and the creation time is the real creation time.
2024-03-05 03:37:23 +00:00
EYHN
a9be19ce6c
fix(core): fix style break when scroll to block (#6001) 2024-03-04 11:43:10 +00:00
EYHN
d935cf9d4d
fix(core): dont break workspace when page load failed (#5988) 2024-03-04 11:32:56 +00:00
Cats Juice
2275eee5b2
feat(core): resize and reorder split-view (#5994) 2024-03-04 11:19:39 +00:00
EYHN
c599715963
feat(core): split right sidebar (#5971)
https://github.com/toeverything/AFFiNE/assets/13579374/c846c069-aa32-445d-b59b-b773a9b05ced

Now each view has a general container, the yellow area is the general container part, and the green part is the routing specific part.

![CleanShot 2024-03-01 at 11.47.35@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/9a9f6ad6-2207-42e5-ae66-f7426bc9f3fc.png)
2024-03-04 06:42:12 +00:00
Peng Xiao
e2a31ea1fc
fix(core): some ui style issues (#5995)
Increase page info toggle click area:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7f712008-c2db-4522-81b0-6c18d2aea421.png)

fix history modal page height
2024-03-04 03:57:45 +00:00
Peng Xiao
a1ea19fcb7
fix: optimize history animation (#5973)
- adjust timing
- make sure card do not show the bottom border on transitioning

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/7a225ec1-eb33-45ab-bf27-646bb2519a83.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/7a225ec1-eb33-45ab-bf27-646bb2519a83.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7a225ec1-eb33-45ab-bf27-646bb2519a83.mp4">Kapture 2024-03-01 at 10.56.09.mp4</video>
2024-03-01 06:08:08 +00:00
JimmFly
ff7e7f237f
fix(core): update src in video tag to correct URL (#5974)
In app.affine.pro the video is not displayed correctly.

<img width="1026" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/8e9d9bb2-f973-433e-88c9-bedfe0f55935">
2024-03-01 04:36:37 +00:00
EYHN
a231884d9e
fix(storybook): fix storybook test (#5970) 2024-03-01 02:30:04 +00:00
Peng Xiao
d4e78dd3d0
feat: add animation for history preview (#5966)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/5ce45d13-1117-4853-a066-e8ab1446eb4f.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/5ce45d13-1117-4853-a066-e8ab1446eb4f.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/5ce45d13-1117-4853-a066-e8ab1446eb4f.mp4">Kapture 2024-02-29 at 18.54.15.mp4</video>
2024-02-29 14:08:21 +00:00
EYHN
78ce30db69
fix(core): fix editor sidebar (#5965) 2024-02-29 13:59:20 +00:00
regischen
d1e6b23e1a
feat: bump blocksuite (#5953) 2024-02-29 14:33:50 +08:00
DarkSky
3432f355b0
feat: backend module awareness & optional request (#5909) 2024-02-28 08:29:37 +00:00
Peng Xiao
35454c3bfc
fix(core): polyfill resize-observer for development to avoid error overlay (#5943)
Brought a temporary solution from https://github.com/petyosi/react-virtuoso/issues/875#issuecomment-1962897033
2024-02-28 08:18:33 +00:00
Peng Xiao
27f2209e87
fix(core): date formatter timezone issue (#5936)
date seems not hornoring the locale browser's locale when parsing date string like "2024-02-28".
fixed by using dayjs instead.

Fix incorrect journal title issue
2024-02-28 04:27:32 +00:00
LongYinan
9e09166452
build: fix selfhost config (#5930) 2024-02-28 04:17:29 +00:00
Peng Xiao
a0364dd4ea
fix(core): minor page info style issues (#5935) 2024-02-28 03:45:51 +00:00
Peng Xiao
148807879b
refactor(component): use react-transition-state to simplify exit animation (#5923)
## **User description**
use react-transition-state to simplify exit animation

___

## **Type**
enhancement

___

## **Description**
- Integrated `react-transition-state` for managing animations in `ResizePanel` and `CMDKModal` components, simplifying the code and improving maintainability.
- Introduced a shared animation timeout variable to standardize animation durations across components.
- Added `react-transition-state` to dependencies to enable the new animation handling.

___

## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>resize-panel.tsx</strong><dd><code>Integrate `react-transition-state` for Resize Panel Animations</code></dd></summary>
<hr>

packages/frontend/component/src/components/resize-panel/resize-panel.tsx

<li>Introduced <code>useTransition</code> hook from <code>react-transition-state</code> for managing <br>animations.<br> <li> Added a constant for animation timeout and applied it to the <br>transition.<br> <li> Utilized the transition state to toggle the open state of the resize <br>panel.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-a4d6e633862f63f97c167ff41ba62aff8aebf3e3b2f6e7ce13d5a0e22e8ff287">+12/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>modal.css.ts</strong><dd><code>Use Variable for Animation Timeout in Modal CSS</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/frontend/core/src/components/pure/cmdk/modal.css.ts

<li>Created a variable for animation timeout.<br> <li> Updated animation durations to use the new timeout variable.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-ba8935611b9c1695153d92d08ecb0f7dac73a6197f54ccda5a6e791902cd651d">+6/-3</a>&nbsp; &nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>modal.tsx</strong><dd><code>Simplify CMDK Modal Animation with `react-transition-state`</code></dd></summary>
<hr>

packages/frontend/core/src/components/pure/cmdk/modal.tsx

<li>Replaced custom animation state management with <code>useTransition</code> hook.<br> <li> Removed old animation state logic and simplified the component.<br> <li> Added animation timeout variable and applied it to the transition.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-ab3fe66c9b1d3a691fafd1aebc9988e840fedfcd09b5b89570838a5a2a9469c9">+13/-33</a>&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>package.json</strong><dd><code>Add `react-transition-state` Dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/frontend/core/package.json

- Added `react-transition-state` as a dependency.

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-23e0e5dc0ceb004a0a5d3d13e7d00545de7487535ca0e5eab4c5047f1e24eff0">+1/-0</a>&nbsp; &nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

>  **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
2024-02-27 14:55:33 +00:00
EYHN
606397e319
feat(core): workbench system (#5837) 2024-02-27 04:14:07 +00:00
EYHN
5cd488fe1d
refactor(core): remove collection atom (#5832) 2024-02-27 03:50:56 +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
Peng Xiao
2295685590
fix: page info styles (#5910)
fix inconsistent styles compared to the one defined in figma
fix https://github.com/toeverything/AFFiNE/issues/5904
fix https://github.com/toeverything/AFFiNE/issues/5903
2024-02-26 14:11:24 +00:00
Peng Xiao
298afc7d74
feat(core): enable right sidepanel animation (#5902) 2024-02-26 09:04:04 +00:00
JimmFly
0be62d892d
refactor(core): use custom scrollbar for editor and adjust shared page style (#5752)
Close TOV-481
- Use a custom scrollbar component for editor
- Modified the header of the share page and added a new footer
2024-02-26 08:54:52 +00:00
JimmFly
e9f9eea80c
fix(core): handling error message when sending verify change email (#5894) 2024-02-26 08:32:48 +00:00
LongYinan
ae41c6c544
chore: bump all dependencies (#5891) 2024-02-23 09:37:14 +00:00
JimmFly
815ddd3778
chore: replace pricing plan link (#5886)
close TOV-609
2024-02-23 08:28:24 +00:00
Whitewater
9692a120a0
chore: filter out edgeless content from page preview (#5607)
Co-authored-by: EYHN <cneyhn@gmail.com>
2024-02-23 08:16:26 +00:00
Whitewater
228b0d789d
feat: add shared page filter to all pages (#5540)
Co-authored-by: EYHN <cneyhn@gmail.com>
2024-02-23 16:07:13 +08:00
Peng Xiao
745110c799
fix: page info ui issue on journal page (#5887) 2024-02-23 07:55:44 +00:00
EYHN
3f7f78c8f4
fix(core): fix app boot speed (#5885) 2024-02-23 07:07:03 +00:00
Peng Xiao
7ec3f7a042
feat(core): add shortcut for openning settings (#5883)
fix https://github.com/toeverything/AFFiNE/issues/5881
2024-02-23 06:29:49 +00:00
Peng Xiao
bef72029a0
fix: keyboard shortcut style in cmdk (#5882)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7eb2fa93-675a-43a6-8db4-9681fbbd1406.png)
2024-02-23 06:29:46 +00:00
JimmFly
4ea4a2d25f
feat(core): support create cloud workspace (#5771)
close TOV-475

has not logged:

https://github.com/toeverything/AFFiNE/assets/102217452/b9aa2806-7dbd-4235-895d-5b27effb5831

 has logged :

https://github.com/toeverything/AFFiNE/assets/102217452/259a1c35-c6ab-4a52-9e03-4438ca64e620

client has not logged:

https://github.com/toeverything/AFFiNE/assets/102217452/af6ef528-6fb8-4a27-842f-00c9669afcb2
2024-02-23 06:18:25 +00:00
LongYinan
c88998678e
feat: add paragraph when clicking end area (#5869)
Close [TOV-442](https://linear.app/affine-design/issue/TOV-442/结尾是非编辑yuan素时,无法在最底部添加block)
2024-02-22 09:54:17 +00:00
Peng Xiao
2df8f29b64
refactor(core): use fractional indexing for sorting (#5809)
use https://github.com/rocicorp/fractional-indexing to enable better sorting logic for crdt app
2024-02-22 09:38:00 +00:00
Peng Xiao
372b4da884
test(core): add tests for page info ui (#5769)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/64419f79-46e8-4171-b853-5908841f827a.png)
2024-02-22 09:37:55 +00:00
Peng Xiao
bb8e601f82
feat(core): tags inline editor (#5748)
tags inline editor and some refactor

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/439da1e3-30a9-462a-b7b4-c8e7c3b5ef17.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/439da1e3-30a9-462a-b7b4-c8e7c3b5ef17.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/439da1e3-30a9-462a-b7b4-c8e7c3b5ef17.mp4">Kapture 2024-01-31 at 23.29.11.mp4</video>

fix AFF-467
fix AFF-468
fix AFF-472
fix AFF-466
2024-02-22 09:37:50 +00:00
Peng Xiao
546d96c5c9
feat(core): workspace properties setting (#5739)
the property settings in workspace settings
2024-02-22 09:37:46 +00:00
LongYinan
35842ae1c5
fix(core): fix 404 after signout (#5866)
CherryPick https://github.com/toeverything/AFFiNE/pull/5865
2024-02-22 08:30:41 +00:00
Cats Juice
390fb90a8b
feat(core): ignore empty journal for global useBlockSuitePageMeta hook (#5715)
[TOV-494](https://linear.app/affine-design/issue/TOV-494/空-journal-的隐藏处理)
2024-02-22 08:09:33 +00:00
EYHN
0fff5588e6
fix(core): disable sidebar user select (#5862)
close #5846
2024-02-22 07:58:14 +00:00
Umar Faiz
f2c5786dd0
fix(core): the pitch zooming function incorrectly zooms the toolbar (#5456)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-22 15:04:33 +08:00
Peng Xiao
58ea2fbc4c
fix(core): editor container grow to full height (#5743) 2024-02-22 06:20:40 +00:00
Peng Xiao
a120eb90ab
fix(core): journal display on cmdk (#5723)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/01d2c2ec-cfdd-4c90-9616-606e4a473cc0.png)
2024-02-22 06:09:18 +00:00
Peng Xiao
d97304e9eb
feat(core): page info ui (#5729)
this PR includes the main table view in the page detail page
2024-02-22 05:58:15 +00:00
Ayush Agrawal
a01f0d86a5
fix: css style should not apply on nested editor's viewport (#5859) 2024-02-22 10:46:16 +08:00
JimmFly
c353b0d30f
chore: replace ambiguous "page" with "doc" (#5761)
close TOV-532
2024-02-21 12:47:17 +00:00
liuyi
85be45a79c
fix(core): window.open to a new origin will be blocked by browser (#5856) 2024-02-21 12:35:25 +00:00
Ayush Agrawal
11b3184537
feat: blocksuite integration for pageMode & pageUpdatedAt (#5849)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-21 15:03:02 +08:00
Lye Hongtao
4641bc422b
feat: move templates into AFFiNE (#5750)
Related to https://github.com/toeverything/blocksuite/pull/6156

### Change
Move the edgeless templates to AFFiNE. All templates are stored as zip files. Run `node build-edgeless.mjs` in `@affine/templates` to generate JSON-format templates and importing script. The template will be generated automatically during building and dev (`yarn dev`).
2024-02-21 06:26:01 +00:00
Cats Juice
3fe9d834de
feat(core): replace page filter, journal's date-picker with new one (#5675) 2024-02-20 13:53:41 +00:00
JimmFly
876b85304e
feat(core): add loading to quick search modal (#5785)
close AFF-285

add `useSyncEngineStatus` hooks
add loading style

<img width="977" alt="test1" src="https://github.com/toeverything/AFFiNE/assets/102217452/e8bf6714-e42b-4adf-a279-341ef5f5cfc0">
2024-02-20 13:05:22 +00:00
JimmFly
3792506b09
feat(core): add history tips modal (#5733)
close TOV-459 TOV-503

https://github.com/toeverything/AFFiNE/assets/102217452/9cbfaf35-bc7b-4275-94be-6e777447ef11
2024-02-20 12:50:55 +00:00
JimmFly
4068e7aeff
feat(core): add starAFFiNE and issueFeedback modal (#5718)
close TOV-482

https://github.com/toeverything/AFFiNE/assets/102217452/da1f74bc-4b8d-4d7f-987d-f53da98d92fe
2024-02-20 12:50:51 +00:00
Ayush Agrawal
6fad241350
feat: bump blocksuite (#5845) 2024-02-20 20:49:41 +08:00
JimmFly
a554c8aabe
fix(core): match page preview and page title in page list (#5840)
close TOV-578
2024-02-20 09:27:23 +00:00
Adithyan
afe59a864d
feat: Duplicate page in page list and clone naming improvements (#5818) 2024-02-20 16:44:25 +08:00
Muhammad Arsil
1eb317d8fa
fix: cards overlapping issue (#5727)
Co-authored-by: EYHN <cneyhn@gmail.com>
2024-02-20 16:27:43 +08:00
Whitewater
1ceaf87a86
chore: skip sync when offline (#5786) 2024-02-19 10:22:22 +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
Flrande
2e3ffeced9
feat: bump blocksuite (#5812) 2024-02-08 08:18:03 +08:00
Peng Xiao
005c02f148
fix(core): flaky tests (#5804) 2024-02-06 03:20:54 +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
LongYinan
51680da33b
fix(core): prevent data loss (hot-fix) (#5798) (#5800) 2024-02-05 03:53:32 +00:00
LongYinan
899528dcfd
fix(core): load fonts from selfhost url (#5789) 2024-02-02 14:41:06 +00:00
liuyi
bef266ae3b
refactor(server): reorganize server configs (#5753) 2024-02-02 08:32:07 +00:00
LongYinan
8f4b4e20ab
fix(core): typecheck after jotai upgraded (#5779) 2024-02-01 16:10:14 +00:00
Peng Xiao
7d951a975f
fix(core): replace most --affine with cssVar (#5728)
using a [babel plugin](https://gist.github.com/pengx17/49e24ae8a5a609bdaff122ee8c679d1c) to transform all var(--affine-xxx) to cssVar

Some issues:
- tried ast-grep but it seems to be not easy to add imports conditionally
- current work does not work well with ts with types because babel will strip them out
2024-02-01 09:33:11 +00:00
Joooye_34
338c3001b0
feat: support sign-in with subscription coupon (#5768) 2024-02-01 08:43:47 +00:00
liuyi
26db1d436d
refactor(server): server errors (#5741)
standardize the error raising in both GraphQL Resolvers and Controllers.

Now, All user aware errors should be throwed with `HttpException`'s variants, for example `NotFoundException`.

> Directly throwing `GraphQLError` are forbidden.
The GraphQL errorFormatter will handle it automatically and set `code`, `status` in error extensions.

At the same time, the frontend `GraphQLError` should be imported from `@affine/graphql`, which introduce a better error extensions type.

----
controller example:
```js
@Get('/docs/${id}')
doc() {
  // ...
  // imported from '@nestjs/common'
  throw new NotFoundException('Doc is not found.');
  // ...
}
```
the above will response as:
```
status: 404 Not Found
{
  "message": "Doc is not found.",
  "statusCode": 404,
  "error": "Not Found"
}
```

resolver example:
```js
@Mutation()
invite() {
  // ...
  throw new PayloadTooLargeException('Workspace seats is full.')
  // ...
}
```

the above will response as:
```
status: 200 Ok
{
  "data": null,
  "errors": [
    {
      "message": "Workspace seats is full.",
      "extensions": {
        "code": 404,
        "status": "Not Found"
      }
    }
  ]
}
```

for frontend GraphQLError user-friend, a helper function introduced:

```js
import { findGraphQLError } from '@affine/graphql'

fetch(query)
  .catch(errOrArr => {
    const e = findGraphQLError(errOrArr, e => e.extensions.code === 404)
    if (e) {
      // handle
    }
})
```
2024-01-31 08:43:03 +00:00
Cats Juice
5f3c04b51e
fix(core): set createDate to journal's date when journal created (#5701) 2024-01-30 23:11:07 +08:00
Cats Juice
6b350b1735
feat(core): append to today's joruanl via CMDK (#5692) 2024-01-30 23:08:25 +08:00
EYHN
329fc19852
refactor(infra): migrate to new infra (#5565) 2024-01-30 07:16:39 +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
Peng Xiao
e8a6b6ad5e
fix(core): bidi links rendering issue (#5707) 2024-01-26 06:07:04 +00:00
Cats Juice
e7307d969c
chore(core): remove journal experimental flag (#5698) 2024-01-25 05:33:57 +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
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
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
DarkSky
8bbe2e3bb1
feat: use custom image/preview link (#5584)
dep toeverything/blocksuite#5969
2024-01-23 08:53:57 +00:00
Cats Juice
8300df4a26
fix(core): correct typo in onboarding 'get start' (#5666) 2024-01-23 04:54:22 +00:00
Peng Xiao
ecdb5b3407
fix(core): properties adapter reactivitiy issue (#5661) 2024-01-23 01:41:44 +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.

![image](https://github.com/toeverything/AFFiNE/assets/584378/2731ed2b-a125-4d62-b658-f2aff49d0e17)
2024-01-22 08:25:27 +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
Cats Juice
351f1b73b4
feat(core): add journal entrance for app-sidebar (#5579) 2024-01-18 14:40:35 +00:00
Cats Juice
65bcdcafde
feat(core): add experimental flag for journal (#5578) 2024-01-18 14:05:17 +00:00
Cats Juice
f4b26a16f8
feat(core): journal sidebar conflict block (#5574) 2024-01-18 14:05:15 +00:00
Cats Juice
7aaec3ad51
feat(core): add daily count for journal sidebar (#5559) 2024-01-18 12:54:44 +00:00
JimmFly
a7e8664959
fix(core): reserve space for the editor scrollbar (#5625)
Because the space for the scroll bar on the right is reserved, in order to make the editor symmetrical, padding corresponding to the width of the scroll bar is added to the left.
2024-01-18 12:44:27 +00:00
Cats Juice
70ea1e5ef8
feat(core): journal sidebar dater-picker navigation (#5558) 2024-01-18 12:34:23 +00:00
Cats Juice
496dc588be
feat(core): journal extension loader (#5557) 2024-01-18 09:27:56 +00:00
regischen
8b1b5b2e93
feat: bump blocksuite (#5624) 2024-01-18 17:26:31 +08:00
Peng Xiao
9a944048e8
feat(core): experimental features ui (#5338)
fix TOV-280

experimental features ui
- enabled in the workspace settings for a cloud workspace; only show for workspace owner + early access
- a disclaimer prompt will be shown before going to the next feature setting page
- for now only show the ai poc switch, which controls the display of the ai tab in editor's sidepanel
2024-01-18 07:53:15 +00:00
Cats Juice
cabedef426
feat(core): journal hooks and page header layout (#5549)
feat(core): split page header items

feat(core): journal page judgment and header layout

feat(core): Add journal today button and style changes to share menu
2024-01-18 07:17:14 +00:00
Cats Juice
a64854319e
feat(core): add document title for shared page (#5596) 2024-01-18 07:04:37 +00:00
liuyi
b9f20877d0
feat(core): make password sigin default if user has one (#5577) 2024-01-17 11:13:58 +00:00
Cats Juice
2db3c933fa
refactor(component): move date-picker to ui, add story, support responsive (#5468)
- move to `component/ui`
- add `AFFiNEDatePicker` & `BlocksuiteDatePicker` story
- inline mode support
- responsive support
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/320bef49-380f-40a2-b3b2-4b74dd2d8da4">
    <img  alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/fc9e7808-02fe-49a1-aa78-aea254fb1f9d">
  </picture>
2024-01-17 09:16:46 +00:00
JimmFly
4f4d057aad
refactor(core): replace WorkspaceSubPath in env package with the one in core package (#5537) 2024-01-16 08:26:11 +00:00
Peng Xiao
238d1ad44e
fix(component): add back lottie color hack for dark mode (#5576)
Not sure why but it seems the changes in https://github.com/toeverything/AFFiNE/pull/4953 are lost
2024-01-16 08:11:51 +00:00
JimmFly
baeb5cc732
feat(core): get cloud workspace usage limit from user quota (#5518) 2024-01-16 07:57:23 +00:00
Lewis Liu
94e24d1b82
style: import from './index' instead of '.' (#5590)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-01-16 14:39:08 +08:00
regischen
3602f1cac0
feat: bump blocksuite (#5575) 2024-01-12 12:41:27 +08:00
EYHN
d1c2b2a7b0
fix(core): workspace not found after import (#5571)
close TOV-393
2024-01-11 09:47:24 +00:00
EYHN
5aee480c50
refactor(core): move page list to core (#5556) 2024-01-10 11:09: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