Commit Graph

4667 Commits

Author SHA1 Message Date
DarkSky 4ae8c2f4ef fix(server): team quota await (#9352) 2024-12-26 12:08:49 +00:00
darkskygit 5d27a13e2c feat(server): distinguash workspace quota calc (#9338)
fix AF-2021
2024-12-26 11:33:31 +00:00
CatsJuice 690a79b905 chore(electron): disable onboarding (#9332)
close AF-2020
2024-12-26 11:21:15 +00:00
liuyi 00980077c4 chore: standardize package references (#9346) 2024-12-26 19:08:42 +08:00
darkskygit 6d5733fca9 fix: ios client gql compatibility (#9337) 2024-12-26 10:40:12 +00:00
Saul-Mirone 6afa1d542f feat(editor): add edgeless crud extension (#9335) 2024-12-26 08:58:06 +00:00
fundon 1afdb68143 fix(core): disable re-rendering of pdf embed view (#9334) 2024-12-26 08:08:11 +00:00
doodlewind 71b5cddea1 fix(editor): use nullable inline editor root element (#9320)
Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
2024-12-26 07:55:15 +00:00
donteatfriedrice cadb9211a6 refactor(editor): extensionalize plain text adapter (#9330) 2024-12-26 07:27:08 +00:00
zzj3720 45acdbda04 feat(core): disable the back gesture when the menu is open (#9263)
close: BS-2174
2024-12-26 07:12:09 +00:00
fundon 96fae47744 feat(core): add pdf embed preview feature flag (#9307) 2024-12-26 06:57:31 +00:00
liuyi 7ae7c17677 fix(core): more space under page property list (#9269) 2024-12-26 14:56:43 +08:00
JimmFly cf17303158 chore: remove AIOnboardingGeneral (#9326) 2024-12-26 06:26:10 +00:00
fundon 42ab507d30 feat(core): pdf viewer supports fit to page (#8812)
### What's Changed

* fits to page by default
* supports rendering pages of different sizes

https://github.com/user-attachments/assets/bf34e6d1-5546-4af1-a131-b801a67e9ace
2024-12-26 05:28:18 +00:00
fundon bb43e4b664 feat(core): pdf embed view component (#8671)
Closes: [AF-1445](https://linear.app/affine-design/issue/AF-1445/添加-pdf-embed-view-component)
Upstreams: https://github.com/toeverything/blocksuite/pull/8658, https://github.com/toeverything/blocksuite/pull/8752

### What's Changed

* uses `IntersectionObserver` to determine lazy loading
* adds `PDFViewerEmbedded` component
* automatically shut down workers when out of view

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/4181bec6-83fd-42f1-bfea-87276e0bd9e6.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/4181bec6-83fd-42f1-bfea-87276e0bd9e6.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/4181bec6-83fd-42f1-bfea-87276e0bd9e6.mov">Screen Recording 2024-11-15 at 08.14.34.mov</video>
2024-12-26 05:28:17 +00:00
fundon 3064f21454 refactor(component): lit portal (#9303)
* removes `listeners`
* adds `notify` property into `LitReactPortal`
* adds `rerendering` argument  to element factory

Related to https://github.com/toeverything/AFFiNE/pull/9295#discussion_r1897043399
2024-12-26 03:08:04 +00:00
pengx17 70d9cc6b01 fix(electron): electron crash on leave fullscreen (#9314) 2024-12-26 01:55:07 +00:00
pengx17 40b90ef51b feat(core): at menu loading state (#9284)
fix AF-2017
2024-12-25 16:13:04 +00:00
Brooooooklyn 80f4af681a fix(server): data-migration script (#9306) 2024-12-25 13:43:48 +00:00
renovate 995978a632 chore: bump up react-error-boundary version to v5 (#9238)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-error-boundary](https://redirect.github.com/bvaughn/react-error-boundary) | [`^4.1.2` -> `^5.0.0`](https://renovatebot.com/diffs/npm/react-error-boundary/4.1.2/5.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-error-boundary/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-error-boundary/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-error-boundary/4.1.2/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-error-boundary/4.1.2/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>bvaughn/react-error-boundary (react-error-boundary)</summary>

### [`v5.0.0`](https://redirect.github.com/bvaughn/react-error-boundary/compare/4.1.2...3ed17cc9244244c0db7a914c93d573167d0a9fb3)

[Compare Source](https://redirect.github.com/bvaughn/react-error-boundary/compare/4.1.2...5.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-12-25 10:42:28 +00:00
Saul-Mirone 7c84545647 refactor(editor): cleanup dead code (#9300) 2024-12-25 07:48:00 +00:00
CatsJuice 0acdf62043 refactor(ios): disable navigation gesture with js (#9287)
Do not toggle navigation gesture native to avoid unexpected behavior. close AF-1958, AF-1797
2024-12-25 04:27:51 +00:00
CatsJuice a29519a9fc fix(mobile): workspace selector in app-fallback may crash (#9293) 2024-12-25 01:59:16 +00:00
CatsJuice 727f21d78f fix(core): make all docs journal judgement reactive (#9290) 2024-12-25 01:41:16 +00:00
akumatus 7bd980991e fix(core): chat input will be sent repeatedly in two documents with split view (#9289)
Fix issue [AF-2011](https://linear.app/affine-design/issue/AF-2011).

Add `host` strict equality check before ai request send.
2024-12-24 11:17:42 +00:00
akumatus 6c0544b239 fix(core): ai chat panel content will be inconsistent when switching to journals (#9288)
Fix issue [BS-2153](https://linear.app/affine-design/issue/BS-2153).

Optimize DOM reuse by explicitly providing an identifier (similar to React's key).
2024-12-24 10:48:16 +00:00
EYHN 3cf4bcf651 feat(ios): add intelligents button (#9281)
Co-authored-by: 砍砍 <git@qaq.wiki>
2024-12-24 07:51:11 +00:00
forehalo fbe3e08769 chore(i18n): codegen 2024-12-24 15:34:07 +08:00
liuyi 2443935830 chore: add monorepo tools (#9196) 2024-12-24 15:29:48 +08:00
liuyi e3a8b63e38 fix(core): list style issue in selection mode (#9275) 2024-12-24 15:19:34 +08:00
JimmFly 29c427be1d chore: adjust i18n (#9270) 2024-12-24 15:19:19 +08:00
donteatfriedrice 338835a4aa fix(editor): limit max width when uploading or pasting image into edgeless (#9273)
[BS-2180](https://linear.app/affine-design/issue/BS-2180/白板中粘贴图片,限定一下最大宽度)
2024-12-24 06:28:59 +00:00
doodlewind 98f88d2615 chore: base url for mobile debug (#9268)
Without this PR, the login requests on mobile devices will be sent to `localhost:8080`, which is incorrect.
2024-12-24 03:54:56 +00:00
CatsJuice 209c0889f8 fix(mobile): reset active-tab to home on ios/android when launched (#9245) 2024-12-24 03:39:56 +00:00
CatsJuice 3a8d90d861 feat(mobile): use native select for mobile setting (#9236)
![CleanShot 2024-12-21 at 12.01.32.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/8f29afcc-3541-4081-9f8f-f74e3ba08c4d.gif)
2024-12-24 03:24:51 +00:00
pengx17 17c2293986 feat(core): open in app for self-hosted (#9231)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">20241222-1456-24.5006677.mp4</video>

fix AF-1815
2024-12-24 03:04:02 +00:00
pengx17 74a168222c fix(core): disable page header title from dragging when editing (#9258)
fix AF-2014
2024-12-23 13:27:00 +00:00
Saul-Mirone 989e318c57 chore: adjust tsconfig for blocksuite (#9259)
change `moduleResolution` to `bundler`
2024-12-23 13:10:55 +00:00
CatsJuice 2793080a57 fix(core): toggle page mode when split view opened (#9221)
close AF-2007
2024-12-23 12:55:29 +00:00
pengx17 8b076cb2a7 chore(core): edit property meta events (#9253)
fix AF-1986
2024-12-23 11:36:24 +00:00
darkskygit aacdb71ee2 feat(server): role changed email (#9227) 2024-12-23 10:13:04 +00:00
L-Sun 067469aa98 fix(component): prevent auto focus in mobile modal (#9247)
Continue [BS-2169](https://linear.app/affine-design/issue/BS-2169/新的-menu-不支持移动端)
2024-12-23 09:56:58 +00:00
donteatfriedrice 54cb161309 feat(core): export doc with adapter extension (#9226) 2024-12-23 09:24:55 +00:00
JimmFly c793f2307b fix(core): quotaCheck dialog should not appear in team workspace (#9223)
![CleanShot 2024-12-20 at 16 37 17@2x](https://github.com/user-attachments/assets/3bd1107f-cbc8-4415-85ba-e30cf6712f5e)
2024-12-23 08:52:04 +00:00
CatsJuice 5716fbf0ed chore: remove unnecessary log (#9251) 2024-12-23 07:22:58 +00:00
CatsJuice 9fb5e0db63 perf(core): optimize scrolling performance for doc list (#9250)
- before
  ![CleanShot 2024-12-23 at 14.45.47.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/3e62773f-00f8-4464-a342-c3cd5c5b6edb.gif)
- after
  ![CleanShot 2024-12-23 at 14.46.22.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/d713ea5e-ba2d-4251-b93a-a1d0ececc7eb.gif)
2024-12-23 07:07:57 +00:00
EYHN 129f94ee78 refactor(core): move infra modules to core (#9207) 2024-12-23 04:54:00 +00:00
pengx17 2ea79d25ad chore(core): events for backlinks (#9228)
fix AF-2008
2024-12-23 04:37:59 +00:00
pengx17 c775b2e264 fix(core): text-renderer should be readonly (#9244)
fix AF-2010, AF-2009
2024-12-23 04:19:06 +00:00
renovate 97e448fc57 chore: bump up html-validate version to v9 (#9242)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [html-validate](https://html-validate.org) ([source](https://gitlab.com/html-validate/html-validate)) | [`^8.27.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/html-validate/8.29.0/9.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/html-validate/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/html-validate/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/html-validate/8.29.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/html-validate/8.29.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>html-validate/html-validate (html-validate)</summary>

### [`v9.0.0`](https://gitlab.com/html-validate/html-validate/blob/HEAD/CHANGELOG.md#900-2024-12-23)

[Compare Source](https://gitlab.com/html-validate/html-validate/compare/v8.29.0...v9.0.0)

##### ⚠ BREAKING CHANGES

-   **meta:** The deprecated metadata property expressions have been removed
    and can be replaced with callback functions. This gives greater control for the
    metadata author, provides better IDE support and is more reusable when querying
    the metadata directly.

-   **api:** `Config.merge(..)` will return a `Promise` when used with an
    async loader or resolver.

-   **config:** This change affects all users. The following deprecated
    configuration presets has been removed:

    -   `htmlvalidate:recommended`
    -   `htmlvalidate:document`
    -   `html-validate:a17y`

-   **cli:** CLI uses ESM (with `esmResolver`). For most part this shouldn't
    affect anything but in some cases you might need slight configuration
    migration. See Migration Guide for details.

refactor(cli): use ESM in CLI

-   **deps:** Requires NodeJS v18 or later.
-   **api:** The deprecated `tag:open` and `tag:close` events has been
    removed, use `tag:begin` and `tag:end` instead.
-   **api:** The `Config.resolve()` method can return a `Promise` if any
    underlying loader or resolver has returned a `Promise`.

It is recommended to assume it returns a `Promise` and always `await` the
result:

```diff
-const resolved = config.resolve();
+const resolved = await config.resolve();
```

If you need synchronous code ensure the configuration, the loader and the
resolver all returns synchronous results, e.g. the `staticResolver` with
synchronous code.

-   **api:** The `HtmlValidate.getConfigurationSchema()` method is now async
    and returns a `Promise`. If you use this method you need to await the result:

```diff
-const schema = htmlvalidate.getConfigurationSchema();
+const schema = await htmlvalidate.getConfigurationSchema();
```

-   **api:** If you are writing your own transformers they may now
    optionally return a `Promise`. If you are using `test-utils` to write unit tests
    you must now resolve the promise.

```diff
 import { transformSource } from "html-validate/test-utils";

-const result = transformSource(transformer, source);
+const result = await transformSource(transformer, source);
```

This is no matter if your transformer is actually async or not.

-   **api:** The `CLI.isIgnored(..)` method has been removed from the public
    API. There is no replacement. If you need this method open an issue describing
    the use-case.
-   **api:** If you are using the `CLI` class most methods are now async and
    returns `Promise`. There is no synchronous version of these API calls.
-   **api:** `Config.fromFile(..)` and `Config.fromObject(..)` will return a
    Promise when used with an async loader or resolver.
-   **api:** `ConfigLoader` methods can optionally return a `Promise` for
    async operation. For most use-cases this will not require any changes.
-   **api:** The `ConfigLoader.globalConfig` property has been replaced with
    `ConfigLoader.getGlobalConfig()` (async) and
    `ConfigLoader.getGlobalConfigSync()` (sync).
-   **api:** The redundant and deprecated `Config.init()` method has been
    removed.

Remove any calls to the method:

```diff
 const config = Config.fromObject({ /* ... */ });
-config.init();
```

##### Features

-   **api:** `CLI.isIgnored()` made private ([9e3679a](https://gitlab.com/html-validate/html-validate/commit/9e3679a13a701cbb108ea64ff187ee235124cd21))
-   **api:** `CLI` methods async and return Promise ([677c73e](https://gitlab.com/html-validate/html-validate/commit/677c73e51a78b12731837e24a6f6fb33859b5889))
-   **api:** `Config.fromFile` and `Config.fromObject` can return `Promise` ([b126361](https://gitlab.com/html-validate/html-validate/commit/b1263617015a54550a13ba6d09c23c82c8c87f10))
-   **api:** `Config.merge(..)` can return `Promise` ([cccb313](https://gitlab.com/html-validate/html-validate/commit/cccb313c67ea342a59d7c9887fef8163e9463808))
-   **api:** `Config.resolve()` can return `Promise` ([09159f3](https://gitlab.com/html-validate/html-validate/commit/09159f39c579ac97021533c26d0b3def7959ef00))
-   **api:** `ConfigLoader`s can optionally return `Promise` for async operation ([6041581](https://gitlab.com/html-validate/html-validate/commit/6041581eb879f68d6ad8bf45b2f216af994cac7d))
-   **api:** `FileSystemConfigLoader` uses `esmResolver` by default ([dd4cfb1](https://gitlab.com/html-validate/html-validate/commit/dd4cfb1e1b00c892ca8ad8127cd2589ed5d6a110))
-   **api:** `HtmlValidate.getConfigurationSchema()` returns promise ([f10ec1a](https://gitlab.com/html-validate/html-validate/commit/f10ec1a650700778dc52f288f0f7b3e2c6ba4873))
-   **api:** allow transformers to return single source ([fd126da](https://gitlab.com/html-validate/html-validate/commit/fd126dab3f69db38407736ea0b885710e98466ad))
-   **api:** new `esmResolver` using `import(..)` (available for both nodejs and browser) ([81b4777](https://gitlab.com/html-validate/html-validate/commit/81b47770836e6e44bc917ca739a796e31dd7c1f6)), closes [#&#8203;230](https://gitlab.com/html-validate/html-validate/issues/230)
-   **api:** remove deprecated `Config.init()` ([0bd8ab7](https://gitlab.com/html-validate/html-validate/commit/0bd8ab787a57c72698eb3e250973e26c1a99da89))
-   **api:** remove deprecated `tag:open` and `tag:close` events ([88ac65e](https://gitlab.com/html-validate/html-validate/commit/88ac65ee6bc281023153caa81785ea6158631e00))
-   **api:** replace `ConfigLoader.globalConfig` with `ConfigLoader.getGlobalConfig()` ([a64935a](https://gitlab.com/html-validate/html-validate/commit/a64935af918d79fb8f485e1ceb228db6f762ccf7))
-   **api:** resolvers may optionally return `Promise` for async operation ([fe3c6a6](https://gitlab.com/html-validate/html-validate/commit/fe3c6a63624f7e4eb0641adf881ba1bc130eb3c6))
-   **api:** transformers may optionally return `Promise` for async operation ([823da19](https://gitlab.com/html-validate/html-validate/commit/823da1998e5a6eb3956bb4bd0fa7821bfcd81caf))
-   **cli:** cli uses esm (with `esmResolver`) ([3e4759e](https://gitlab.com/html-validate/html-validate/commit/3e4759e4a3c259157f331ddee72c3338df80e365))
-   **config:** remove deprecated configuration presets ([dbf5cf4](https://gitlab.com/html-validate/html-validate/commit/dbf5cf405b2970840e3df4fc21af40fa34d797ea))
-   **config:** support `.htmlvalidate.mjs` configuration files ([0ffd9b5](https://gitlab.com/html-validate/html-validate/commit/0ffd9b5f0ee9f6de757dadf1a11099dcf6952b06)), closes [#&#8203;125](https://gitlab.com/html-validate/html-validate/issues/125)
-   **deps:** require node 18 or later ([d4f3bcb](https://gitlab.com/html-validate/html-validate/commit/d4f3bcb0a6b21d56a063afeea9942a2aa342466c))
-   **meta:** remove deprecated property expressions ([a77043c](https://gitlab.com/html-validate/html-validate/commit/a77043cff36220e598796c4b640a31e81d14a6ae))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-12-23 04:02:52 +00:00