Commit Graph

1017 Commits

Author SHA1 Message Date
Peng Xiao 922bc11f16 test(core): fix selectMonthFromMonthPicker logic (#5498) 2024-01-02 14:21:14 +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 9d0b3b4947 refactor(core): move workspace atoms to core (#5459)
@affine/workspace/atom -> @affine/core/modules/workspace
2024-01-02 10:06:48 +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
Peng Xiao da5ac224ca test(core): select monthpicker issue when crossing different years (#5478) 2024-01-02 03:28:38 +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:

![CleanShot 2023-12-28 at 17.32.49@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/33d5e49d-a2fd-46c5-9f31-0f7cc14c3acf.png)
2023-12-28 10:07:05 +00:00
EYHN 9d51f9596f refactor(component): make component pure (#5427) 2023-12-28 09:57:26 +00:00
EYHN 86bd2a7d72 refactor(infra): no bundle infra (#5414) 2023-12-27 06:54:24 +00:00
EYHN 4e861d8118 refactor(electron): create electron api package (#5334) 2023-12-27 06:38:37 +00:00
EYHN 265ee81666 refactor(infra): remove old plugin system (#5411)
plugin system need redesign
2023-12-27 02:49:59 +00:00
Peng Xiao c02ec5f7b9 fix(infra): workaround for self-referencing in storybook (#5406) 2023-12-26 20:27:20 +08: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
EYHN 05025bf59a refactor(core): remove outline plugin and layout atom (#5326)
@affine/outline is no longer used, this PR deletes this plugin and deletes the code that is no longer used
2023-12-25 03:24:13 +00:00
regischen a10aeca820 feat: bump blocksuite (#5386) 2023-12-22 18:04:05 +08:00
Flrande a08edfd6d9 feat: bump blocksuite (#5374) 2023-12-22 03:17:57 +00:00
Chen 4dc41fcd09 feat: bump blocksuite (#5357) 2023-12-21 12:22:39 +08:00
Peng Xiao bfbdde212f fix(storybook): disable onboarding for storybook (#5351) 2023-12-21 03:11:44 +00:00
Joooye_34 a4f31df192 chore: update basic version to 0.11.0 (#5355) 2023-12-20 08:10:42 +00:00
LongYinan 800ea0abf1 fix(core): remove ses lockdown (#5350) 2023-12-20 04:11:34 +00:00
Joooye_34 e3882f9648 feat: bump bs (#5346)
Change history: https://github.com/toeverything/blocksuite/compare/a781985...8254dc9
2023-12-20 02:43:01 +00:00
LongYinan 30e62bd2c6 fix(core): downgrade ses (#5347)
ses@1 makes [this line](https://github.com/lit/lit/blob/lit-html%403.1.0/packages/reactive-element/src/reactive-element.ts#L406) throw an error: `TypeError: Cannot add property metadata, object is not extensible.`
2023-12-20 02:28:58 +00:00
Yifeng Wang 31b1b2dade feat: bump blocksuite (#5343) 2023-12-19 21:53:57 +08:00
LongYinan 36653e79d2 fix(core): dedupe ses versions (#5342) 2023-12-19 13:31:37 +00:00
Cats Juice e10609276d feat(core): add toggle workspace dialog (#5312) 2023-12-19 09:12:26 +00:00
Cats Juice 55818539af feat(core): basic page/edgeless toggle animation (#5283) 2023-12-19 08:48:54 +00:00
JimmFly 38617abc17 fix(component): fix incorrect input component width and height styling (#5292)
after:

https://github.com/toeverything/AFFiNE/assets/102217452/5d8f51c5-c7a6-4ec8-b2b0-7f1391f045c7
2023-12-19 08:27:46 +00:00
Cats Juice 15dd20ef48 feat(electron): onboarding at first launch logic for client and web (#5183)
- Added a simple abstraction of persistent storage class.
- Different persistence solutions are provided for web and client.
    - web: stored in localStorage
    - client: stored in the application directory as `.json` file
- Define persistent app-config schema
- Add a new hook that can interactive with persistent-app-config reactively
2023-12-19 07:17:54 +00:00
Peng Xiao 408b84109b fix(storybook): disable cloud for storybook (#5330) 2023-12-19 02:07:17 +00:00
JimmFly cef9e0539d fix(storybook): fix test (#5325)
<img width="440" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/329f9c12-cc0b-4aae-9352-3811ab0a27a6">
2023-12-18 13:36:56 +00:00
EYHN a1c9ac80d8 ci: fix e2e (#5329) 2023-12-18 12:24:48 +00:00
EYHN fe2851d3e9 refactor: workspace manager (#5060) 2023-12-15 07:20:50 +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
DarkSky ad23ead5e4 feat: integrate user usage into apis (#5075) 2023-12-14 09:50:37 +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 c9f900b69c fix(core): page header style changes (#5279)
![CleanShot 2023-12-13 at 00.09.19@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/476fe4de-4066-4b1d-8823-d23a31ef692b.png)
2023-12-13 05:06:29 +00:00
regischen 738302be40 fix(edgeless): remove stale template (#5275) 2023-12-13 12:54:26 +08:00
JimmFly f4a52c031f feat(core): support sidebar page item dnd (#5132)
Added the ability to drag page items from the `all pages` view to the sidebar, including `favourites,` `collection` and `trash`. Page items in `favourites` and `collection` can also be dragged between each other. However, linked subpages cannot be dragged.

Additionally, an operation menu and ‘add’ button have been provided for the sidebar’s page items, enabling the addition of a subpage, renaming, deletion or removal from the sidebar.

On the code front, the `useSidebarDrag` hooks have been implemented for consolidating drag events. The functions `getDragItemId` and `getDropItemId` have been created, and they accept type and ID to obtain itemId.

https://github.com/toeverything/AFFiNE/assets/102217452/d06bac18-3c28-41c9-a7d4-72de955d7b11
2023-12-12 16:04:58 +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
Flrande 9aa33d0228 feat: bump blocksuite (#5267)
Change history: https://github.com/toeverything/blocksuite/compare/2b5bb47...2b3d2ba
2023-12-12 06:18:30 +00:00
JimmFly feb7bd9fef fix(cli): fix storybook build error (#5257)
<img width="1036" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/477d653e-80b5-4364-a073-e3386cd7ab17">
2023-12-11 08:07:43 +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 5352736eba feat(component): new right sidebar (#5169)
Refactor AFFiNE layout to support new right sidebar.

The new layout:
![image](https://github.com/toeverything/AFFiNE/assets/584378/678a05f5-bd48-4dbe-ad78-7a0bcc979918)

**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
Joooye_34 70c376fac8 chore(core): skip cloud migration testing until page level upgrade implemented (#5227) 2023-12-07 11:50:24 +00:00
Yifeng Wang d507c24570 feat: bump blocksuite (#5228) 2023-12-07 19:28:49 +08:00
Yifeng Wang 819f0243d5 feat: bump blocksuite (#5218)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2023-12-07 18:24:23 +08:00
LongYinan 467d313730 test(server): remove flaky assertion (#5224) 2023-12-07 07:28:24 +00:00
Yifeng Wang 6cbf5b2a92 feat: bump blocksuite (#5194)
Co-authored-by: AyushAgrawal-A2 <ayushagl06@gmail.com>
2023-12-06 18:15:03 +08:00
LongYinan e5f8a58330 ci: refactor workflow (#5139)
Merge tests job into single one, reuse job as much as possible
2023-12-06 08:03:05 +00:00