Releases: toeverything/blocksuite
v0.17.7
feat(database): full width POC (#8302)
v0.17.6
chore: version packages (#8277) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v0.17.5
chore: version packages (#8245) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v0.17.4
chore: version packages (#8223) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
v0.17.3
ci: fix release workflow (#8225)
v0.17.0
New features:
- Add lock/unlock feature for frame.
- Add inline latex and latex block.
- Block level reference support.
- DI and Universal extension API.
- Mindmap import.
Improvements:
- Focus & Blur status for multiple editors.
- Mindmap polish.
- Database issue fix.
- Performance improvement.
- Notion import improvement.
- A bunch of bug fixes.
- Better project structure.
v0.16.0
BlockSuite v0.16.0 is now released with 316 PRs and 3 new contributors.
It's currently used in Affine 0.15. This release includes a lot of new features, improvements, and bug fixes.
Note Color Picker
We have a new color picker for notes now. You can pick whatever color you like for your notes. You can even set different colors for dark and light themes.
Screen.Recording.2024-08-07.at.20.18.22.mov
TOC
We have a lightweight TOC for the outline viewer now. You can easily navigate through your document with it. And you can use it to open the original TOC in sidebar.
Screen.Recording.2024-08-07.at.20.21.09.mov
List Block
List block now can have other types of blocks as children now, ex. bookmark.
Screen.Recording.2024-08-07.at.20.26.22.mov
AI Chat Block
Now you can save your AI Chats as blocks.
- Keep history of your AI chat conversation
- Feed data and prompts into reusable AI chats
- Link blocks together to create your own AI workflow
Signal Model Props
Now the block model props will also provide a signal version:
declare const model: BlockModel<{ name: string }>;
assert(typeof model.name$.value === 'string'); // true
model.name = 'hello';
assert(model.name$.value === 'hello'); // true
assert(model.yBlock.get('prop:name') === 'hello'); // true
model.name$.value = 'world';
assert(model.name === 'world'); // true
assert(model.yBlock.get('prop:name') === 'world'); // true
model.yBlock.set('prop:name', 'blocksuite');
assert(model.name$.value === 'blocksuite'); // true
Clipboard Improvement
We improved the clipboard performance by adding batch and stream for paste behavior.
Screen.Recording.2024-08-07.at.20.37.29.mov
Edgeless Quality Improvement
We fixed a bunch of issues in edgeless both in user experience and performance. We heard your words.
Full Changes
- chore: eslint autofix class, import and export sort @Saul-Mirone (#7557)
- chore: remove legacy copilot panel @doodlewind (#7575)
- chore: export edgeless note block @doouding (#7589)
- chore: remove built-in templates from blocks @doouding (#7587)
- chore: remove some strange code @Saul-Mirone (#7604)
- chore: fix page editor @Saul-Mirone (#7698)
- chore: move edgeless related utils to global @doouding (#7592)
- chore: mark assertExists as deprecated @doodlewind (#7706)
- chore: fix lit type binding errors @fundon (#7729)
- chore: add basic tests for color picker @fundon (#7721)
- chore: bump pnpm @Saul-Mirone (#7744)
- chore: bump version @fourdim (#7762)
- chore: update outline viewer style @L-Sun (#7759)
- chore: update CLA @goldsam (#7741)
- chore: try to rewrite async focus rich text @Saul-Mirone (#7775)
- chore: refactor query @Saul-Mirone (#7777)
- chore(blocks): sort query result of slash menu by substring score @L-Sun (#7519)
- chore(blocks): remove duplicated variable and update value @Flrande (#7528)
- chore(blocks): refine linked web toolbar @fundon (#7479)
- chore(blocks): refine linked doc toolbar @fundon (#7483)
- chore(blocks): refine link creation panel @fundon (#7490)
- chore(blocks): refine link editing panel @fundon (#7492)
- chore(blocks): refine attachment editing panel @fundon (#7511)
- chore(blocks): refine linked web editing panel @fundon (#7517)
- chore(blocks): refine format bar @fundon (#7520)
- chore(blocks): expose insertContent utility @pengx17 (#7545)
- chore(blocks): remove legacy block hub @doodlewind (#7711)
- chore(blocks): refine surface ref toolbar @fundon (#7595)
- chore(blocks): improve color picker @fundon (#7776)
- chore(blocks): add event for split note @pengx17 (#7820)
- chore(blocks): update palette canvas border radius on color picker @fundon (#7826)
- chore(blocks): update panel overlay shadow style @fundon (#7829)
- chore(blocks): theme v1.0.2 @fundon (#7839)
- chore(blocks): optimize icon assets @EYHN (#7847)
- chore(edgeless): make edgeless toolbar element's click-to-drag threshold bigger @CatsJuice (#7454)
- chore(edgeless): remove redundant line-size-button @doodlewind (#7712)
- chore(edgeless): remove redundant types @doodlewind (#7748)
- chore(edgeless): decorator naming convention @doodlewind (#7815)
- chore(presets): update animation of outline viewer @L-Sun (#7833)
- chore(store): signal based Text length @L-Sun (#7728)
- ci: add progressive bar for test @Saul-Mirone (#7558)
- ci: remove deploy info in pr @Saul-Mirone (#7800)
- ci: setup nx @Saul-Mirone (#7806)
- ci: use nx cloud @Saul-Mirone (#7831)
- ci: optimize test @Saul-Mirone (#7840)
- ci: include it test @Saul-Mirone (#7846)
- ci: use preview in ci to reduce flaky @Saul-Mirone (#7849)
- ci: reduce concurrent connection to 5 @Saul-Mirone (#7861)
- ci: wont run on draft pr @Saul-Mirone (#7864)
- feat: use signal for block model children @Saul-Mirone (#7493)
- feat: use signal for selection value @Saul-Mirone (#7495)
- feat: use computed selection filter and find @Saul-Mirone (#7498)
- feat: signal based placeholder @Saul-Mirone (#7500)
- feat: support maximum quantity displayed and expand more logic for @ menu @akumatus (#7540)
- feat: add ai chat block @donteatfriedrice (#7577)
- feat: ai chat block peek view @donteatfriedrice (#7597)
- feat: chat block peek view ui style @donteatfriedrice (#7659)
- feat: linked menu support configuration @akumatus (#7693)
- feat: add more canvas element added event type @donteatfriedrice (#7733)
- feat: replace selector with query object @Saul-Mirone (#7755)
- feat: limit AI Chat block width and height @donteatfriedrice (#7779)
- feat: support registering edgeless clipboard block @donteatfriedrice (#7797)
- feat: add requiredProperties decorator for runtime LitComponent props type check @akumatus (#7801)
- feat: add click handle config for embed linked doc @akumatus (#7818)
- feat: support extending preview spec @donteatfriedrice (#7845)
- feat: remove edgeless note hover background @donteatfriedrice (#7850)
- feat: optimize chat block style @donteatfriedrice (#7858)
- feat: handle copilot error @darkskygit (#7855)
- feat: show tooltip whether text length overflows in at menu @akumatus (#7859)
- feat(blocks): add download button on attachment and image toolbar @fundon (#7510)
- feat(blocks): support nested behavior for more types of blocks @Flrande (#7537)
- feat(blocks): add more menu button on format bar @fundon (#7526)
- feat(blocks): impl color picker with signals @fundon (#7585)
- feat(blocks): improve order role for list @Flrande (#7598)
- feat(blocks): configurable remote block selection bg-transparent @L-Sun (#7870)
- feat(database): format number @golok727 (#7529)
- feat(database): supports switch row in detail panel @zzj3720 (#7600)
- feat(database): add a checkbox in front of the rows for selecting them @zzj3720 (#7786)
- feat(database): support group by checkbox column @zzj3720 (#7807)
- feat(database): support for context-menu on multiple row selections @zzj3720 (#7832)
- feat(edgeless): support using last props for edgeless text @Flrande (#7476)
- feat(edgeless): pinch to zoom for edgeless editor @L-Sun (#7717)
- feat(edgeless): move viewport by dual touch pan @L-Sun (#7848)
- feat(playground): add clear site data button @fourdim (#7761)
- feat(presets): add outline viewer toc @L-Sun (#7704)
- feat(std): multi pointers control support @L-Sun (#7691)
- feat(store): add signal props for model @Saul-Mirone (#7565)
- fix: filter invalid range in range binding @Saul-Mirone (#7501)
- fix: icon button flex-shrink and text-overflow @akumatus (#7521)
- fix: hover style of icon button @akumatus (#7530)
- fix: image uploaded status was set unexpectedly @congzhou09 (#7538)
- fix: e2e regression for multi user @Saul-Mirone (#7548)
- fix: e2e flaky @Saul-Mirone (#7550)
- fix: add toast when copy answer successfully @donteatfriedrice (#7561)
- fix: placeholder after image @Saul-Mirone (#7567)
- fix: paste end with image will lose the focus line text @Saul-Mirone (#7582)
- fix: shape rotation rendering @doouding (#7578)
- fix: cannot drag embed block to edgeless surface @donteatfriedrice (#7591)
- fix: sentry-32b8bbd881c248f9b8999ab107c0e53c @Saul-Mirone (#7609)
- fix: sentry-6262b0c9961440f48e6ce51bcfcc48a2 @Saul-Mirone (#7611)
- fix: sentry-641833b93aae4d5dbc9b082ba683cd37 @Saul-Mirone (#7613)
- fix: sentry-9f4e9a3875764645b679494374e9efa9 @Saul-Mirone (#7614)
- fix: sentry-0070623f211c46dca1c1d51c7289eebc @Saul-Mirone (#7619)
- fix: sentry-fb712c6acac24da49c2c8e12ca76d1cc @Saul-Mirone (#7621)
- fix: sentry-f3c0a23a58d6436c8800fe0ef1e82af3 @Saul-Mirone (#7623)
- fix: sentry-9195c66b2b7040d29a48686028276c00 @Saul-Mirone (#7625)
- fix: sentry-6a2f3a9e9d2749989a0f09f59cf7cd63 @Saul-Mirone (#7627)
- fix: sentry-cd0c7d20a0344fc188e0c2b525477c7b @Saul-Mirone (#7629)
- fix: sentry-28d48c8551684e83b29ad33e9aec3dda @Saul-Mirone (#7630)
- fix: sentry-358a172f7ed44c719ab06435e38990c4 @Saul-Mirone (#7633)
- fix: sentry-d0bcc6c3bb54414fad524432d8ce6796 @Saul-Mirone (#7636)
- fix: sentry-1b8b363715d2464eba86353fe25aa5c3 @Saul-Mirone (#7639)
- fix: sentry-53881c0c3ae544958efadc65cabbbc15 @Saul-Mirone (#7645)
- fix: console error on switching mode @doodlewind (#7666)
- fix: sentry-939ef1e6227f4366aa8a200e0afce1ab @Saul-Mirone (#7643)
- fix: sentry-d03e2cc2290244249e559f3635730f4f @Saul-Mirone (#7647)
- fix: sentry-1e39ac90d7cd43a39ea5641cc7f41f82 @Saul-Mirone (#7651)
- fix: sentry-7316baf8a74b4e288b68b5df6923e538 @Saul-Mirone (#7653)
- fix: sentry-7eef49fc158047afbdd58c3d7f938718 @Saul-Mirone (#7648)
- fix: sentry-679fa35ab00641519ad5b320af75e18b @Saul-Mirone (#7654)
- fix: sentry-32c6665e453645e...
v0.15.0
BlockSuite v0.15.0 is now released with 380 PRs and 3 new contributors.
It's currently used in Affine 0.15. This release includes a lot of new features, improvements, and bug fixes.
Synced Doc
Now, we can easily embed another document in the current document.
The embedded document will be real-time synced with the original document.
You can also create a new document from the embedded document.
AFFiNE_embed_view.mp4
Contribution Details
- chore(blocks): linked doc created events @pengx17 (#7349)
- chore(edgeless): add embedSyncedDoc to splitElements function @L-Sun (#7417)
- feat: use external notification service @pengx17 (#7101)
- feat: add quick search service to insert link universally @Saul-Mirone (#7154)
- feat: use view type in selector for block rendering @Saul-Mirone (#7166)
- feat: add insert link command @Saul-Mirone (#7199)
- feat: add new linked doc with @ @Saul-Mirone (#7200)
- feat: local readonly for doc @Saul-Mirone (#7202)
- feat: prevent editor re render when moving linked docs @Saul-Mirone (#7209)
- feat: readonly synced doc @Saul-Mirone (#7236)
- feat: support seperated doc mode in playground @akumatus (#7394)
- feat: add markdown export from synced doc block @L-Sun (#7405)
- feat(blocks): add notify method to NotificationService @pengx17 (#7160)
- feat(blocks): add abort to notify @pengx17 (#7164)
- feat(blocks): peek view service @pengx17 (#7142)
- feat(blocks): bi-di link peekable support @pengx17 (#7177)
- feat(blocks): add center peek button to embed card toolbar @pengx17 (#7207)
- feat(blocks): add prompt to notification service @pengx17 (#7208)
- feat(blocks): paste affine link as linked ref @pengx17 (#7217)
- feat(blocks): center peek entries @pengx17 (#7275)
- feat(blocks): add element creation events for edgeless @pengx17 (#7297)
- feat(blocks): doc creation event tracking @pengx17 (#7340)
- feat(blocks): peek view api enhancements @pengx17 (#7390)
- feat(blocks): enable peek view for image block @pengx17 (#7424)
- feat(edgeless): support edgeless mode create linked doc @akumatus (#7194)
- feat(page): add prompt pop-up for users to input linked doc title @akumatus (#7224)
- feat(page): add notify toast after linked doc created @akumatus (#7230)
- feat(page): modify UI interaction of embed doc card according to the design draft @akumatus (#7382)
- fix: browser window resize causes image deformation @akumatus (#7043)
- fix: the code block wrap state shoud be persisted in database @akumatus (#7062)
- fix: copy empty code block failure @akumatus (#7074)
- fix: code block highlighting does not automatically respond to dark mode @akumatus (#7071)
- fix: selecting multiple blocks and dragging will show multiple placeholders @akumatus (#7089)
- fix: frame duplicate lost linked doc card @akumatus (#7150)
- fix: more button do not re-render after selected elements changed @akumatus (#7319)
- fix: insert card viewport and selection in edgeless editor @akumatus (#7326)
- fix: linked doc paste can undo as normal link text @Saul-Mirone (#7310)
- fix: add a 500ms delay time before showing the hover toolbar @akumatus (#7338)
- fix: keep connectors after note converted to linked doc @akumatus (#7355)
- fix: embed linked doc failed to load after created @akumatus (#7401)
- fix: disable embed view button if linked document references itself @akumatus (#7410)
- fix: create linked doc from mindmap @akumatus (#7416)
- fix: can not create linked doc from text selection @akumatus (#7419)
- fix: remove hover background of linked doc card @akumatus (#7430)
- fix: doc update time outdated @akumatus (#7434)
- fix: error linked doc card view UI @akumatus (#7439)
- fix: empty linked doc display @akumatus (#7468)
- fix(edgeless): cut behaviour does not completely delete elements @akumatus (#7356)
- fix(page): component not re-render when linked doc mode changes @akumatus (#7367)
- fix(blocks): model of embed card toolbar changed back to the root @L-Sun (#7411)
- fix(blocks): incorrect ui of deleted link doc @L-Sun (#7433)
- feat(playground): add stub impl for notifcation & quick search service @pengx17 (#7157)
- fix(blocks): should clear auto update for aipanel on disconnect @pengx17 (#7175)
- fix(blocks): affine-embed-synced-doc-block peek on dblclick @pengx17 (#7284)
- fix(blocks): slash menu not closable in peek view @pengx17 (#7478)
- test(blocks): add tests for pasting internal links @pengx17 (#7227)
- fix: embed linked doc empty style @Saul-Mirone (#7372)
- fix: bs-588 disable editable contents in synced block @Saul-Mirone (#7435)
- fix: bs-644 nested synced doc can have one depth at most @Saul-Mirone (#7444)
- fix: embed edgeless block resizing @doouding (#7392)
MindMap
In version 0.14, we have already enabled AFFiNE AI to create MindMaps on the whiteboard.
Now we are opening up this capability, and you can freely create MindMaps on the edgeless (whiteboard) !
AFFiNE_mindMap.mp4
Contribution Details
- feat: refine mindmap @doouding (#7173)
- feat: refresh surface-ref should refresh canvas content @doouding (#7306)
- fix: mindmap preview @doouding (#7309)
- fix: mindmap issue @doouding (#7335)
- fix: mind map balance layout @doouding (#7388)
- fix: scribbled style shape rendering @doouding (#7420)
- fix(edgeless): legacy mind map rendering @doouding (#7415)
New Edgeless Toolbar
We have redesigned the Edgeless toolbar.
It's now more responsive and user-friendly.
And with a lot of fancy animations!
AFFiNE_toolbar.mp4
Contribution Details
- chore(edgeless): simplify data flow of edgeless toolbar hideToolbar @CatsJuice (#7122)
- chore(edgeless): toggle presentation toolbar with css instead @CatsJuice (#7125)
- feat(blocks): new smooth-corner component @CatsJuice (#7181)
- feat(edgeless): separate presentation toolbar from edgeless-toolbar @CatsJuice (#7141)
- feat(edgeless): responsive for edgeless toolbar @CatsJuice (#7182)
- feat(edgeless): add link via edgless-toolbar @CatsJuice (#7264)
- feat(edgeless): responsive for edgeless presentation toolbar @CatsJuice (#7281)
- feat(edgeless): bind mindmap shortcut in edgeless toolbar @CatsJuice (#7318)
- feat(edgeless): add shape shortcut in toolbar @CatsJuice (#7330)
- feat(edgeless): consider dragging a short distance as click for toolbar draggable @CatsJuice (#7393)
- feat(playground): add presentation button in edgeless mode @CatsJuice (#7280)
- fix(edgeless): don't hide presentation toolbar if frame/setting menu opened @CatsJuice (#7128)
- fix(edgeless): adjust edgeless toolbar ui, add tooltips, replace icons @CatsJuice (#7317)
- fix(edgeless): bind shortcuts in toolbar should dispose when tool disconnected @CatsJuice (#7329)
- fix(edgeless): resolve the conflict of drag-and-drop to create shapes, modify toolbar shadow @CatsJuice (#7364)
- fix(edgeless): correct initial location of shape preview when toggled by shortcut 's' @CatsJuice (#7365)
- fix(edgeless): optimize edgeless toolbar active states @CatsJuice (#7380)
- fix(edgeless): edgeless toolbar disappear when hide toolbar in presentation setting @CatsJuice (#7413)
- style(page): adjust heading font-weight and letter-spacing @CatsJuice (#7277)
New Edgeless Text
We've added a new edgeless block type - Edgeless Text.
It's more powerful and user-friendly than the legacy canvas text.
It supports more child blocks and has a better user experience.
Contribution Details
- chore(blocks): export edgeless text spec @Flrande (#7234)
- chore(playground): enable new edgeless text by default in playground @Flrande (#7247)
- feat(edgeless): add edgeless text @Flrande (#7144)
- feat(edgeless): add default color and editing border for edgeless text @Flrande (#7278)
- feat(edgeless): support copy and paste for edgeless text @Flrande (#7324)
- feat(edgeless): add min width for link card in edgeless text @Flrande (#7350)
- feat(edgeless): auto focus when press enter in edgeless text @Flrande (#7360)
- feat(edgeless): auto add paragraph when no editable area in edgeless text @Flrande (#7374)
- feat(edgeless): support edgeless text for new toolbar @Flrande (#7384)
- fix: edgeless selection may disappear when typing on edgeless text @Flrande (#7443)
- fix(blocks): support overlapping of inline styles @Flrande (#6998)
- fix(edgeless): edgeless text should overflow automatically @Flrande (#7235)
- fix(edgeless): align panel not work @Flrande (#7293)
- fix(edgeless): edgeless text rect should automatically update when changing font @Flrande (#7292)
- fix(edgeless): the style of internal text should be reset when modifying the style of edgeless text @Flrande (#7311)
- fix(edgeless): edgeless text not support divider @Flrande (#7325)
- fix(edgeless): need to delete first block in note when it has children @Flrande (#7379)
- fix(edgeless): auto delete empty edgeless text @Flrande (#7385)
- fix(edgeless): can not undo block moving @Flrande (#7400)
- fix(edgeless): disable sync doc in edgeless text @Flrande (#7431)
- fix(edgeless): need to clear selection when focus out in edgeless text @Flrande (#7446)
- fix(edgeless): should not trigger linked doc widget in canvas text @Flrande (#7459)
- fix(edgeless): drag text from toolbar should not change edgeless tool @Flrande (#7465)
- fix(inline): adjust the error range @Flrande (#7225)
- fix(playground): can not change mode @Flrande (#7361)
- fix(playground): flags from params need to be converted @Flrande (#7362)
- fix(presets): export ai action typ...
v0.14.0
BlockSuite v0.14.0 is now released with 348 PRs landed and 5 new contributors.
It's currently used in Affine 0.14. This release includes a lot of new features, improvements, and bug fixes.
And it's a version centered around the AI features.
AI Features
Important
The AI features are only available in the Affine AI due to the dependency on the backend service.
We have added a lot of AI features in this release to support the Affine AI project.
Thanks to our team members and contributors (@Flrande, @pengx17, @fundon, @donteatfriedrice, @zzj3720, @doouding, @regischen) for their hard work on this release.
- AI Action Infra: The AI features are supported by a new AI action infrastructure.
- Ask AI Format Bar: The format bar now has a new button to ask AI for help.
- AI Chat Panel: A new AI panel is added to the right sidebar. It can generate text, images, and slides.
- Edgeless AI: The edgeless elements and blocks now can be interacted with AI actions.
Contribution Details
- chore(presets): sync ai create message interface parameters @fundon (#6741)
- feat: format bar ask ai @donteatfriedrice (#6578)
- feat: add slash menu ai button @donteatfriedrice (#6605)
- feat: copilot client @regischen (#6626)
- feat: add basic ai example with backend integration @Flrande (#6661)
- feat: add iframe message template on ai chat panel @fundon (#6701)
- feat: chat panel @regischen (#6645)
- feat: add text action renderer @regischen (#6740)
- feat: add actions renderer @regischen (#6756)
- feat: add slide action @regischen (#6759)
- feat: add discard modal for ai panel @donteatfriedrice (#6765)
- feat: support copy ai answer and fix ui issues @donteatfriedrice (#6774)
- feat: add chat pause @regischen (#6836)
- feat: support clicking to send content to AI @donteatfriedrice (#6846)
- feat: support display answer and error at the same time @donteatfriedrice (#6856)
- feat: add image renderer and fix bug @regischen (#6863)
- feat: pressing escape to stop ai generating @donteatfriedrice (#6917)
- feat(blocks): instantiating Copilot in RootService @zzj3720 (#6528)
- feat(blocks): copilot add EditorHost parameter @zzj3720 (#6529)
- feat(blocks): support real abort for copilot @zzj3720 (#6530)
- feat(blocks): add ai action panel @Flrande (#6567)
- feat(blocks): add action config for ai answer ui component @Flrande (#6580)
- feat(blocks): support custom placeholder for paragraph @Flrande (#6787)
- feat(blocks): add esc tip when iframe is fullscreen @fundon (#6968)
- feat(edgeless): copilot selection widget @doouding (#6497)
- feat(edgeless): add mindmap support @doouding (#6508)
Infra Improvements
-
Rewrite the view store to support the new block collection and selector. (#6521, #6672, #6534, #6737, #6780)
In previous versions, the view store is responsible for managing the views of the blocks.
It was designed to control different views of the same block, such as the editor view and the preview view.
However, we found that it's a anti-pattern to render different views of the same block in the same block tree.
Which makes it hard to track the view by the block model.
In this release, we introduce the block collection and selector to make it easier to render different views of the same block. -
Introduced the draft model for the transformer. (#6630)
The draft model is a new model that can be used to transform the block model to a new model.
It's useful when you want to transform the block model to a new model without changing the original block model. -
Bson for clipboard. (#6526, #6562)
We use bson for the clipboard mime to optimize the clipboard data serialization and deserialization. -
Add spec builder. (#6976)
The spec builder is a new tool to manage the block specs. -
Switch to es2022 targets. (#6527)
We have switched to the es2022 targets to support the latest JavaScript features. -
refactor(store): support streaming
editor.doc
from empty state @doodlewind (#6522) -
refactor(examples): sync collection lifecycle with provider @doodlewind (#6683)
Embed Doc Polishing
In this release, we have polished the embed doc feature to make it more user-friendly.
- Move embed reload button. (#6502)
- Polish the styles. (#6523, #6536)
- Make embed card toolbar a widget. (#6635)
- Fix the issue that creating linked doc from block selection will loss data. (#6510)
- Fix the issue that users can't jump into doc inside embed synced doc. (#6531)
Database Enhancements
In this release, the Database has seen a series of enhancements aimed at increasing the fluidity of the editing experience, with improvements to keyboard shortcuts and cursor behavior:
- Supports using the Tab key to move the cursor to the next field (#6565)
- Supports selecting additional rows using arrow keys (#6941)
- Clicking on “New Record” now focuses on the title cell of the new row (#6561)
- Supports filling a column with the same content via drag-and-drop (#6895)
Additionally, enhancements to the title column now allow it to link to another page (#6572).
When you drag Kanban cards to the edge, the Kanban will now automatically scroll (#6614).
The Database will display as many views as possible instead of just three (#6642), and the same goes for filters (#6739).
There are also some experimental features that can be enabled through feature flags:
- Table now includes a statistics feature (#6560)
- The Database now supports using Todo blocks from all pages as a data source (#6785)
Documentation Improvements
We've added some new examples thanks to @doodlewind, @L-Sun.
- Add vanilla-indexeddb example. (#6525)
- Add react-indexeddb example. (#6689)
- Add react-websocket example. (#6624)
Community Features
- Lasso Tool: A new lasso tool is added to the edgeless whiteboard thanks to @golok727 (#6602, #6716, #6874)
- Pie Menu: A new pie menu is added to the edgeless whiteboard thanks to @golok727 (#6493, #6571, #6632, #6553)
Detailed Bug Fixes and Improvements
- chore: remove unused code @c0sc0s (#6807)
- docs: commanddata -> commandcontext @golok727 (#6938)
- feat: remove card view box shadow when doc mode @donteatfriedrice (#6532)
- feat: create zod union @F4lkr4m (#6855)
- feat: create zod union @F4lkr4m (#6855)
- feat(edgeless): shift key to constrain to axis @golok727 (#6543)
- feat(edgeless): shift + arrow keys to move elements with 10px inc @golok727 (#6544)
- feat(edgeless): connector keep only one shortcut key L @fundon (#6573)
- feat(edgeless): paste SVG in text/plain mime @golok727 (#6540)
- feat(edgeless): shift + s to toggle between shapes @golok727 (#6634)
- feat(edgeless): note block supports auto complete panel @fundon (#6591)
- feat(edgeless): font family panel refactoring @RubaXa (#6692)
- feat(edgeless): remove the kerning information stored in a font @RubaXa (#6978)
- feat(page): html adapter YouTube import @fourdim (#6705)
- fix: publish script @doodlewind (#6524)
- fix: deletion behavior in DocsPanel component @congzhou09 (#6511)
- fix: clean up documentation content @fourdim (#6558)
- fix: arrow up and down works incorrectly @Saul-Mirone (#6593)
- fix: placeholder visibility and cursor style in readonly mode @L-Sun (#6686)
- fix: frame selection conflicts with note selection @Saul-Mirone (#6802)
- fix: bash escape by ` in PR title linting @lawvs (#6839)
- fix: memory leak @doouding (#6977)
- fix: should not inherit last text element hasMaxWidth prop @donteatfriedrice (#6990)
- fix(blocks): pdf preview @zkwolf (#6659)
- fix: catch error in ydoc transaction and doc getter @Saul-Mirone (#6989)
- fix(blocks): ignore formart-bar-widget&block-selection tags when exporting png/pdf @Tzyito (#6711)
- fix(blocks): the IME sometimes break because of placeholder @Flrande (#6734)
- fix(blocks): do not log error when parse url hostname @Flrande (#6779)
- fix(blocks): page movement due to scrolling into view @fundon (#6776)
- fix(blocks): update list number prefix when updating a block @lawvs (#6790)
- fix(blocks): switch the file-type to @sgtpooki/file-type @lawvs (#6803)
- fix(blocks): should not delete children when transform block type @Flrande (#6840)
- fix(blocks): edge case for toggle link @Flrande (#6841)
- fix(blocks): should not go proxy when it is an onsite image @fundon (#6859)
- fix(blocks): github icon dark mode @donteatfriedrice (#6864)
- fix(blocks): optimize height and position of panels @fundon (#6866)
- fix(blocks): linked doc horizontal card quote block @donteatfriedrice (#6865)
- fix(blocks): video attachments can not be embed @donteatfriedrice (#6869)
- fix(blocks): try fix surface ref note portal stuck @EYHN (#6867)
- fix(blocks): linked doc style without note block or image block @donteatfriedrice (#6876)
- fix(blocks): should reset scroll top while retrying @fundon (#6882)
- fix(blocks): github block title text color @donteatfriedrice (#6887)
- fix(blocks): line break in reference node @Flrande (#6894)
- fix(blocks): do not display name in remote cursor when no user info @Flrande (#6898)
- fix(blocks): missing elements when frames are selected @fundon (#6915)
- fix(blocks): allow users to enter prompt words when content is missing @fundon (#6930)
- fix(blocks): last pos should be updated in not wheeling @fundon (#6939)
- fix(blocks): zoom bar toggle button should be displayed when the width of viewport is equal to 1200 @fundon (#6954)
- fix(blocks): reference node not update as expected @Flrande (#6958)
- fix(blocks): use passive listeners to improve wheel event @fundon (#6960)
- fix(blocks): support config the vertical scroll container of rich-text @Flrande (#6965)
- fix(blocks): block portal should b...
v0.13.0 - API Overhaul and Rich Examples
BlockSuite v0.13.0 is now released with 153 PRs landed and 4 new contributors. It's currently used in AFFiNE 0.13. This is a transitional version centered on bug fixes and the clearing of technical debt.
BlockSuite Examples
From 0.13, BlockSuite maintains multiple framework-specific examples demonstrating editor integration for major frameworks (currently including React, Vue, Angular, Preact, Svelte, Solid). There are also examples about using BlockSuite with Next.js and SQLite. You can checkout these examples in the quick start guide.
These examples are maintained in a standalone workspace. There'll be more examples incoming and feel free to make your own!
Framework Features and API Overhaul
- Text Style Commands Enhancement (#6406, #6416): Added commands to facilitate operations on selected text content, including
toggleBold
,toggleItalic
,toggleUnderline
,toggleStrike
,toggleCode
,toggleLink
,getTextStyle
, andisTextStyleActive
. These commands support chainable combination calls, simplifying common rich text style operations. - Format Bar Config API (#6433): Introduced a new format bar widget configuration API, allowing for the customization of format bar menu items. This supports the configuration of existing menu items and the registration of custom menu items, including paragraph dropdowns, style toggles (e.g., bold, italic), highlighter dropdowns, and block type switches with custom icons.
// In root spec:
const defaultSetup = rootSpec.setup;
const mySpec = {
...rootSpec,
setup: (slots, disposableGroup) => {
defaultSetup(slots, disposableGroup);
const onFormatBarConnected = slots.widgetConnected.on(view => {
if (view.component instanceof AffineFormatBarWidget) {
configureFormatBar(view.component);
}
});
disposableGroup.add(onFormatBarConnected);
},
};
function configureFormatBar(formatBar: AffineFormatBarWidget) {
formatBar
.clearConfig()
.addParagraphDropdown()
.addDivider()
.addTextStyleToggle({
key: 'bold',
action: chain => chain.toggleBold().run(),
icon: BoldIcon,
})
.addTextStyleToggle({
key: 'italic',
action: chain => chain.toggleItalic().run(),
icon: ItalicIcon,
})
.addDivider()
.addHighlighterDropdown()
.addDivider()
.addBlockTypeSwitch({
flavour: 'affine:paragraph',
type: 'h1',
name: 'Heading 1',
icon: Heading1Icon,
})
.addBlockTypeSwitch({
flavour: 'affine:paragraph',
type: 'h2',
name: 'Heading 2',
icon: Heading2Icon,
})
}
- Standard Error Types and Handler (#6340): Introduced
BlockSuiteError
to facilitate application-level exception categorization. - Renaming page to doc (#6290): We now refer to BlockSuite documents as
doc
s, aligning API concepts with this terminology change (e.g.,page.addBlock
->doc.addBlock
). This clarifies the document-centric nature of the API. - Renaming
Workspace
toDocCollection
(#6436): Replaced theWorkspace
concept, which was more specific to AFFiNE product features, withDocCollection
. This moves towards a more generalized framework structure (e.g.,workspace.createDoc
tocollection.createDoc
). - Command API Simplification (#6428, #6421, #6277): Streamlined command usage by eliminating the need for
.withHost
and.getChainCtx
. The API for initiating command chains has been intuitively changed from.pipe
to.chain
, simplifying command execution syntax.
// before
std.command
.pipe()
.withHost()
.getSelectedBlocks()
.run();
// after
std.command
.chain()
.getSelectedBlocks()
.run();
- Schema Entry Renaming (#6312, #6319): Removed deprecated
__unstableSchemas
and enhanced consistency when importing default block schemas. This unifies the exposed schema, reinforcing a consistent framework for developers.
// Before
import { AffineSchemas, __unstableSchemas } from '@blocksuite/blocks/models';
// After
import { AffineSchemas } from '@blocksuite/blocks/schemas';
- Typed
getService
(#6284): ThegetService
API is now strongly typed with different service specific to block flavours.
Product Features
- Batch Import (#6360): Enabled batch importing of multiple markdown or HTML files through the file picker.
- Pressure Sensitivity for Brush Mode (#6348): Added pressure sensitivity support for the brush tool, offering more natural drawing experience on tablets.
- Comment Feature POC (#6302): Introduced a preliminary support for a commenting feature, setting the stage for enhanced collaboration capabilities that will be further refined in future updates.
Detailed Bugfixes
- fix: view in edgeless mode @doouding (#6269)
- fix: handle drag and drop outside nested editor gracefully @AyushAgrawal-A2 (#6282)
- fix: console error when pressing delete key in the paragraph before a database @ununian (#6285)
- fix: change bidirectional link divider color @regischen (#6331)
- fix: should enter edit status when focus in embed doc block @donteatfriedrice (#6349)
- fix: bi-directional panel container size @pengx17 (#6358)
- fix: remove static slot and controling state @doouding (#6359)
- fix: use editorModeSwitch slot to change mode @donteatfriedrice (#6380)
- fix: binary expression logic errors @Brooooooklyn (#6381)
- fix: add no-useless-spread and fixes related codes @Brooooooklyn (#6383)
- fix: add ask ai in format-bar @regischen (#6447)
- fix: bi-directional panel check id @regischen (#6460)
- fix: remote cursor shouldn't display on other docs @Saul-Mirone (#6462)
- fix: select all in page mode @Saul-Mirone (#6465)
- fix: update edgeless embed synced doc block style @donteatfriedrice (#6474)
- fix: remove wrong disposables @regischen (#6475)
- fix: add missing slot in edgeless service @doouding (#6478)
- fix: format bar should not display on linked page @Saul-Mirone (#6480)
- fix: check disposable if exists @regischen (#6485)
- fix: only display hostname in bookmark @donteatfriedrice (#6495)
- fix(blocks): heading style should not influence children @Flrande (#6407)
- fix(blocks): use requestAnimationFrame to update selection @fundon (#6422)
- fix(blocks): type character after link should not extend the link attributes @Flrande (#6443)
- fix(blocks): inconsistent space between nested blocks @Flrande (#6466)
- fix(blocks): drag area not handle viewport position correctly @Flrande (#6482)
- fix(database): drop row in place and it'll disappear @zzj3720 (#6276)
- fix(edgeless): fix wrong algorithm @regischen (#6278)
- fix(edgeless): switching to hand tool while right clicking affine#5664 @golok727 (#6279)
- fix(edgeless): shift panel-wrapper to keep it in view @fundon (#6288)
- fix(edgeless): no need to adjust position of component-toolbar when more-actions-container is opened @fundon (#6292)
- fix(edgeless): cannot add text in hollow shape @donteatfriedrice (#6297)
- fix(edgeless): add default text color of shape-element @fundon (#6300)
- fix(edgeless): github icon size on note-menu @fundon (#6309)
- fix(edgeless): redo for reordering @doouding (#6315)
- fix(edgeless): auto-complete displays incorrect shape @lawvs (#6334)
- fix(edgeless): width or height should not be negative @fundon (#6338)
- fix(edgeless): menu-container scrolling in safari @fundon (#6351)
- fix(edgeless): fix laggy selection & legacy template rendering @doouding (#6341)
- fix(edgeless): fonts load and render in firefox @fundon (#6353)
- fix(edgeless): position should be calculated after the update is complete @fundon (#6367)
- fix(edgeless): last selection was recovered unexpected after panning from default tool @congzhou09 (#6343)
- fix(edgeless): update path after mode change @regischen (#6374)
- fix(edgeless): snapshot with connector elements importing @doouding (#6377)
- fix(edgeless): use custom scrollbar for template panel @doouding (#6446)
- fix(edgeless): add ask ai in edgeless format-bar @regischen (#6456)
- fix(edgeless): add paragraph block when clicking at empty note block @donteatfriedrice (#6457)
- fix(edgeless): paste group with same relative index @regischen (#6415)
- fix(edgeless): drag note to merge after a list item @doouding (#6461)
- fix(edgeless): dropout embed synced doc block should fit height @donteatfriedrice (#6463)
- fix(edgeless): size panel width @fundon (#6473)
- fix(edgeless): group element to image @doouding (#6472)
- fix(edgeless): bebas-neue light url @fundon (#6395)
- fix(edgeless): optimize edgeless note focus logic @donteatfriedrice (#6476)
- fix(edgeless): make sure some components invisible when readonly @donteatfriedrice (#6483)
- fix(inline): failed to delete embed node using backspace @Flrande (#6347)
- fix(inline): v-line is not fully adapted for horizontal scrolling @Flrande (#6467)
- fix(page): popup menu should not close, when on top of hoverable block @AyushAgrawal-A2 (#6281)
- fix(page): allow block cards to expand horizontally on note resize @AyushAgrawal-A2 (#6273)
- fix(page): change toolbar position for all block cards to top-left @AyushAgraw...