Commit Graph
100 Commits
Author SHA1 Message Date
EYHN 6ecdc8db7a feat(infra): opti indexer performance (#8557) 2024-10-22 06:41:07 +00:00
EYHN b8cb504fa4 feat(core): adjust app sidebar (#8572) 2024-10-22 04:55:05 +00:00
EYHN 6a9a7d8b39 fix(core): fix mobile edition flag (#8571) 2024-10-22 04:29:07 +00:00
EYHN 7cd4028176 feat(core): adjust doc property style (#8561) 2024-10-21 09:41:45 +00:00
EYHN 42b3e069f9 feat(core): use contain strict optimizing performance (#8553) 2024-10-21 06:42:08 +00:00
EYHN db374f7feb feat(core): build config for ios android (#8555) 2024-10-21 05:39:04 +00:00
EYHN 01c3a3b4c0 feat(infra): collect more data to indexer (#8528) 2024-10-19 20:22:26 +08:00
EYHN ee641f0377 fix(infra): fix built in property order error (#8524) 2024-10-17 05:15:09 +00:00
EYHN 140ac723e6 refactor(core): adapter to new journal and property (#8508)
remove old WorkspacePropertyAdapter
add JournalService
2024-10-16 08:46:38 +00:00
EYHN e7dcf63c77 refactor(core): rename doc property component name (#8500) 2024-10-16 02:11:46 +00:00
EYHN 24e0c5797c refactor(core): doc property (#8465)
doc property upgraded to use orm.

The visibility of the property are simplified to three types: `always show`, `always hide`, `hide when empty`, and the default is `always show`.

![CleanShot 2024-10-14 at 15 34 52](https://github.com/user-attachments/assets/748b8b80-061f-4d6a-8579-52e59df717c2)

Added a sidebar view to manage properties
![CleanShot 2024-10-14 at 15 35 58](https://github.com/user-attachments/assets/bffa9b1a-a1a5-4708-b2e8-4963120f3af9)

new property ui in workspace settings
![CleanShot 2024-10-14 at 15 36 44](https://github.com/user-attachments/assets/572d8dcc-9b3d-462a-9bcc-5f5fa8e622da)

Property lists can be collapsed
![CleanShot 2024-10-14 at 15 37 59](https://github.com/user-attachments/assets/2b20be1a-8141-478a-8fe7-405aff6d04fd)
2024-10-15 10:17:12 +00:00
EYHN bfeb05ca45 fix(core): data loss on enable cloud (#8452) 2024-10-08 09:24:26 +00:00
EYHN 67f7a4de9c fix(electron): fix windows userspace loss (#8450) 2024-10-08 07:05:37 +00:00
EYHN c26df2e069 feat(infra): doc properties by orm (#8382)
create new orm table docConfiguration

move primary store to docConfiguration
2024-10-07 12:25:47 +00:00
EYHN 4295f5e7c1 fix(core): open page info modal error (#8396) 2024-09-26 06:36:41 +00:00
EYHN 73876f60fc feat(core): adjust offline mode description (#8365) 2024-09-24 05:58:15 +00:00
EYHN 096f50b83b chore(i18n): cleanup i18n file (#8318) 2024-09-20 06:25:17 +00:00
EYHN 7184d8348f fix(core): fix web login (#8312) 2024-09-19 16:24:05 +00:00
EYHN 5d57f53a06 fix(core): adjust feature flag (#8309) 2024-09-19 15:26:33 +08:00
EYHN 9a01da76e1 feat: sync i18n with crowdin (#8293) 2024-09-19 05:30:18 +00:00
EYHN fab23d226d refactor(core): clear build config (#8268)
remove build config

allowLocalWorkspace -> FeatureFlag
enablePreloading -> removed
enableNewSettingUnstableApi -> removed
enableExperimentalFeature -> removed
enableThemeEditor -> FeatureFlag

remove some unused code
2024-09-18 06:33:25 +00:00
EYHN 714b7b863e fix(electron): fix electron script path (#8278) 2024-09-18 12:14:56 +08:00
EYHN e9fce6f58a fix(electron): fix electron windows build path (#8272) 2024-09-18 11:06:56 +08:00
EYHN ed63602f01 refactor: remove unused deps (#8259)
auto removed by https://knip.dev/features/auto-fix
2024-09-14 14:52:50 +00:00
EYHN 3d80725c1a refactor(core): move mobile components to core (#8258) 2024-09-14 05:51:14 +00:00
EYHN 5e56ec65e3 refactor(core): adjust core struct (#8218)
packages/frontend/core/src

hooks -> components/hooks
atoms -> components/atoms
layouts -> components/layouts
providers -> components/providers
mixpanel -> @affine/track
~~shared~~
~~unexpected-application-state~~
2024-09-13 11:31:21 +00:00
EYHN 58db654b07 fix(core): share mode page reference (#8238) 2024-09-13 11:06:19 +00:00
EYHN 6fde967a6d feat(core): remove loop animations (#8242) 2024-09-13 09:54:24 +00:00
EYHN 561f96bb71 feat(core): load ydoc on demand (#8241) 2024-09-13 07:45:49 +00:00
EYHN cc5a6e6d40 refactor: new project struct (#8199)
packages/frontend/web -> packages/frontend/apps/web
packages/frontend/mobile -> packages/frontend/apps/mobile
packages/frontend/electron -> packages/frontend/apps/electron
2024-09-12 07:42:57 +00:00
EYHN 3999b04cf1 feat(core): download template from snapshot url (#8211) 2024-09-12 06:21:52 +00:00
EYHN 85aa73bcf6 fix(core): disconnect ws when user logout (#8188) 2024-09-11 07:55:42 +00:00
EYHN d93c3b3719 feat(core): user data db (#7930) 2024-09-11 07:55:37 +00:00
EYHN 498a69af53 feat(core): move enable ai to feature flag (#8195) 2024-09-11 07:42:07 +00:00
EYHN 8c191e6baa feat(core): preview template & snapshot import (#8193) 2024-09-11 07:11:33 +00:00
EYHN f009371e06 fix(core): fix menu shaking (#8187) 2024-09-11 03:42:13 +00:00
EYHN 0cdc486f1f fix(core): reduce state refresh (#8181) 2024-09-10 06:21:15 +00:00
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