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
Peng Xiao
cc2d97e3b8
fix: right sidepanel open on focus ( #5901 )
...
fix TOV-614
Should not show sidepanel on focusing inner elemenets
2024-02-26 03:43:37 +00:00
Peng Xiao
7d73145a69
fix: page info -> info ( #5892 )
...
fix AFF-607
2024-02-23 14:14:43 +00:00
Peng Xiao
c16e4d4464
fix: page properties flaky tests ( #5893 )
2024-02-23 14:14:41 +00:00
Peng Xiao
9e7406e0a1
chore: downgrade react-virtuoso to 4.6.3 ( #5896 )
...
temp workaround for https://github.com/petyosi/react-virtuoso/issues/1039

2024-02-23 13:55:11 +00:00
Peng Xiao
db1d0dcf52
fix(electron): autohide menu bar on linux ( #5890 )
2024-02-23 09:27:29 +00:00
Peng Xiao
745110c799
fix: page info ui issue on journal page ( #5887 )
2024-02-23 07:55:44 +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 )
...

2024-02-23 06:29:46 +00:00
Peng Xiao
c22216c71a
fix: fix image preview modal story ( #5879 )
2024-02-23 06:07:46 +00:00
Peng Xiao
0bbecec2fb
fix(electron): add back bundle test for appimage ( #5876 )
...
In an attempt to fix AppImage build test, I incorrectly removed the script.
This PR add it back.
2024-02-23 04:36:15 +00:00
Peng Xiao
8b1d7219be
chore(electron): bump @pengx17/electron-forge-maker-appimage to fix appimage build ( #5875 )
...
It looks like I did not publish the correct `@pengx17/electron-forge-maker-appimage`, which will result in failed build for AppImage
2024-02-23 04:36:06 +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 )
...

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
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 )
...

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
Peng Xiao
3881164854
build(electron): generate latest-linux.yml ( #5822 )
2024-02-19 14:25:02 +00:00
Peng Xiao
20f7473e20
fix(electron): linux login issues ( #5821 )
...
Looks like there are some issues using `@reforged/maker-appimage`:
- deep link not working properly (cannot login)
- cannot be installed via AppImageLauncher, which is required to enable deep link on linux
I forked saleae/electron-forge-maker-appimage into https://github.com/toeverything/electron-forge-maker-appimage to fix these issues
See changes: https://github.com/saleae/electron-forge-maker-appimage/compare/master...toeverything:electron-forge-maker-appimage:master?w=1
To enable login on Linux, the app must be installed via AppImageLauncher.

fix https://github.com/toeverything/AFFiNE/issues/4978
fix https://github.com/toeverything/AFFiNE/issues/4466
2024-02-19 14:24:59 +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
Peng Xiao
005c02f148
fix(core): flaky tests ( #5804 )
2024-02-06 03:20:54 +00:00
Peng Xiao
afccf3d8c9
feat(core): add an option to throttle cpu in e2e ( #5803 )
...
To debug e2e flakyness locally
2024-02-06 03:20:49 +00:00
Peng Xiao
5ca0d65241
test(core): config e2e output dir ( #5783 )
2024-02-05 04:10:17 +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
Peng Xiao
df8e8051c3
chore: bump electron dependencies ( #5770 )
...
to include this fix https://github.com/electron/electron/pull/40994
2024-02-01 08:53:20 +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
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
994ab96688
fix(playground): storybook story load issue ( #5672 )
...
Since the properties adapter now depends on whenLoaded status of the ydoc, we may need to explicitly mark doc as emit if the workspace is created without using a provider.
2024-01-24 02:56:07 +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
Peng Xiao
ecdb5b3407
fix(core): properties adapter reactivitiy issue ( #5661 )
2024-01-23 01:41:44 +00:00
Peng Xiao
03b60a63cd
fix: remove incorrect commit ( #5660 )
2024-01-23 01:41:39 +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
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
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
Peng Xiao
5aea84af8f
fix(electron): remove cors headers hack ( #5581 )
2024-01-12 16:48:55 +08: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
Peng Xiao
b86a5a2830
fix(core): sidebar extension sometimes not show ( #5513 )
2024-01-05 13:17:02 +00:00
Peng Xiao
a709624ebf
feat(core): page preview ui optimize ( #5442 )
...

fix TOV-92
No animations right now.
2024-01-03 03:30:43 +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
Peng Xiao
8dc3e3d65c
fix(core): add free plan prompt ( #5441 )
...
fix TOV-91

2024-01-03 01:50:32 +00:00
Peng Xiao
444de6d4ac
fix(core): adjust error boundary level ( #5493 )
...
Allowing showing page title for page detail when page throws error.

2024-01-02 22:48:19 +08:00
Peng Xiao
922bc11f16
test(core): fix selectMonthFromMonthPicker logic ( #5498 )
2024-01-02 14:21:14 +00:00
Peng Xiao
b84494ef86
feat(core): optimize history list item ui ( #5440 )
...

fix TOV-90
2024-01-02 05:46:56 +00:00
Peng Xiao
da5ac224ca
test(core): select monthpicker issue when crossing different years ( #5478 )
2024-01-02 03:28:38 +00:00
Peng Xiao
9e092b9c15
fix(core): long page title issue in page history ( #5436 )
...

2023-12-29 07:27:02 +00:00
Peng Xiao
f65c5dbfa7
fix(core): upgrade page when previewing/reverting page snapshot ( #5435 )
2023-12-29 07:26:58 +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
Peng Xiao
6fefe4ec71
fix(storybook): storybook flaky ( #5430 )
...
should add additional wait timeout for every story.play
I think this is a storybook issue. It seems that it starts to run the plays as soon as the following shows up:

2023-12-28 10:07:05 +00:00
Peng Xiao
0c64535e41
fix(infra): remove unused svg loader ( #5398 )
2023-12-27 09:00:37 +00:00
Peng Xiao
ce17daba42
fix(core): enable page history for beta/stable ( #5415 )
2023-12-27 06:30:29 +00:00
Peng Xiao
c02ec5f7b9
fix(infra): workaround for self-referencing in storybook ( #5406 )
2023-12-26 20:27:20 +08:00
Peng Xiao
285d2a7219
fix(core): trash page footer display issue ( #5402 )
...
Before

After

2023-12-26 08:07:17 +00:00
Peng Xiao
fafcfbce6d
fix(core): about setting blink issue ( #5399 )
2023-12-26 07:47:11 +00:00
Peng Xiao
c59a6a833c
fix(core): workpace list blink issue on open ( #5400 )
2023-12-26 07:37:41 +00:00
Peng Xiao
972de52833
fix(core): remove plugins settings ( #5337 )
...
depend on https://github.com/toeverything/AFFiNE/pull/5324
2023-12-26 06:21:59 +00:00
Peng Xiao
bfbdde212f
fix(storybook): disable onboarding for storybook ( #5351 )
2023-12-21 03:11:44 +00:00
Peng Xiao
d03567f689
fix(electron): onboarding display issue on Windows ( #5320 )
2023-12-19 09:32:12 +00:00
Peng Xiao
128f8066c3
fix(electron): main window should be opened first before destroying onboard window ( #5319 )
...
The issue listed on the title will prevent main window from showing on windows.
2023-12-19 09:22:44 +00:00
Peng Xiao
a815fd6b9a
feat(core): ai poc ( #5317 )
2023-12-19 05:13:29 +00:00
Peng Xiao
408b84109b
fix(storybook): disable cloud for storybook ( #5330 )
2023-12-19 02:07:17 +00:00
Peng Xiao
fc56a53acd
fix(core): page mode switch sometimes not working ( #5306 )
...
Should not pass inline object without memo into `InternalLottie`.
https://github.com/toeverything/AFFiNE/blob/cdc96876b0a764ccf4f8ae9b7877ba8ae6774acb/packages/frontend/component/src/components/internal-lottie/index.tsx#L77
In the detail page when during syncing on the cloud, the detail page will be re-rendered constantly because of `useCurrentSyncEngineStatus` hook, which will then cause `PageSwitchItem` to re-render and forcing the internal lottie state to reset. As a result the click event may not be captured somehow.
2023-12-15 08:21:41 +00:00
Peng Xiao
63de73a815
fix: width blink in side bar ( #5291 )
2023-12-14 09:20:18 +00:00
Peng Xiao
c66781970b
feat(core): add useQueryImmutable ( #5299 )
2023-12-14 08:04:50 +00:00
Peng Xiao
b925731bf7
fix: add sidebar toggle and windows controls for empty collections page ( #5304 )
...
Before this change, when the user gets to an empty collection page & hide the sidebar, there is no sidebar toggle any longer.
Also added windows app control on windows.
2023-12-14 07:13:01 +00:00
Peng Xiao
3efcdc0cc5
fix: detail page missing background ( #5303 )
...
before

after

2023-12-14 06:50:21 +00:00
Peng Xiao
0dc9358972
fix: page title too long style ( #5302 )
...

2023-12-14 06:31:59 +00:00
Peng Xiao
098787bd0c
fix(core): collection modal position after modal style changes ( #5289 )
...
fix https://github.com/toeverything/AFFiNE/issues/5270
fix TOV-161
2023-12-13 08:14:55 +00:00
Peng Xiao
cd2efb4f0b
chore: remove react-resizable-panels ( #5284 )
2023-12-13 07:52:02 +00: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
Peng Xiao
2a9a6855f4
test(core): rewrite some flaky assertions ( #5287 )
2023-12-13 07:51:59 +00:00
Peng Xiao
ad2c254ca3
fix(core): simple history entry position ( #5290 )
...
fix AFF-377
2023-12-13 07:33:15 +00:00
Peng Xiao
883ab46557
fix(core): bg color issues in transparent mode ( #5278 )
...
fix the following style issue

2023-12-13 07:14:24 +00:00
Peng Xiao
31dc1f5e00
fix(electron): use dynamic load for exposed meta ( #5251 )
...
There is high possibilities of circular dependencies when importing `exposed-meta` module. Change it to dynamic import to mitigate the issue..
2023-12-13 05:17:17 +00:00
Peng Xiao
c9f900b69c
fix(core): page header style changes ( #5279 )
...

2023-12-13 05:06:29 +00:00
Peng Xiao
cfd200528f
fix(component): revert theme flickering ( #5238 ) ( #5256 )
...
This reverts commit e8cfc807ea .
2023-12-11 06:05:16 +00:00
Peng Xiao
e8cfc807ea
fix(electron): use tree-kill for electron dev ( #5252 )
...
electron process sometimes do not get re-spawned because of some child process not being closed.
use tree-kill instead.
2023-12-11 04:26:19 +00:00
Peng Xiao
5979162a5c
fix(component): theme flickering ( #5238 )
...
Add color-scheme to html so that the web will use system scheme when scripts has not being loaded;
Use `(prefers-color-scheme: dark)` so that the css vars do not defer load based on `data-theme`, which is set by next-themes (which is deferred).
2023-12-08 10:12:20 +00:00
Peng Xiao
f88e67f5ab
fix(core): flaky local avartar test ( #5229 )
...
it seems we should not reopen workspace card list just after created a new workspace
2023-12-08 04:01:36 +00:00
Peng Xiao
fcd43033fe
fix(electron): sync settings from localStorage -> atom -> electron ( #5020 )
...
- moved `appSettingAtom` to infra since we now have different packages that depends on it. There is no better place to fit in for now
- use atomEffect to sync setting changes to updater related configs to Electron side
- refactored how Electron reacts to updater config changes.
2023-12-08 03:20:02 +00:00
Peng Xiao
5352736eba
feat(component): new right sidebar ( #5169 )
...
Refactor AFFiNE layout to support new right sidebar.
The new layout:

**Highlights:**
- new sidebar UI/UX
- favoring top-down UI components that are composed by basic building blocks in each route, instead of creating universal component like `WorkspaceHeader` that renders every possible cases (which I think is really hard to maintain)
- remove plugin based solution
**Pros/cons for current plugin-based solution:**
The current solution is somewhat a Dependency Injection (DI) approach, where the layout is defined at the top and UI items can be injected using Jotai atom slots.
This approach works well if we want a fully configurable system with everything being handled by plugins. It provides flexibility for custom extensions.
However, this solution is more suitable for single-page applications where the UI is completely controlled by configuration. It becomes challenging to achieve an optimized and visually appealing UI that remains under our control. An example of such a scenario would be a customizable dashboard like Grafana.
Another drawback of the existing solution is that we need to use Jotai and hooks to access context values, resulting in an unclear data flow within the component hierarchy.
**Alternatively, our approach in this PR** provides layout building blocks such as headers and sidebars, which can then be composed in individual route components. The good is that we have cleaner biz component instead of vague all-in-one layout component (like `<WorkspaceHeader />`).
**Issues of the implementation in this PR:**
Some UI layouts that that seems to be defined at the root layout are now defined in individual route component instead.
New 3-col layout component like the right sidebar still needs some abstraction and they are right now just for the detail editor only.
2023-12-08 01:03:48 +00:00
Peng Xiao
980831f9f1
fix(electron): add debug flag for helper process ( #5223 )
2023-12-07 15:56:09 +00:00
Peng Xiao
ed8e526f71
fix(core): remove duplicate loading component ( #5168 )
2023-12-07 15:34:10 +00:00
Peng Xiao
352bb548f0
fix(core): update noise image ( #5219 )
...
seems https://github.com/toeverything/AFFiNE/pull/4946 not in latest canary.
2023-12-07 15:11:00 +00:00
Peng Xiao
2b53430539
feat(core): allow core modules to import itself ( #5207 )
2023-12-06 08:45:54 +00:00
Peng Xiao
1e01ed0b0f
fix(component): modal blurness ( #5177 )
...
moved https://github.com/toeverything/design/pull/108
Do not use transform to center the modal. It has know issue to cause modal to have blurred texts.
https://github.com/radix-ui/website/issues/383
fix https://github.com/toeverything/AFFiNE/issues/5176
2023-12-05 09:18:49 +00:00
Peng Xiao
512504e177
fix(electron): do not restore window on get window ( #5163 )
...
fix https://github.com/toeverything/AFFiNE/issues/5161
Looks like I used window.restore incorrectly.
2023-12-02 15:13:48 +00:00
Peng Xiao
6661e8bd9a
fix(core): language display names ( #5123 )
2023-11-30 12:23:03 +08:00
Peng Xiao
890e3e4435
fix(core): should not refetch avatar when url does not change ( #5070 )
...
blob resources are in fact immutable. We do not need to refetch it by swr policies (mount/visibilitychange/etc)
2023-11-28 08:01:19 +00:00
Peng Xiao
3891f23dfa
fix(component): rework tags list collapsing ( #5072 )
...
Before:

After:

2023-11-27 09:56:25 +00:00
Peng Xiao
8841dc3c4e
fix(electron): electron dev startup on win ( #5031 )
2023-11-27 08:45:33 +00:00
Peng Xiao
2deceb6e85
test(core): simple recovery ui e2e ( #5059 )
2023-11-27 06:39:41 +00:00
Peng Xiao
71d6b730f7
chore: bump blocksuite ( #5051 )
...
https://github.com/toeverything/blocksuite/pull/5337
2023-11-27 04:46:23 +00:00