Commit Graph

61 Commits

Author SHA1 Message Date
forehalo
a387e4ac07 refactor: migrate environment to BUILD_CONFIG (#8206) 2024-09-13 07:58:20 +00:00
EYHN
2524491bd1 fix(env): is mobile flag (#8005)
only 'mobile' entry has isMobile = true flag
2024-09-04 09:21:36 +00:00
EYHN
eb16c273ee feat(core): apply default doc mode setting (#8083) 2024-09-04 08:31:36 +00:00
Saul-Mirone
56f4634c1f chore: bump bs with new extension api (#8042) 2024-09-02 10:32:22 +00:00
EYHN
b96ad57568 feat(core): import template (#8000) 2024-08-29 04:01:35 +00:00
pengx17
5acf1b5309 feat: init mobile entry (#7905) 2024-08-21 13:17:35 +00:00
EYHN
83716c2fd9 feat(core): share in workspace link (#7897)
ShareDocsService -> ShareDocsListService
ShareService -> ShareInfoService
(*new) ShareReaderService

`/share/:workspaceId/:docId` -> redirect to -> `/workspace/:workspaceId/:docId`

workspace loading process

1. find workspace in workspace list
2. (if not found) revalidate workspace list
3. (if still not found) try load share page
4. (if share page found) => share page
5. (if share page not found) => 404
6. (if workspace found) => workspace page
2024-08-16 09:12:18 +00:00
EYHN
89537e6892 refactor(core): separate editor & doc mode (#7873)
doc.mode -> primaryMode
(*new) editor.mode

New Service:
editor service

Change Mode:

```
const editor = useService(EditorService).editor;
editor.setMode('page')
```

Change primary mode

```
const editor = useService(EditorService).editor;
editor.doc.setPrimaryMode('page')
```
2024-08-14 11:43:03 +00:00
pengx17
6b8f99c013 fix: using width atom for syncing app headers position (#7666)
may use global state to replace these sidebar state atoms

fix AF-1109
2024-07-31 07:03:30 +00:00
pengx17
1efc1d0f5b feat(electron): multi tabs support (#7440)
use https://www.electronjs.org/docs/latest/api/web-contents-view to serve different tab views
added tabs view manager in electron to handle multi-view actions and events.

fix AF-1111
fix AF-999
fix PD-1459
fix AF-964
PD-1458
2024-07-29 11:05:22 +00:00
EYHN
54da85ec62 feat(core): init organize (#7456) 2024-07-26 04:35:32 +00:00
Saul-Mirone
6dbcb62da7 chore: bump blocksuite (#7546)
## Features
- https://github.com/toeverything/BlockSuite/pull/7659 @donteatfriedrice

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7682 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7641 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7685 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7680 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7679 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7676 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7675 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7670 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7672 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7668 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7664 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7665 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7662 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7658 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7654 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7648 @undefined
- https://github.com/toeverything/BlockSuite/pull/7653 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7651 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7647 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7671 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7656 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7643 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7666 @doodlewind
- https://github.com/toeverything/BlockSuite/pull/7645 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7637 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7639 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7636 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7633 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7630 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7629 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7627 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7625 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7623 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7599 @L-Sun
- https://github.com/toeverything/BlockSuite/pull/7621 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7619 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7614 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7613 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7611 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7609 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7594 @fundon
- https://github.com/toeverything/BlockSuite/pull/7593 @fundon

## Refactor
- https://github.com/toeverything/BlockSuite/pull/7634 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7616 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7617 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7603 @Saul-Mirone

## Misc
- https://github.com/toeverything/BlockSuite/pull/7604 @Saul-Mirone

## Features

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7688 @fourdim
- https://github.com/toeverything/BlockSuite/pull/7690 @Saul-Mirone

## Refactor

## Misc
2024-07-19 05:06:26 +00:00
CatsJuice
4f718cffbf feat(core): subscribe changed notification and typeform link (#7522) 2024-07-18 04:20:21 +00:00
EYHN
5dd7382693 refactor(core): workbench (#7355)
Merge the right sidebar logic into the workbench. this can simplify our logic.

Previously we had 3 modules

* workbench
* right-sidebar (Control sidebar open&close)
* multi-tab-sidebar (Control tabs)

Now everything is managed in Workbench.

# Behavioral changes

The sidebar button is always visible and can be opened at any time.
If there is no content to display,  will be `No Selection`

![CleanShot 2024-06-28 at 14.00.41.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/d74b3a60-2299-452e-877e-188186fe5ee5.png)

Elements in the sidebar can now be defined as`unmountOnInactive=false`. Inactive sidebars are marked with `display: none` but not unmount, so the `ChatPanel` can always remain in the DOM and user input will be retained even if the sidebar is closed.
2024-07-12 04:11:05 +00:00
EYHN
40e381e272 refactor(core): new quick search service (#7214) 2024-07-02 09:17:54 +00:00
EYHN
eca484dc28 fix(core): add loading for insert ai template (#7369) 2024-06-28 14:19:59 +08:00
EYHN
595b904d24 fix(core): fix ui flickering on startup (#7349) 2024-06-27 03:33:14 +00:00
EYHN
dcf766f0ee feat(core): impl ai onboarding templates (#7341) 2024-06-26 13:49:23 +00:00
pengx17
1439d00b61 feat: add search doc modal (#7136) 2024-06-06 06:29:36 +00:00
JimmFly
bd9c929d05 feat(core): cmd+f search in doc function (#7040)
You can use the cmd+F shortcut key to trigger the FindInPage function.
2024-05-28 06:19:48 +00:00
EYHN
b356ddbe6e fix(core): fix ui flashing (#7056) 2024-05-27 08:05:20 +00:00
JimmFly
df6d0a2750 fix(core): navigation shortcut keys can't be used when the sidebar is collapsed (#6903)
close #6877
2024-05-13 07:15:40 +00:00
pengx17
3e23878e0f feat: add more tracking events (#6866)
Added most tracking events

what is missing:
- still need a way to track events in blocksuite
- some events may not 100% accurate of the one defined in the PRD
2024-05-13 03:36:32 +00:00
EYHN
06fda3b62c feat(infra): framework 2024-04-17 15:09:09 +08:00
CatsJuice
b93e79c59d feat(core): ai onboarding for edgeless mode (#6556) 2024-04-15 07:25:37 +00:00
CatsJuice
257e946d5d feat(core): add ai onboarding (#6544) 2024-04-15 07:25:31 +00:00
Brooooooklyn
822bbb54a4 chore(core): add more telemetry (#6402) 2024-03-30 07:46:23 +00:00
pengx17
c7e10c2283 feat(core): fav item reordering (#6302) 2024-03-29 04:04:27 +00:00
CatsJuice
b2f34d17a2 feat(core): adjust app sidebar's style (#6162) 2024-03-25 10:25:48 +00:00
EYHN
f2adbdaba4 style: enable import-x/no-duplicates (#6279) 2024-03-25 03:55:33 +00:00
EYHN
7ce2bfbf0b style: no import infra submodule (#6278) 2024-03-25 03:55:29 +00:00
EYHN
2b42a75e5a style: enable rxjs/finnish (#6276)
chore(infra): use finnish notation for observables

do rename
2024-03-24 17:04:51 +00:00
regischen
fddbb426a6 feat: bump blocksuite (#6078) 2024-03-13 17:04:21 +08:00
EYHN
633a5bab53 fix(core): fix cmdk not show current page (#6031) 2024-03-06 06:31:38 +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
regischen
d1e6b23e1a feat: bump blocksuite (#5953) 2024-02-29 14:33:50 +08:00
EYHN
606397e319 feat(core): workbench system (#5837) 2024-02-27 04:14:07 +00:00
EYHN
329fc19852 refactor(infra): migrate to new infra (#5565) 2024-01-30 07:16:39 +00:00
EYHN
5aee480c50 refactor(core): move page list to core (#5556) 2024-01-10 11:09:39 +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
EYHN
e1bd13a018 refactor(core): remove adapter (#5324)
workspace adapter is no longer used.
2023-12-25 03:34:22 +00:00
EYHN
fe2851d3e9 refactor: workspace manager (#5060) 2023-12-15 07:20:50 +00:00
Peng Xiao
883ab46557 fix(core): bg color issues in transparent mode (#5278)
fix the following style issue
![CleanShot 2023-12-13 at 00.06.13@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/46f5e766-e6c9-4965-bab7-6fd6dbb2c651.png)
2023-12-13 07:14:24 +00: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
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
Yifeng Wang
6cbf5b2a92 feat: bump blocksuite (#5194)
Co-authored-by: AyushAgrawal-A2 <ayushagl06@gmail.com>
2023-12-06 18:15:03 +08:00
LongYinan
923844f302 fix: add eqeqeq lint rule (#5106) 2023-11-29 04:43:31 +00:00
EYHN
23e0137ed8 refactor(workspace): blob sync (#5037)
This pr implements a blob engine.
It exposes a single `BlobStorage` to the `blocksuite`, and in it we sync blobs between multiple storages.

The implement still have few issues, but we can merge this pr first and fix them in future.

* BlobEngine currently **do nothing when delete**, because synchronization logic conflicts with deletion logic.
* BlobEngine sync between storages by querying the blob list at regular intervals. This will **cause many queries**, we can avoid this in the future by subscribing to remote changes.
2023-11-23 07:56:19 +00:00
Joooye_34
4c8d54b3a7 refactor(core): use manual upgrade to replace auto migration when web setup (#5022)
1. Split logic in `packages/common/infra/src/blocksuite/index.ts` to multiple single files
2. Move migration logic from setup to upgrade module, to prevent auto migration problems and loading problem
2023-11-23 02:26:06 +00:00