Commit Graph

42 Commits

Author SHA1 Message Date
Saul-Mirone
fd6d96a38e refactor(editor): use transformer from store when possible (#10453) 2025-02-26 14:15:04 +00:00
Saul-Mirone
ce87dcf58e feat(editor): schema extension (#10447)
1. **Major Architectural Change: Schema Management**
   - Moved from `workspace.schema` to `store.schema` throughout the codebase
   - Removed schema property from Workspace and Doc interfaces
   - Added `BlockSchemaExtension` pattern across multiple block types

2. **Block Schema Extensions Added**
   - Added new `BlockSchemaExtension` to numerous block types including:
     - DataView, Surface, Attachment, Bookmark, Code
     - Database, Divider, EdgelessText, Embed blocks (Figma, Github, HTML, etc.)
     - Frame, Image, Latex, List, Note, Paragraph
     - Root, Surface Reference, Table blocks

3. **Import/Export System Updates**
   - Updated import functions to accept `schema` parameter:
     - `importHTMLToDoc`
     - `importHTMLZip`
     - `importMarkdownToDoc`
     - `importMarkdownZip`
     - `importNotionZip`
   - Modified export functions to use new schema pattern

4. **Test Infrastructure Updates**
   - Updated test files to use new schema extensions
   - Modified test document creation to include schema extensions
   - Removed direct schema registration in favor of extensions

5. **Service Layer Changes**
   - Updated various services to use `getAFFiNEWorkspaceSchema()`
   - Modified transformer initialization to use document schema
   - Updated collection initialization patterns

6. **Version Management**
   - Removed version-related properties and methods from:
     - `WorkspaceMetaImpl`
     - `TestMeta`
     - `DocImpl`
   - Removed `blockVersions` and `workspaceVersion/pageVersion`

7. **Store and Extension Updates**
   - Added new store extensions and adapters
   - Updated store initialization patterns
   - Added new schema-related functionality in store extension

This PR represents a significant architectural shift in how schemas are managed, moving from a workspace-centric to a store-centric approach, while introducing a more extensible block schema system through `BlockSchemaExtension`. The changes touch multiple layers of the application including core functionality, services, testing infrastructure, and import/export capabilities.
2025-02-26 11:31:29 +00:00
EYHN
5a7ab880c1 fix(core): fix ios blob upload (#10263) 2025-02-19 10:07:46 +08:00
EYHN
892fd16f52 fix(core): fix ios cloud sync (#10243) 2025-02-18 08:12:49 +00:00
EYHN
ee0cfe4dc7 feat(nbstore): share worker between workspaces (#9947) 2025-02-05 07:57:03 +00:00
EYHN
97207a7ad5 fix(ios): fix ios http and ws (#9805) 2025-01-21 00:16:21 +00:00
Saul-Mirone
fa5e6e1f45 fix: remove bs shared and components in affine (#9792) 2025-01-20 09:41:06 +00:00
EYHN
cc2958203b fix(core): fix ios sync (#9782) 2025-01-20 03:37:10 +00:00
EYHN
a2ffdb4047 feat(core): new worker workspace engine (#9257) 2025-01-16 16:22:18 +00:00
donteatfriedrice
5c4e87ddb5 feat(editor): support text highlight html adapter (#9632)
[BS-2061](https://linear.app/affine-design/issue/BS-2061/html-adapter-支持-text-highlight-样式)
2025-01-13 02:20:58 +00:00
Mirone
446b31b621 refactor(editor): rename job to transformer (#9639) 2025-01-11 12:04:07 +08:00
forehalo
c0ed74dfed chore: standardize tsconfig (#9568) 2025-01-08 04:07:56 +00:00
EYHN
46c8c4a408 feat(nbstore): improve nbstore (#9512) 2025-01-06 09:38:04 +00:00
EYHN
7514ccd452 feat(ios): add apis for native (#9536) 2025-01-06 08:20:31 +00:00
Saul-Mirone
c773982ced refactor(editor): rename store api (#9518) 2025-01-04 12:51:56 +00:00
Saul-Mirone
edb5e1d87a refactor(editor): job should not rely on doc collection directly (#9488) 2025-01-02 10:50:15 +00:00
Saul-Mirone
09427e846e refactor(editor): extract markdown adapter (#9443) 2024-12-31 04:13:02 +00:00
Brooooooklyn
752e697c6a feat(ios): nbstore swift native binding (#9211) 2024-12-27 06:34:30 +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
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
EYHN
3cf4bcf651 feat(ios): add intelligents button (#9281)
Co-authored-by: 砍砍 <git@qaq.wiki>
2024-12-24 07:51:11 +00:00
EYHN
129f94ee78 refactor(core): move infra modules to core (#9207) 2024-12-23 04:54:00 +00:00
CatsJuice
2ceb6e924c fix(ios): sync keyboard color scheme when theme changed (#9184) 2024-12-18 02:16:45 +00:00
EYHN
9a66c97f52 feat(ios): add some apis for native (#9173) 2024-12-16 09:18:39 +00:00
Brooooooklyn
ea746e3d77 chore: disable rules in oxlint (#9154) 2024-12-13 10:49:35 +00:00
CatsJuice
84df2a1d16 fix(mobile): disable navigation gesture for swipe-dialog (#8993) 2024-12-12 06:55:16 +00:00
EYHN
b637a62785 fix(ios): fix login (#9011) 2024-12-04 05:19:41 +00:00
CatsJuice
11b453f4d8 feat(mobile): swipe to open menu for explorer (#8953)
close AF-1803

- bump theme
- extract `SwipeHelper` and add `speed`, `direction` detection support
- new mobile `SwipeMenu` component
- integrate `SwipeMenu` to open a menu in Explorer
- New `Haptics` module for mobile, implemented in `ios` and `mobile`(`navigator.vibrate()`)

![CleanShot 2024-11-28 at 12.25.14.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/cba36660-f38a-473b-b85c-33540a406835.gif)
2024-12-02 03:27:01 +00:00
EYHN
6b4a1aa917 refactor(core): initial multiple servers infra (#8745)
This is the initial refactoring of affine to support multiple servers, but many more changes are needed to make multi-server actually work.
2024-11-27 06:44:46 +00:00
CatsJuice
b369ee0cca feat(mobile): disable swipe back gesture when there is no back in header (#8876)
close AF-1663, AF-1756

- new global `ModalConfigContext`
- new logic to judge whether inside modal
- render `✕` for PageHeader back if inside modal
- only enable `NavigationGesture` when there is `<` in PageHeader
2024-11-25 03:12:21 +00:00
EYHN
a4c749b882 refactor(core): independent app fallback for mobile (#8884) 2024-11-21 09:38:01 +00:00
CatsJuice
3390fbc5db feat(mobile): hide tab when virtual-keyboard show up (#8862) 2024-11-20 01:33:19 +00:00
CatsJuice
ffa4d5422d fix(mobile): use mobile app-fallback in app-container (#8804)
close AF-1633
2024-11-18 02:31:16 +00:00
EYHN
4977055a2e fix(ios): fix mobile blob storage (#8702) 2024-11-05 11:16:00 +00:00
EYHN
902635e60f refactor(core): desktop project struct (#8334) 2024-11-05 11:00:33 +08:00
CatsJuice
fe04ab35cc feat(mobile): mobile app fallback skeleton (#8686)
close AF-1533, AF-1532
2024-11-05 00:35:21 +00:00
EYHN
12e3cf1d07 refactor(core): set edgeless theme on doc created (#8670) 2024-11-04 04:38:03 +00:00
L-Sun
1973cea035 fix(mobile): incorrect height of keyboard toolbar in ios (#8653)
### What Changes:
- Fix keyboard height calculation with the `KeyboardToolBarConfig.useScreenHeight = true`. More detials in: https://github.com/toeverything/blocksuite/pull/8645
- Add safe bottom padding for shrinked keyboard toolbar
- Add `VirtualKeyboard` polyfill. Close [AF-1573](https://linear.app/affine-design/issue/AF-1573/virtualkeyboard-polyfill-with-capacitor)
  - Since the `@capacitor/keyboard` dose not implement the `Keyboard.show()` method, this polyfill is not enabled now.
2024-11-01 05:48:30 +00:00
Brooooooklyn
5709ebbb11 feat(ios): hashcash in swift (#8602) 2024-10-29 08:40:15 +00:00
pengx17
835fdc33c0 feat(core): add open link in app to doc menu (#8597)
add "open in desktop app" menu item for editor

fix AF-1547
2024-10-29 13:55:13 +08:00
Cats Juice
06dda70319 feat(mobile): ios oauth & magic-link login (#8581)
Co-authored-by: EYHN <cneyhn@gmail.com>
2024-10-28 14:12:33 +08:00
Brooooooklyn
714a87c2c0 feat(mobile): iOS app testflight (#8501) 2024-10-18 09:30:38 +00:00