Commit Graph
100 Commits
Author SHA1 Message Date
EYHN 702c03539f fix(core): fix member list fallback size (#8133) 2024-09-06 02:38:30 +00:00
EYHN 52cd6102cb fix: fix download fonts script (#8125) 2024-09-06 00:37:57 +08:00
EYHN 74cd175d37 feat(core): invoice service (#8124) 2024-09-05 23:56:58 +08:00
EYHN f4db4058f8 feat(core): make permission and invoice offline available (#8123) 2024-09-05 15:11:27 +00:00
EYHN 691bfed185 feat(core): selector for editorSetting hooks (#8108) 2024-09-05 08:44:11 +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
EYHN 01b2339173 refactor(core): better block link (#8082) 2024-09-04 08:13:22 +00:00
EYHN 2799e8cd43 fix(electron): fix ci (#8085) 2024-09-04 08:00:09 +00:00
EYHN fb64bc7e55 feat(core): indexer upgrade (#8062) 2024-09-04 07:31:03 +00:00
EYHN 51f3566bec fix(core): fix menu bugs (#8074) 2024-09-04 07:19:09 +00:00
EYHN a6484018ef refactor(core): refactor editor query string selector (#8058)
The editor selector is the information for locating a block, which can automatically focus on a certain content when a user opens a document.

```
export type EditorSelector = {
  blockIds?: string[];
  elementIds?: string[];
};
```

The selector can be set from multiple places, such as passing it in the center peek parameter, or passing it in the query part of the URL.

This pr decoupled the selector from the query string and now available at `editorService.editor.selector$`
2024-09-03 06:37:58 +00:00
EYHN 02f0d7aa08 feat(component): dropdown menu auto avoid collisions (#8013)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">CleanShot 2024-08-29 at 14.49.58.mp4</video>
2024-09-03 02:12:16 +00:00
EYHN b96ad57568 feat(core): import template (#8000) 2024-08-29 04:01:35 +00:00
EYHN 3e810eb043 fix(core): no share page in desktop (#7983) 2024-08-27 12:37:30 +00:00
EYHN 9ea4aaaf37 refactor(infra): remove setimmediate (#7975) 2024-08-26 11:57:24 +00:00
EYHN bc86f0a672 feat(core): editor setting service (#7956)
define editor setting schema in `packages/frontend/core/src/modules/editor-settting/schema.ts`

e.g.

```ts
const BSEditorSettingSchema = z.object({
  connector: z.object({
    stroke: z
      .union([
        z.string(),
        z.object({
          dark: z.string(),
          light: z.string(),
        }),
      ])
      .default('#000000'), // default is necessary
  }),
});
```

schema can be defined in a nested way. EditorSetting api is in flat way:

editorSetting api:

```ts
editorSetting.settings$ === {
  'connector.stroke': '#000000'
}
editorSetting.set('connector.stroke', '#000')
```

and use `expandFlattenObject` function can restore the flattened structure to a nested structure. nested structure is required by blocksuite

```ts
editorSetting.settings$.map(expandFlattenObject) === {
  connector: {
    stroke: '#000000'
  }
}
```
2024-08-26 08:19:24 +00:00
EYHN 4bc4a58a30 feat(infra): add convenience api to get workspace from doc (#7934) 2024-08-22 11:22:04 +00:00
EYHN 3db95bafa2 feat(core): use new print pdf api (#7932) 2024-08-21 10:06:22 +00:00
EYHN cfe0677b84 refactor(core): adapt to new sync api (#7929) 2024-08-21 05:30:34 +00:00
EYHN cfac3ebf1f feat(core): workbench open doc in mode (#7906) 2024-08-19 02:37:33 +00:00
EYHN c822594882 feat(core): mode in query string (#7904) 2024-08-16 10:59:43 +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
EYHN 50948318e0 feat(core): use emoji as folder icon (#7842)
![CleanShot 2024-08-12 at 22.33.42.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/c0c1a196-be29-4e45-a28d-87a55d80fc9d.png)
2024-08-14 10:35:22 +00:00
EYHN 0504d0b0ff feat(core): init feature flag service (#7856) 2024-08-14 10:35:21 +00:00
EYHN 1db6b9fe3b refactor(infra): remove setimmediate (#7821) 2024-08-13 14:25:33 +08:00
EYHN a579cc7716 fix(core): better search result (#7819) 2024-08-09 10:37:27 +00:00
EYHN b993ab04df fix(core): some doc missing in search result (#7818) 2024-08-09 10:37:24 +00:00
EYHN d2b0ee40a8 fix(core): disable blocksuite indexer (#7813) 2024-08-09 08:24:44 +00:00
EYHN 3ad5170b71 fix(core): hidden open in split view in browser (#7811) 2024-08-09 07:50:07 +00:00
EYHN 4beedaa22c fix(core): delete from folder not work (#7806) 2024-08-09 06:49:20 +00:00
EYHN b2c00a2618 fix(core): typo in migration text (#7804) 2024-08-09 05:23:52 +00:00
EYHN c006f3f0af fix(core): reduce indexer performance impact (#7803) 2024-08-09 11:57:06 +08:00
EYHN 7efc87b6d3 chore(core): adjust migration text (#7802) 2024-08-09 11:50:52 +08:00
EYHN ffc12176c9 fix(electron): fix electron global state sync (#7793) 2024-08-08 12:02:10 +00:00
EYHN fd6e198295 chore: bump blocksuite (#7788) 2024-08-08 09:27:44 +00:00
EYHN 6ef5675be1 feat(core): better search result (#7787) 2024-08-08 08:56:55 +00:00
EYHN c7aabd3a8d feat(core): highlight doc title in search result (#7786) 2024-08-08 08:56:51 +00:00
EYHN 83244f0201 fix(core): trash doc in search result (#7785) 2024-08-08 08:17:48 +00:00
EYHN d968cfe425 fix(infra): better search result (#7774) 2024-08-07 09:16:43 +00:00
EYHN aee24ffb31 fix(core): migration favorite appear again (#7768) 2024-08-07 03:31:06 +00:00
EYHN 96fed60655 chore: bump blocksuite (#7751)
## Features
- https://github.com/toeverything/BlockSuite/pull/7850 @donteatfriedrice
- https://github.com/toeverything/BlockSuite/pull/7848 @L-Sun

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7853 @doouding
- https://github.com/toeverything/BlockSuite/pull/7838 @fundon
- https://github.com/toeverything/BlockSuite/pull/7851 @donteatfriedrice

## Refactor

## Misc
2024-08-07 02:52:44 +00:00
EYHN dd74cfea14 chore(core): remove old favorite (#7743)
closes AF-1203
2024-08-07 02:19:53 +00:00
EYHN 873e6faef2 chore: bump @blocksuite/icons (#7749) 2024-08-06 05:32:19 +00:00
EYHN cd4e462d8c fix(core): transform workspace db when enable cloud (#7744) 2024-08-05 15:17:19 +00:00
EYHN e6e9f7d4c7 feat(core): enable feature flag for release (#7738) 2024-08-05 09:53:11 +00:00
EYHN f108b95704 feat(core): tuning for better search (#7713) 2024-08-05 02:29:50 +00:00
EYHN ad26102815 fix(core): fix scroll block into view (#7712) 2024-08-05 02:29:49 +00:00
EYHN 05448f50af fix(core): wrong display of 404 page (#7711) 2024-08-02 10:40:58 +00:00
EYHN e54be7dc02 feat(core): loading ui for favorite and organize (#7700) 2024-08-02 07:17:01 +00:00
EYHN 553fbed60f feat(core): add globalcontext info to mixpanel track (#7681) 2024-08-01 09:29:31 +00:00
EYHN bb767a6cdc fix(component): modal overlap issue (#7691) 2024-08-01 08:03:21 +00:00
EYHN b343f975fb feat(core): add track events for sidebar (#7659) 2024-07-30 13:22:22 +00:00
EYHN ab92efcfc0 feat(core): improve mixpanel (#7652)
move @affine/core/utils/mixpanel -> @affine/core/mixpanel

now you can debug mixpanel on browser devtool

![CleanShot 2024-07-30 at 17.32.48@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/083c1286-39fd-4569-b4d2-e6e84cf2e797.png)
2024-07-30 13:22:17 +00:00
EYHN 482b5da02f fix(core): fix layout overflow (#7647) 2024-07-30 07:03:07 +00:00
EYHN 1b4d65fd64 fix(core): optimize sidebar tag performance (#7633) 2024-07-29 09:57:40 +00:00
EYHN a0cbf05da8 fix(core): sidebar renaming bug (#7632) 2024-07-29 09:57:37 +00:00
EYHN 0472ffe569 feat(core): support sidebar collapse (#7630) 2024-07-29 09:57:33 +00:00
EYHN e6f0847ec3 fix(core): make indexer faster (#7629) 2024-07-29 06:43:13 +00:00
EYHN 6bc5337307 refactor(core): adjust modal animation (#7606)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/g3jz87HxbjOJpXV3FPT7/529d6c3f-4b23-43ac-84cc-171713d3dc72.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/g3jz87HxbjOJpXV3FPT7/529d6c3f-4b23-43ac-84cc-171713d3dc72.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/529d6c3f-4b23-43ac-84cc-171713d3dc72.mp4">CleanShot 2024-07-25 at 20.04.01.mp4</video>

When a modal is closed, sometimes its components are completely unmounted from the component tree, making it difficult to animate. This pr defining a custom element as the container of ReactDOM.portal, rewriting the `removeChild` function, and use `startViewTransition` when ReactDOM calls it to implement the animation.

# Save Input

Some inputs use blur event to save data, but when they are unmounted, blur event will not be triggered at all. This pr changes blur event to native addEventListener, which will be called after the DOM element is unmounted, so as to save data in time.
2024-07-26 08:39:34 +00:00
EYHN 3eb09cde5e feat(core): new favorite (#7590) 2024-07-26 08:15:32 +00:00
EYHN 54da85ec62 feat(core): init organize (#7456) 2024-07-26 04:35:32 +00:00
EYHN 549e7befed fix(core): stuck when quick switch doc mode (#7599) 2024-07-25 12:21:21 +00:00
EYHN 98281a6394 refactor(component): adjust confirm modal api (#7589) 2024-07-24 08:18:33 +00:00
EYHN 6ca7c41861 fix(component): button icon color (#7588) 2024-07-24 08:03:02 +00:00
EYHN 9fe77baf05 feat(infra): better orm (#7502) 2024-07-18 10:14:12 +00:00
EYHN 063c206289 chore: bump blocksuite (#7489) 2024-07-15 07:58:26 +00:00
EYHN 7103b2e594 feat(component): new dnd api (#7467) 2024-07-15 04:00:42 +00:00
EYHN dca88e24fe feat(electron): shared storage (#7492) 2024-07-15 03:21:08 +00:00
EYHN 0f1409756e refactor(infra): memento use undefined (#7491) 2024-07-15 02:48:20 +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 c2f93f9512 fix(infra): failed to get status when database not ready (#7470) 2024-07-11 06:40:35 +00:00
EYHN aab9925aa1 feat(core): adjust search strategy (#7447) 2024-07-09 04:27:34 +00:00
EYHN c62d79ab14 feat(core): run indexer in worker (#7295) 2024-07-02 09:18:08 +00:00
EYHN 27d0fc5108 refactor(core): use new backlink indexer (#7296) 2024-07-02 09:18:01 +00:00
EYHN 40e381e272 refactor(core): new quick search service (#7214) 2024-07-02 09:17:54 +00:00
EYHN 15e99c7819 feat(core): docs search service (#7213) 2024-07-02 09:17:47 +00:00
EYHN 3870801ebb feat(infra): job system (#7212) 2024-07-02 09:17:40 +00:00
EYHN 90e4a9b181 feat: doc search infra (#7166)
detail in `packages/common/infra/src/sync/indexer/README.md`
2024-07-02 08:52:33 +00:00
EYHN 3f8fe5cfae fix(infra): override saved blocksuite feature flag (#7399) 2024-07-01 11:36:32 +00:00
EYHN 3bbb657a78 feat(core): replace ai template (#7396) 2024-07-01 10:24:54 +00:00
EYHN 39acb51d87 feat(core): adjust orm api (#7392)
Removed the `connect` and `disconnect` functions on the orm `DBAdapter`, making the ORM completely non-asynchronous.
2024-07-01 09:32:15 +00:00
EYHN 824be0d4c1 fix(core): fix viewtransition and css property missing (#7377) 2024-06-28 18:03:43 +08:00
EYHN eca484dc28 fix(core): add loading for insert ai template (#7369) 2024-06-28 14:19:59 +08:00
EYHN c6c4ed9711 fix(infra): recover deleted item in orm (#7359) 2024-06-27 17:58:47 +08:00
EYHN 3b3b7ec054 chore: bump blocksuite (#7360) 2024-06-27 17:53:42 +08:00
EYHN 33bb2b5fcd feat(infra): use yjs mergeupdate for performance (#7343) 2024-06-27 08:14:17 +00:00
EYHN e892d55134 test: add test for undo empty page (#7348) 2024-06-27 06:18:16 +00:00
EYHN a7ea74923a fix(templates): use url safe base64 in templates (#7354) 2024-06-27 03:44:14 +00: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
EYHN 092c639b0a fix(core): optimize performance when editing doc title (#7328) 2024-06-26 07:37:26 +00:00
EYHN ad746b6376 fix(core): fix error overflow (#7335) 2024-06-26 07:25:29 +00:00
EYHN 2d74e4c340 fix(core): fix the page loading style (#7336) 2024-06-26 06:20:20 +00:00
EYHN a93364af01 fix(templates): update stickers (#7320) 2024-06-25 03:46:24 +00:00
EYHN 820ecba7cc fix(core): skip flaky test (#7319) 2024-06-25 03:34:15 +00:00
EYHN 6865a52172 chore: bump blocksuite (#7300)
## Features

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7392 @doouding
- https://github.com/toeverything/BlockSuite/pull/7391 @Flrande
- https://github.com/toeverything/BlockSuite/pull/7387 @zzj3720

## Refactor

## Misc
2024-06-21 09:05:46 +00:00
EYHN b4212d54ed chore(core): delete center peek feature flag (#7281) 2024-06-20 04:24:47 +00:00
EYHN ab3d6c9cc8 fix(infra): update load test result empty (#7282) 2024-06-20 12:24:12 +08:00