Releases: toeverything/blocksuite
v0.12.0 - Embeds, Sync Engine, and Cross-Browser Support!
The BlockSuite v0.12.0 release comes with 220 landed PRs, which is the version used in AFFiNE 0.12, with many major framework improvements and product features in the editor.
Note that from this version, BlockSuite is released using the version installed in AFFiNE Stable.
Notable Framework Enhancements
- Support for Safari and Firefox by moving to single
contenteditable
(#5850) - New
@blocksuite/sync
package that provides andocSources
option for syncing the overall workspace, which replaces previous providers. The BlockSuite playground apps have migrated to the new sync engine (#6204) - Reorganized edgeless API exposed on service (#5972 #6108 #6165 #6180)
- Refactored editor initializing flow that allows for simpler code setup for creating editor with existing content (#6167)
- New
setup
function in block spec for passing in custom configs (#6122) - Move to per-block version that allow co-existing of multiple block versions in same doc (#6065)
- Improved API for pulling out
context
of a command (#6265)
Also, the BlockSuite documentation site now adds the new components and blog entries. We'll keep them updated in the following!
Notable Product Features
- The card view and embed view of documents that allow experience like Synced Block in Notion (#6193 #5955)
- The embed view of Figma, GitHub, Loom and attachment (#5927 #5988 #5955 #6224 #6069)
- New note slicer that splits note blocks in an easier way (#6029)
- New bi-directional link panel for inbound and outbound bi-directional links (#6010)
- Better note visibility between doc and edgeless editors (#5994)
Detailed Bugfixes
- fix: import use .js postfix @regischen (#5965)
- fix: change video embed card dimensions @AyushAgrawal-A2 (#5967)
- fix: change title/tooltip/description of entry points for adding link @AyushAgrawal-A2 (#5971)
- fix: title & description on generic link card when fetch failed @AyushAgrawal-A2 (#5974)
- fix: cursor pointer on hover over card url @AyushAgrawal-A2 (#5975)
- fix: unexpected spaces in the inline node @Flrande (#5982)
- fix:
embed-card-create-portal
- remove block specific url validation @AyushAgrawal-A2 (#5981) - fix: treat embed-* blocks without iframe as card view @AyushAgrawal-A2 (#5984)
- fix: dragPreview / dropIndicator / dragEndPos viewport offsets @AyushAgrawal-A2 (#5980)
- fix: add hover/select status of links in all card view and embed view @AyushAgrawal-A2 (#6003)
- fix: input overflow menu @nawbc (#6005)
- fix:
reference-node
sometimes failed to getinline-editor
@Flrande (#6021) - fix: proportional scaling for linked card horizontal style @AyushAgrawal-A2 (#6023)
- fix: add .js postfix @regischen (#6025)
- fix: add .js postfix @AyushAgrawal-A2 (#6026)
- fix: remove empty banner placeholder in linked doc card @AyushAgrawal-A2 (#6024)
- fix: remove link panel from affine-doc-editor @regischen (#6031)
- fix: on hover logic and css selector on icon @AyushAgrawal-A2 (#6050)
- fix: don't delete image when deleting in caption @zqran (#6059)
- fix: attachment block should not contenteditable @Flrande (#6064)
- fix: should not show placeholder when composing @Flrande (#6076)
- fix: event scope source type @Saul-Mirone (#6074)
- fix: card-view linked page display in backlink @regischen (#6081)
- fix: unexpected cursor position after clicking page outside @Flrande (#6087)
- fix: line number container in code-block should not contenteditable @Flrande (#6085)
- fix: bookmark and image block should not contenteditable @Flrande (#6089)
- fix: embed-* blocks should not be contentEditable @AyushAgrawal-A2 (#6100)
- fix: show github status on update @AyushAgrawal-A2 (#6097)
- fix: card banner images should not be draggable @AyushAgrawal-A2 (#6098)
- fix: resolve loading state after queryUrlData fails @AyushAgrawal-A2 (#6102)
- fix: list number should not be contenteditable @Flrande (#6113)
- fix: bidirectional link panel bug @regischen (#6116)
- fix: group paste bug @regischen (#6118)
- fix: bookmark should show caption @AyushAgrawal-A2 (#6119)
- fix: surface ref should not contenteditable @Flrande (#6126)
- fix: image-block error/loading state & captions in edgeless @AyushAgrawal-A2 (#6139)
- fix: drag-handle note-scale in page mode @AyushAgrawal-A2 (#6140)
- fix: support export scaled images in html @lawvs (#6142)
- fix: export png incorrectly when svg without width and height @donteatfriedrice (#6146)
- fix: remove duplicated title when exporting markdown @lawvs (#6152)
- fix: optimize note display status @donteatfriedrice (#6154)
- fix: untitled name fallback for bi-directional link panel @regischen (#6164)
- fix: hide format-bar / component-toolbar while dragging @AyushAgrawal-A2 (#6185)
- fix: can not render link node with bold style @Flrande (#6188)
- fix: link-popup input background color in dark mode @Flrande (#6189)
- fix: linked & synced starter examples should work @AyushAgrawal-A2 (#6191)
- fix: should not extend attributes when composing @Flrande (#6190)
- fix: disable two fingers back/forward swipe in chrome @fundon (#6208)
- fix: format bar popup disappears on edgeless @lawvs (#6216)
- fix: sync package configs @doodlewind (#6229)
- fix: tooltip flickers when the mouse is moved slightly @lawvs (#6240)
- fix: improve code block performance @Flrande (#6236)
- fix: cursor cannot be moved as expected in firefox @Flrande (#6249)
- fix: arrow buttons are disabled when kanban exists in page @ununian (#6248)
- fix: failed to select from empty line and unexpected format result in empty line @Flrande (#6259)
- fix: resolve
this
error in LinkPreviewer @AyushAgrawal-A2 (#6260) - fix: synced doc toolbar & caption bug @AyushAgrawal-A2 (#6262)
- fix: unexpected format result when in block selection and empty line @Flrande (#6261)
- fix(database): drag a row out of the database block @zzj3720 (#6263)
- fix(database): select column Popup position @zqran (#6266)
- fix(edgeless): incorrect dragStart in surface @AyushAgrawal-A2 (#5985)
- fix(edgeless): embed-card toolbar incorrect card styles @AyushAgrawal-A2 (#5987)
- fix(edgeless): wrong transparent shape overlay @donteatfriedrice (#5990)
- fix(edgeless): enable double click on cards in surface @AyushAgrawal-A2 (#6009)
- fix(edgeless): edgeless only index label position shift @donteatfriedrice (#6022)
- fix(edgeless): should update index label when note order changed @donteatfriedrice (#6060)
- fix(edgeless): should generate connectors' path once when loading connector middleware @doouding (#6084)
- fix(edgeless): should focus at note after creating it @donteatfriedrice (#6091)
- fix(edgeless): bugs of connector and block @doouding (#6088)
- fix(edgeless): drag to add note should support collapse @donteatfriedrice (#6093)
- fix(edgeless): show curve icon on resize handle hover before scaling starts @AyushAgrawal-A2 (#6095)
- fix(edgeless): prevent file drop indicator on block elements in surface @AyushAgrawal-A2 (#6099)
- fix(edgeless): remove redundant menu divider @donteatfriedrice (#6114)
- fix(edgeless): prevent native selection on drag select in edgeless @AyushAgrawal-A2 (#6117)
- fix(edgeless): don't record last props in session @regischen (#6128)
- fix(edgeless): should rerender when new element was added or removed @doouding (#6130)
- fix(edgeless): remove single connector selected rect and multi select… @regischen (#6150)
- fix(edgeless): frame title disappear after reordering frames @AyushAgrawal-A2 (#6157)
- fix(edgeless): should be able to change embed card style @AyushAgrawal-A2 (#6159)
- fix(edgeless): template and surface-ref bug @doouding (#6161)
- fix(edgeless): insert frame/group into page @donteatfriedrice (#6163)
- fix(edgeless): should not select last docOnly note @donteatfriedrice (#6226)
- fix(edgeless): change connector toolbar tip @regischen (#6233)
- fix(edgeless): more button copy not work @regischen (#6235)
- fix(edgeless): active eventDispatcher when edgeless tool updated @donteatfriedrice (#6234)
- fix(edgeless): cannot click more button in AFFiNE @donteatfriedrice (#6250)
- fix(edgeless): inner frame hittest @regischen (#6255)
- fix(edgeless): slide menu content height @fundon (#6253)
- fix(edgeless): modify connector tip @regischen (#6267)
- fix(inline): event source should not contenteditable when in readonly @Flrande (#6127)
- fix(inline): line break issue @golok727 (#6212)
- fix(lit):
textSelectionToRange
result incorrect when selection is reversed @Flrande (#6227) - fix(page): enter in title move cursor @regischen (#5962)
- fix(page): merge delta when exporting code @fourdim (#5964)
- fix(page): export long page to png @donteatfriedrice (#5973)
- fix(page): change text attribute on converting inline-link to card @AyushAgrawal-A2 (#5968)
- fix(page): dragStart for bookmark / embed / image block @AyushAgrawal-A2 (#5979)
- fix(page): show backlink for
affine:embed-linked-doc
@AyushAgrawal-A2 (#5986) - fix(page): empty clipboard because of transient activation @fourdim (#6000)
- fix(page): linked page should show new title @AyushAgrawal-A2 (#6008)
- fix(page): show only one toolbar at a time @AyushAgrawal-A2 (#6037)
- fix(page): export png position shift @donteatfriedrice (#6075)
- fix(page): should not remove empty lines when canceling an action @lawvs (#6104)
- fix(page): add attachment transformer @fourdim (#6109)
- fix(page): snapshot export assets rename @fourdim (#6132)
- fix(page): link disapper when paste @regischen (#6135)
- fix(page): linked page/web toolbar should not be displayed when the page is in read-only mode @AyushAgrawal-A2 (#6141)
- fix(page): bullet list style update @AyushAgrawal-A2 (#6144)
- fix(page): export embed as link @fourdim (#6148)
- fix(page): markdown export list early clo...
v0.11.0 - The Editor Framework!
The BlockSuite v0.11.0 release is now available! With 317 PRs landed and 6 new contributors, this version marks a milestone in our journey: evolving from a proprietary editor to a general-purpose editing framework.
BlockSuite originated as an editor designed to meet the needs of the AFFiNE knowledge base, which is why, for a long time, it provided a default EditorContainer
that included both document editing and whiteboard functionalities. Early updates also focused heavily on specific features for AFFiNE products.
However, during the development of BlockSuite, we've built a range of front-end infrastructures from the ground up, spanning from rich text editing to whiteboard rendering. This version introduces extensive engineering refactoring and modular layering, resulting in the birth of a new, universal editing framework.
Traditionally, developing a stable rich text editor could take years of challenging work. But the evolution of BlockSuite has far outpaced this. We believe our work stems from embracing a new architectural pattern called document-centric, which simplifies the complex architecture of traditional editors by natively building the data layer in the editor with CRDT, thereby providing a more efficient development experience.
Key changes in BlockSuite 0.11.0 for developers include:
- The new
@blocksuite/presets
package, which splits the independently usableDocEditor
andEdgelessEditor
, among others. - Distinct structuring of the BlockSuite framework layer, including atomic concepts like
Editor
,Block
,Fragment
,Widget
, and definitive guides on how they combine. The currentDocEditor
andEdgelessEditor
are based on this headless framework layer. - Based on BlockSuite headless, the accompanying front-end framework has been switched from lit to atomico for the experimental editor abed. This proves the feasibility of using the BlockSuite framework independently of specific front-end frameworks. We're also embracing React, Vue, and more diverse front-end frameworks, and there's more to come in terms of framework adaptation!
- Completely rewritten BlockSuite framework tutorial and architectural exploration documentation, also available in Chinese for convenience.
We've also switched to the new home page blocksuite.io, welcome to give it a spin!
The establishment of the framework layer is just the first step in BlockSuite's longer-term vision. The current stable framework layer modules and APIs are still akin to the more low-level, headless part of tools like ProseMirror. Plans are already in place for more out-of-the-box preset support. Stay tuned!
Notable Product Features in 0.11
- Support for Linked Page Previews (#5813): Added the basic functionality to support linked page previews in the Table of Contents (TOC), enhancing user navigation experience.
- Enhanced Bookmark Functionality (#5636): Improved the bookmark block to appear directly at the top level of the edgeless canvas, simplifying the process of pasting elements into the whiteboard.
- Consistent Dragging Behavior (#5613): Improved the consistency of dragging behavior, support dragging paragraphs and images outside of the note block.
- Frame Sidebar Support (#5584): Added support for frame sidebars fragment, which brings more intuitive control in edgeless editor.
- Frame Navigator Optimization (#5498): Optimized the frame navigator, enhancing user navigation efficiency and experience.
- New Table of Contents (TOC) (#5539): Introduced a new TOC fragment, enhancing document organization and navigation capabilities.
- Embed View for Certain Attachment Types (#5475): Added embed view support for certain attachment types, enhancing the presentation and interactivity of multimedia content.
Notable Framework Enhancements in 0.11
- Canvas Content Interleaving Based on
LayerManager
(#5347): Enabled canvas content interleaving with DOM based onLayerManager
, enhancing the editor's visual representation and flexibility. - Support for Multiple Editor Instances (#5878): Implemented support for multiple editor instances, increasing the flexibility and scalability of the editing environment.
- Vitest Browser Test Runner (#5536): Added the DOM-based Vitest browser test runner, making easier for writing integration tests.
- Support for Custom Inline Nodes (#5909): Introduced the custom
InlineSpec
feature, enhancing flexibility in text editing, especially for advanced content editing like inline LaTeX. - Surface Elements API (#5874): Introduced a new surface elements API, avoid raw
Y.Map
manipulations. - Replaced Export Manager (#5934): Fully removed the last part of legacy
ContentParser
and introduced a new export manager based on snapshot and adapter mechanisms, greatly enhancing support for third-party formats and scalability. - Persisting Editing Session State (#5804): Implemented the temporary storage of user toolbar options and other temporary states through
SessionStorage
, enhancing usability in frequent switching scenarios. - Multi-Instance Selection Enhancement (#5852): Refactored the surface selection mechanism to support multiple instances, making the
SurfaceSelection
inEdgelessEditor
more aligned withDocEditor
. - Optimized Zoom In/Out Performance (#5791): Performance optimization for zoom in and out functionalities, improving response speed and smoothness.
- Inline Editor Renaming (#5671): Renamed
VirgoEditor
toInlineEditor
to more accurately reflect its functionality. - Stash and Pop for Reactive Proxy (#5627): Introduced
stash
andpop
functionalities for reactive proxies, making state management of local non-collaborative fields easier. - Splitting Editor Container into Sub-Editors (#5612): Divided the
EditorContainer
into multiple sub-editors, improving manageability and modularization. - Editor and Presets Package Reorg (#5570): Renamed
@blocksuite/editor
to@blocksuite/presets
to more accurately reflect its function and purpose. - Embed Block Helper (#5518): Added an
createEmbedBlock
helper API in@blocksuite/blocks
, simplifying the creation and management of embedded content.
Detailed Bugfixes
- fix: update fonts cdn @Flrande (#5499)
- fix: flaky test @Saul-Mirone (#5555)
- fix: types for this @lawvs (#5557)
- fix: embed portal regex @Saul-Mirone (#5573)
- fix: format-bar custom elements @doouding (#5254)
- fix: update reference id in group and connector in replaceIdMiddleware @regischen (#5616)
- fix: incorrect page tag popup position on zooming @kimhyeonju (#5457)
- fix: update format bar styles @lawvs (#5651)
- fix: snapshot empty @Saul-Mirone (#5692)
- fix: doc site sandbox config @doodlewind (#5701)
- fix: style configuration of the document’s code-sandbox @zqran (#5706)
- fix: toast font @lawvs (#5711)
- fix: transformer won't work for nested props @Saul-Mirone (#5733)
- fix: style for embed github block @Saul-Mirone (#5737)
- fix: eslint ignore patterns @AyushAgrawal-A2 (#5735)
- fix: markdown table view format workaround @nawbc (#5726)
- fix: flaky test @AyushAgrawal-A2 (#5743)
- fix: model should emit change after setting value @Saul-Mirone (#5768)
- fix: element handling with
getPageByElement
in doc & edgeless @AyushAgrawal-A2 (#5771) - fix: date-fns import @doodlewind (#5777)
- fix: replace
\r
for windows in clipboard @zqran (#5764) - fix: forward specs to editor @lawvs (#5809)
- fix: update CFW url for querying url data from bookmarks and make it support external overrides @Flrande (#5811)
- fix: drag handle ui bugs @AyushAgrawal-A2 (#5815)
- fix: drag handle throttle @AyushAgrawal-A2 (#5823)
- fix: bookmark og image size @Flrande (#5827)
- fix: replace id issue for page ref @pengx17 (#5883)
- fix: should not reload bookmark when title is not empty @Flrande (#5882)
- fix: complete draghandle fixme @AyushAgrawal-A2 (#5895)
- fix: store exports @Saul-Mirone (#5902)
- fix: export more types from store @Saul-Mirone (#5903)
- fix: should not relay on business logic in block std @Saul-Mirone (#5913)
- fix: drag handle error on using standalone host @doodlewind (#5914)
- fix: doc dragging area in multiple editors @Saul-Mirone (#5915)
- fix: export png error and rich text format confusion @donteatfriedrice (#5945)
- fix(database): table view progress filtering @sseooh (#5454)
- fix(database): edit view modal position is wrong @zzj3720 (#5522)
- fix(database): column repeated setting to text type causes an error @zzj3720 (#5540)
- fix(database): detail panel position auto update @zzj3720 (#5675)
- fix(database): date cell cannot display date picker again @zqran (#5846)
- fix(edgeless): unable to render image in surface-ref @doouding (#5488)
- fix(edgeless): consider containerOffset when auto-panning @donteatfriedrice (#5492)
- fix(edgeless): reset note observer @regischen (#5494)
- fix(edgeless): copy-as-png not work for nested frame @regischen (#5495)
- fix(edgeless): image keep aspect ratio when resize @regischen (#5505)
- fix(edgeless): export surface-service @regischen (#5509)
- fix(edgeless): incorrect bound size filter @regischen (#5516)
- fix(edgeless): image inside frame cannot be copied as png @donteatfriedrice (#5519)
- fix(edgeless): add edgeless blocks in adapters @fourdim (#5532)
- fix(edgeless): remove redundant template @regischen (#5535)
- fix(edgeless): copy as png for frame and image @regischen (#5546)
- fix(edg...
v0.10.0 - Almost Beta!
The v0.10.0 release of BlockSuite includes a total of 246 PRs and welcomes 10 new contributors. Besides the continuous enhancement of the framework and more product features for the prebuilt AFFiNE editors, with an increased number of bug fixes and broader usage in production environments, we believe BlockSuite has been very close to its beta stage. This signifies:
- For first-party editors based on BlockSuite, their stability is now sufficient for production environment usage, and common functionalities are covered by E2E tests. Notably, about 20% of the BlockSuite codebase are test cases, ensuring a robust and reliable experience. Except for a few edge cases, interactions like selection and shortcuts should mostly align with intuition during typical operations.
- The architecture of the block-editing framework is now established, with best practices for operation data flow and event stream determined. Some legacy logic will be gradually refactored and removed, such as the
_legacy
directory in the@blocksuite/blocks
package. Documentation about the relevant API surface is being continuously improved. However, understanding the usage for customizing blocks and extending selections may still require code consultation at this point. - Subsequent releases may still feature API breaking changes, but data will continue to be forward compatible.
We plan to enter the beta phase of BlockSuite in the next upcoming release. Exciting updates are on the way!
Below is a brief overview of the framework improvements and editor features in 0.10.0:
Framework Refinements
- Enhanced Documentation (#5263): Added comprehensive API documentation for key packages and updated getting started guides to align with new API designs. The BlockSuite documentation site has also been vastly updated.
- Page Load Callback Functionality (#5325): The new
page.load
API distinguishes between creating and loading documents, offering more precise control. Details are provided in the BlockSuite Data Persistence Tutorial. - Partial Update Support in Store (#5396): Refactored the store event stream to support incremental updates to nested object structures, removing events that could lead to leakage of underlying Yjs abstractions.
- Optimized Batch Drag Update Size (#5272): Optimized the batch drag update size to reduce redundant ydoc writes, minimizing the update patch sizes in collaborative edits.
- Recursive Deletion in
deleteBlock
(#5224): ModifieddeleteBlock
to allow recursive deletion of child nodes by default, with configurable behavior. - Garbage Collection in Blob Manager (#5196): The
BlobManager
now actively removes unlinked resources, enhancing efficiency in resource management. - Configurable Block-Level Config (#5158): Support for dynamic configuration (e.g., maximum file size for attachment block) via service config.
Editor Features
- Surface Reference Block (#5013): The new
affine:surface-ref
block enables embedding whiteboard frames or groups into the document mode. - Grouping Capability in Edgeless (#5069): Enhanced ability to group edgeless elements, with support for nested groupings.
- New Style Collapsible Note in Edgeless (#5337): Edgeless now supports note blocks with various shadow, corner, and border styles, including preset effects for visually rich notes.
- Per-Element Selected Box in Edgeless (#5322): Multi-selection now shows individual selection boxes for each selected element, enhancing clarity in grouped selections.
- Auto-Connect Indicator and Index Label (#5136): Automatically connects and indexes content visible in document mode, enhancing navigational clarity.
- New Connector Addition Method (#5161): Introduces a new way to add connectors by dragging with an auto-complete button, along with widgets for easy connector shape selection.
- Optimized Double Click for Canvas Text Edit in Hollow Shapes (#5043): Enhanced click detection for text-filled shapes, preserving transparency effects for easier selection of elements beneath hollow shapes.
- Extended Font Support in Canvas Text (#5339): Introduced new preset fonts like Satoshi, Lora, and Bebas Nene, alongside an updated toolbar UI for easier font adjustments.
- Revamped Text Highlighting (#5434): Enhanced text highlighting now allows setting the text color itself, not just the background color.
- Expanded Connector Arrow Styles (#5064): Added new connector endpoint styles including Triangle, Circle, and Diamond.
- Linked Page Creation from Selected Text (#5171): Quickly create and link new pages from selected text using a simple keystroke.
- Refined Indent Behavior (#5072): Improved indent behavior for maintaining child node hierarchy more intuitively.
Detailed Bugfixes
- fix: new clipboard will auto merge type for empty paragraph @Saul-Mirone (#5124)
- fix: update test cases links @fourdim (#5142)
- fix: surface-ref interaction && failed test in AFFiNE @doouding (#5242)
- fix: aligning lit version @doouding (#5251)
- fix: allow unbound variable in publish @fourdim (#5266)
- fix: unset eux for publish.sh @fourdim (#5268)
- fix: unset eu on nightly version script @fourdim (#5277)
- fix: failed to format text with color in database @Flrande (#5288)
- fix: sync
PageMeta.title
withPageBlockModel.title
while importing markdown files @hyf0 (#5297) - fix: triple click issue @pengx17 (#5363)
- fix: delete should happen after copy when cut in new clipboard @Saul-Mirone (#5365)
- fix: backwards compatible with remote selection @lawvs (#5364)
- fix: size report workflow @Rachit1313 (#5412)
- fix: blockUpdated flavour error @regischen (#5435)
- fix: fix note data compatibility @regischen (#5437)
- fix: flaky test on image import @fourdim (#5467)
- fix(database): kanban add button hover animation where :has is not supported @AyushAgrawal-A2 (#5350)
- fix(database): incorrect tag modal position @mingjuu (#5452)
- fix(edgeless): improper handler removement @fourdim (#5054)
- fix(edgeless): fix
copyAsPng
not work @zqran (#5062) - fix(edgeless): register services @regischen (#5071)
- fix(edgeless): frame to image @doouding (#5073)
- fix(edgeless): can't click frame in affine @regischen (#5084)
- fix(edgeless): style frame @regischen (#5074)
- fix(edgeless): incomplete content export @fourdim (#5093)
- fix(edgeless): collaborators unable to view images after upload @Flrande (#5098)
- fix(edgeless): frame ui style @regischen (#5102)
- fix(edgeless): connector not follow image @regischen (#5099)
- fix(edgeless): unselect database cell when click blank area @donteatfriedrice (#5104)
- fix(edgeless): position of dragged shape @lzlme (#5106)
- fix(edgeless): frame container zindex @regischen (#5110)
- fix(edgeless): group hotkey and show title at init @regischen (#5121)
- fix(edgeless): edgeless toolbar submenu tooltip position @donteatfriedrice (#5123)
- fix(edgeless): label flickering when switching shape style @lawvs (#5125)
- fix(edgeless): limit initial zoom ratio @donteatfriedrice (#5130)
- fix(edgeless): keep component toolbar in viewport @donteatfriedrice (#5141)
- fix(edgeless): should not zoom on pressing enter during editing @regischen (#5173)
- fix(edgeless): group can't be connected @regischen (#5192)
- fix(edgeless): shape text init font family should be consistent with shape style @donteatfriedrice (#5207)
- fix(edgeless): ellipse nearest point and relative point location @regischen (#5182)
- fix(edgeless): text editor should not have minWidth without adjusting width @donteatfriedrice (#5212)
- fix(edgeless): export pdf incomplete @EYHN (#5216)
- fix(edgeless): fix screen ratio not right after presentation @regischen (#5222)
- fix(edgeless): fix frame not update in collaboration @regischen (#5232)
- fix(edgeless): optimize shape text color when shape is transparent @donteatfriedrice (#5244)
- fix(edgeless): group copy & paste @regischen (#5250)
- fix(edgeless): remove shape overlay when element disconnect @lawvs (#5275)
- fix(edgeless): auto connect for ref block @regischen (#5233)
- fix(edgeless): layout shift when switching editor mode @doouding (#5287)
- fix(edgeless): frames update in navigation @regischen (#5304)
- fix(edgeless): local xywh update slots @regischen (#5308)
- fix(edgeless): set default shape style as general type and text font-family as sans-serif @donteatfriedrice (#5314)
- fix(edgeless): fix group copy as png @regischen (#5320)
- fix(edgeless): local record issue @doouding (#5311)
- fix(edgeless): group load order @regischen (#5340)
- fix(edgeless): reset cursor when the selection changes @lawvs (#5378)
- fix(edgeless): for group element, apply local record update recursively @AyushAgrawal-A2 (#5393)
- fix(edgeless): prevent duplicate font faces @Flrande (#5398)
- fix(edgeless): add font isolation on canvas text @Flrande (#5403)
- fix(edgeless): remove fractional digits part of font size @Flrande (#5406)
- fix(edgeless): hand mode in share page @regischen (#5401)
- fix(edgeless): note component toolbar update @regischen (#5413)
- fix(edgeless): duplicated remote cursor @doouding (#5410)
- fix(edgeless): change navigator icon @regischen (#5414)
- fix(edgeless): toolbar right-side clipping position @alpakaka0o0 (#5453)
- fix(edgeless): undo not work for note style change @regischen (#5473)
- fix(page): incorrect cursor position when click slowly @lawvs (#5045)
- fix(page): enter key should as expected after setting heading by shortkey @lzlme (#5002)
- fix(page): user should be able to expand toggle list in readonly mode @lawvs (#5066)
- fix(page): copy multiple times in list when no text selection @fourdim (#5114)
- fix(page):
getPreviousBlock
not works as expected when there are several notes @Flrande (#51...
v0.9.0
🔥 The BlockSuite 0.9.0 release incorporates over 300 PRs and welcomes 5 new contributors. Over the past weeks, we have not only continued to ship the functionalities in AFFiNE, but also landed significant enhancements in editor infra.
Editor Infrastructure
Many of the APIs mentioned below have yet to be fully clarified. We'll prioritize updating the documentation in the next release.
BlockTransformer
(#4191) establishes a standardized block structure conversion API. This module is beginning to replace the existingContentParser
specific to markdown and HTML. It offers more reliable transformations for third-party data structures and isomorphically supports both clipboard actions and data import/export (#4757). Based on the block transformer, the new markdown adapter (#4624 #4797) implements markdown compatibility targeting block snapshots usingunified
andmdast
.- The new
BlockSnapshot
format (#4609 #4614) allows storing a workspace or page as a JSON block tree. This format, built on the block transformer foundation, serves as an equivalent alternative to CRDT binary and supports packaging it with blob content into a zip-formatted block bundle. - The new
CommandManager
facilitates the registration and reuse of a set of block operations, with support for chained calls, better modeling complex updates to the block tree (#4471 #4626). - The Virgo-based
RichText
component offers out-of-the-box controls for undo/redo and clipboard actions, positioning it as a replacement for the more low-level virgo-input component (#4956). - Existing workspace methods have been segregated based on the addon concept (#4492).
Edgeless Editing Features
- Direct insertion of image blocks at the top level of surface blocks without the need for encapsulation within note blocks is now supported (#4894).
- Frame blocks can be inserted at the surface block top level, serving as a substitute for the previous frame element (#4711).
- Elements can now be connected using curved connectors (#4516).
- A new note can be swiftly created on a selected note (#4881).
- Multi-selection alignment of elements is now available (#4456).
- Transitioned to a transformer-based clipboard (#5023).
Document Editing Features
- Display of YouTube-style embed bookmark block types is now available (#4523).
- Popups featuring secure triangle areas and transitions have been introduced (#4965 #4958).
Database Editing Features
- Group view is now supported (#4727).
- A new filter-usable UI has been introduced (#4339).
- There's support for an independent preview modal (#4628).
Other Notable Updates
- Rendering performance for edgeless has been optimized (#4746 #4939).
- The original phasor package has been integrated into the edgeless editor (#4518).
Detailed Bugfixes
- fix: remove block by slash menu should remove children @lawvs (#4465)
- fix: some text is missing when exporting to png @zuoxiaodong0815 (#4477)
- fix: format bar flash @lawvs (#4490)
- fix: icon button active styles @lawvs (#4496)
- fix: try add new block first when transform block @lawvs (#4505)
- fix: native wrapper @Saul-Mirone (#4510)
- fix: playground migration @Saul-Mirone (#4513)
- fix: surface data should be shallow y map @Saul-Mirone (#4519)
- fix: attachment extension parsing error @lawvs (#4536)
- fix: hide format bar when non text block selected @lawvs (#4539)
- fix: update import path in tests @fourdim (#4548)
- fix: lost content with duplicate note action in edgeless @zuoxiaodong0815 (#4552)
- fix: keymap should only be triggered without composition @Saul-Mirone (#4554)
- fix: cursor after undo of a block markdown convert should after space @Saul-Mirone (#4555)
- fix: global select all behavior @Saul-Mirone (#4557)
- fix: error button color @lawvs (#4574)
- fix: import notion embed block @zuoxiaodong0815 (#4514)
- fix: import notion embed block @zuoxiaodong0815 (#4587)
- fix: database selection is not registered in edgeless mode @Flrande (#4598)
- fix: consistent font family variable @lzlme (#4606)
- fix: revoke object url after export @Saul-Mirone (#4647)
- fix: image filename in card view @adityash1 (#4583)
- fix: release only generated files @himself65 (#4654)
- fix: flaky edgeless test @Saul-Mirone (#4662)
- fix: copy image in image selection @lawvs (#4669)
- fix: read-only ux @doouding (#4635)
- fix: container keymap vrange can be null @Saul-Mirone (#4679)
- fix: add selection test for markdown inline @Flrande (#4688)
- fix: playground edgeless bug @regischen (#4718)
- fix: hide toolbar on read-only mode @lawvs (#4719)
- fix: auto scroll into view @Flrande (#4715)
- fix: modal-widget style @doouding (#4713)
- fix: edgeless slide menu horizontal scroll @lzlme (#4733)
- fix: playground error log @lawvs (#4760)
- fix: remove unused padding @himself65 (#4766)
- fix: each image should be resizable @donteatfriedrice (#4767)
- fix: input element not works in edgeless mode @Flrande (#4790)
- fix: error when drag image @lawvs (#4791)
- fix: add page bottom drop area for block hub @zqran (#4789)
- fix: wrong behavior in
option + delete
@Flrande (#4804) - fix: v-range incorrect when select child block @Flrande (#4822)
- fix: database cell wrong id after import from snapshot @Saul-Mirone (#4828)
- fix: doc remote selection should be updated when resize @Flrande (#4833)
- fix: image flashing when resizing in edgeless @lawvs (#4849)
- fix: change portal z-index @WBbug (#4882)
- fix: update attachment after theme change @lawvs (#4889)
- fix: disable prettier for ledit template @doouding (#4891)
- fix: fix errors in next.js @yunnian (#4709)
- fix:
asyncGetRichTextByModel
may fail @Flrande (#4885) - fix: improve embed related style @Flrande (#4909)
- fix: block hub z-index @lzlme (#4934)
- fix: useless update data sent when new client joining @Flrande (#4995)
- fix: improve bracket auto complete @lzlme (#4997)
- fix: unexpected bridge display @lawvs (#5044)
- fix: edgeless font family @lzlme (#5049)
- fix: fix and refactor page-level migration associated with surface block @Flrande (#5050)
- fix(database): database can not scroll in edgeless mode @zzj3720 (#4599)
- fix(database): some database drags trigger doc selection @zzj3720 (#4740)
- fix(database): case sensitive for menu labels @zzj3720 (#4744)
- fix(database): structuredClone unable to clone Proxy @zzj3720 (#4756)
- fix(database): moving to ungrouped logic is wrong when group by multi-select @zzj3720 (#4776)
- fix(database): replace selected text content when pasting @zqran (#4817)
- fix(database): dragging from the menu to modal mask should not close the menu @zzj3720 (#4855)
- fix(database): can not edit in detail panel @Flrande (#4856)
- fix(database): don't use variables outside of class @Flrande (#4862)
- fix(database): detail panel close button covered by the top bar @zzj3720 (#4876)
- fix(database): wrong behavior when paste empty string to select column @zzj3720 (#4900)
- fix(database): drag preview style wrong @zzj3720 (#4902)
- fix(database): menu input triggers 1password @zzj3720 (#4910)
- fix(database): drag-handle of column blink when mouse enter right @CatsJuice (#4920)
- fix(database): zoom bug, date format bug and can't open detail panel in edgeless mode @zzj3720 (#5038)
- fix(edgeless): fix connector xywh updates @regischen (#4462)
- fix(edgeless): make tooltip with shortcut conform to design @CatsJuice (#4484)
- fix(edgeless): round the triangle of tooltip @CatsJuice (#4481)
- fix(edgeless): fix frame related bugs @regischen (#4491)
- fix(edgeless): align connector component toolbar ui with design @donteatfriedrice (#4493)
- fix(edgeless): fix elbow connector path @regischen (#4520)
- fix(edgeless): fix connector migration @regischen (#4528)
- fix(edgeless): lost content with duplicate note action in edgeless #4521 @BangKk (#4529)
- fix(edgeless): canvas text editor rotation @LittleSound (#4556)
- fix(edgeless): slicer should be put into
affine-edgeless-layer
@doouding (#4581) - fix(edgeless): edgeless toolbar left part icon activation state @donteatfriedrice (#4600)
- fix(edgeless): press backspace should not delete text or shape element when changing text font size @donteatfriedrice (#4704)
- fix(edgeless): set borderRadius when select single note @WBbug (#4714)
- fix(edgeless): isolate the impact of widgets on the layout @doouding (#4738)
- fix(edgeless): toolbar z-index @doouding (#4749)
- fix(edgeless): double click to add text should use color last selected @donteatfriedrice (#4780)
- fix(edgeless): duplicate remote selection @doouding (#4803)
- fix(edgeless): note does not update when other peers modified note @doouding (#4808)
- fix(edgeless): fix alt drag test @regischen (#4814)
- fix(edgeless): optimize connector enter tangent @regischen (#4908)
- fix(edgeless): unexpected text resize behaviour @doouding (#4912)
- fix(edgeless): close zoom bar when click blank area @donteatfriedrice (#4929)
- fix(edgeless): fix frame add bug @regischen (#5016)
- fix(edgeless): remote selection mispositioning @doouding (#5028)
- fix(edgeless): content shifts when mounting shape text editor @donteatfriedrice (#5029)
- fix(edgeless): viewport move when pen @regischen (#5037)
- fix(edgeless): fix frame title when inputting Chinese use Enter key @luke358 (#5048)
- fix(page): remove children when selecting list and delete @lawvs (#4457)
- fix(page): disable action in image when readonly @lawvs (#4458)
- fix(page): hide drag handle when viewport element resize @donteatfriedrice (#4466)
- fix(page): incorrect top position when in and out drag handle quickly @donteatfriedrice (#4502)
- fix(page): viewport jilter when drag to left-bottom and cannot insert to page bottom from block-hub @donteatfriedrice (#4509)
- fix(page): keyboard move block @lzlme (#4467)
- fix(page): potential prototype-polluting assignmen...
v0.8.0
🎉 Announcing BlockSuite 0.8.0! This version is bundled in AFFiNE 0.8.0, incorporating over 500 new merged pull requests and 12 new contributors. In the past weeks, we have refactored the selection data flow of the editor, together with multiple new editing functionalities. Highlights:
Selection Manager Refactoring
In 0.8.0, we rewrote the selection manager following the block spec RFC (#3165). All selections could be created, managed and shared by the same data flow now.
The new selection follows the unidirectional data flow. Which means all selections on page will be stored as a piece of selection data called selection model.
- The blocks can subscribe to the changes of the selection models and render them as what they want.
- Every time users select something else on the page, the selection model will be updated first.
- Then, the blocks know the models are updated and they will try to rerender the selections.
An example of selection model:
TextSelection {
type: 'text',
group: 'note',
from: {
path: ['some-block-parent-id', 'some-block-id'],
index: 5,
length: 20,
},
to: {
path: ['some-other-block-parent-id', 'some-other-block-id'],
index: 0,
length: 30
}
}
BlockSelection {
type: 'block',
group: 'note',
path: ['some-block-id'],
}
SurfaceSelection {
type: 'surface',
group: 'edgeless',
path: ['some-block-id'],
elements: ['shape-circle'],
}
In BlockSuite, this piece of data is stored in the Yjs awareness store to make sure it can be shared between clients to support remote selection. This also makes the support of the undo
and redo
features work as expected.
Block Schema
The new block-level migration API is introduced, usage:
import { Schema, Workspace } from '@blocksuite/store';
const schema = new Schema();
schema.register(AffineBlocks);
// Migration can run without workspace
schema.upgradePage(oldBlockVersions, oldYDoc);
// create workspace with schema
const workspace = new Workspace({ schema });
See #3826 for the guide writing migrations.
Also, the model proxy now supports defining plain JSON types using NativeWrapper
, instead of mapping nested array and objects into their Y-alternatives. See #4020 for the detailed usage.
Block UI Components
In @blocksuite/blocks
, the new createLitPortal
and createSimplePortal
API can be used to create portals in editor (#3830 #4291). The new computePosition
option is supported, so as to place the tooltips and popups in proper position.
In @blocksuite/virgo
, there are also new APIs:
- Introduced
createVirgoKeyDownHandler
, facilitating the development of logic for the keydown event (#4279). - Added hooks support, allowing for the injection of default behavior into Virgo (#4386).
- Introduced
isEmbed
options that allows treating a text node as a unified entity, which can be selected or removed entirety (#3659).
Doc Editing Functionalities
- Supported the new
affine:attachment
block flavour (#2952). - Updated the new drag handle (#3695 #3162 #4314).
- Supported text highlight (#3961).
- Supported image files in exported HTML and markdown (#3791).
Edgeless Editing Functionalities
- Supported the new frame element (#3701).
- Supported full screen presentation mode (#4101).
- Supported ToC panel for notes (#3138).
- Supported flowchart auto-complete creation (#3596).
- Supported moving element using arrow keys (#4143).
- Adapted to the new selection manager (#3693).
- Reduced re-rendering (#4276 #3911 #3823).
- Updated connector and shape toolbar UI (#3714).
Database Editing Functionalities
- Added the new kanban view (#2401).
- Added the new header UI (#3868).
- Supported clipboard operations under custom database selection (#2309).
Playground and Package Infra
- New local-first playground with multi-player collaboration support (#3589 #3776). This entry is
localhost:5173
while the previous entry with different starter templates are located inlocalhost:5173/starter/
. - The circular dependencies in the project has been fully cleared (4214).
Detailed Bugfixes
- fix: missing img inside figure element @fourdim (#3591)
- fix: unable to paste within the codeblock @fourdim (#3624)
- fix: typo @lzlme (#3633)
- fix: cursor position based on triggered location @lzlme (#3638)
- fix: copy as PNG format error on windows @zuoxiaodong0815 (#3667)
- fix: cannot read properties of undefined (reading schema) @zhe-he (#3668)
- fix: remove focus after paste @fourdim (#3762)
- fix: meta should not write to crdt when initializing @Saul-Mirone (#3774)
- fix: surface block version should be 4 @Flrande (#3792)
- fix: add polyfill for Intl.Segmenter @fourdim (#3795)
- fix: import ext @himself65 (#3807)
- fix: playground not working on firefox @pengx17 (#3824)
- fix: range controller regression @Saul-Mirone (#3833)
- fix: edgeless selection won't be cleaned up when switching mode @Saul-Mirone (#3859)
- fix: headings should not match the space hotkey @fourdim (#3875)
- fix: clean custom trigger key in widgets @lawvs (#3878)
- fix: use the set on
AffineFormatBarWidget
@himself65 (#3880) - fix: range sometimes blink when dragging @Saul-Mirone (#3895)
- fix: scrollbar style pollution global @lawvs (#3894)
- fix: use old arrow navigation @Saul-Mirone (#3900)
- fix: container offset cause wrong range @Saul-Mirone (#3901)
- fix: block hub style @Garfield550 (#3919)
- fix: click to select block element @lawvs (#3933)
- fix: align arrow icon in page info @RajeevDash007 (#3905)
- fix: added base UI font family to the Menu of edgeless @RajeevDash007 (#3910)
- fix: typo @Flrande (#3944)
- fix: remain editing state when drag and drop in edgeless mode @donteatfriedrice (#3947)
- fix: remove box-shadow when exporting png @zuoxiaodong0815 (#3951)
- fix: unique guid for crossing workspace @himself65 (#3960)
- fix: clear mock selection when link not confirm @wiirhan (#3956)
- fix: updated font family of toolbar and more button @RajeevDash007 (#3954)
- fix: remove box-shadow when exporting png @zuoxiaodong0815 (#3983)
- fix: cut event for page title @Saul-Mirone (#3985)
- fix: fix bugs and enable tests related to format-bar @Flrande (#3990)
- fix: updated the UI of the buttons of Import Dialog Box @RajeevDash007 (#3995)
- fix: image caption selection issue @Saul-Mirone (#4000)
- fix: backlink icon color @lawvs (#4002)
- fix: no scrollbar for tags when creating many tags @zzj3720 (#4039)
- fix: attachment z index @lawvs (#4049)
- fix: fix
getSelectedBlockElementsByRange
@Flrande (#4053) - fix: select all in cell @Saul-Mirone (#4071)
- fix: selection on db click when container has offset @pengx17 (#4083)
- fix:
rangeManager.value
should be null when no range @Flrande (#4078) - fix: clipboard test cases @zuoxiaodong0815 (#4098)
- fix: can not fully show bookmark menu in tiny screen @QiShaoXuan (#4096)
- fix: docs build @doodlewind (#4110)
- fix: added border radius to page tag selector @RajeevDash007 (#4111)
- fix: shift click range after input @Saul-Mirone (#4122)
- fix: ime in edgeless @Saul-Mirone (#4127)
- fix: unable to copy and paste under multi lines of text selection @zuoxiaodong0815 (#4123)
- fix: format-bar position not follow edgeless viewport @Flrande (#4149)
- fix: aligned arrow icon to the center of the font size container @RajeevDash007 (#4095)
- fix: typography when multiple line in list @lawvs (#4152)
- fix: turn into code block cause error @Saul-Mirone (#4189)
- fix: missing table view after importing database @zuoxiaodong0815 (#4130)
- fix: optimize hasChanged for block element @lawvs (#4187)
- fix: support importing highlighted text from Notion @zuoxiaodong0815 (#4197)
- fix: should open the right page after importing notion @zuoxiaodong0815 (#4203)
- fix: the page should be created when which is needed @zuoxiaodong0815 (#4207)
- fix: node import @Saul-Mirone (#4218)
- fix: typography styles @lawvs (#4231)
- fix: arrow breaks IME input @Saul-Mirone (#4234)
- fix: the missing page reference in the first row @fourdim (#4237)
- fix: can not run blocksuite's toast function when not open a page in affine @zuoxiaodong0815 (#4236)
- fix: title column error when importing notion database @zuoxiaodong0815 (#4246)
- fix: can not import when just only csv file @zuoxiaodong0815 (#4256)
- fix: copy title @fourdim (#4262)
- fix: cannot read properties of undefined (reading 'insert') in yjs @fourdim (#4267)
- fix: correct misspelled words @dengquan (#4274)
- fix: tsconfig 'module' must be set to 'NodeNext' when 'moduleResolution' is set to 'NodeNext @fourdim (#4265)
- fix: search might not work @himself65 (#4295)
- fix: transform database title into doublelink when importing notion markdown @zuoxiaodong0815 (#4283)
- fix: editor doesn't use block presets from property @Vija02 (#4288)
- fix: should not sync range to text-selection when it is out of note @Flrande (#4317)
- fix: pen line width display error @LittleSound (#4319)
- fix: nested list items are lost on pasting @zuoxiaodong0815 (#4316)
- fix: legacy import snapshot for edgeless @Saul-Mirone (#4334)
- fix: the image type is wrong inexported file @zuoxiaodong0815 (#4342)
- fix: use delta instead of text when importing db @fourdim (#4357)
- fix: select all for rich text @Saul-Mirone (#4360)
- fix: remove hardcode element tag name in lit @Saul-Mirone (#4380)
- fix: unchecked todo icon color @lzlme (#4405)
- fix: incorrect type of meta-data for page @zzj3720 (#4415)
- fix(block-std): avoid parent blocks to be called multiple times in dispatcher @s...
v0.7.0
🎉 Announcing BlockSuite 0.7.0! This version is bundled in AFFiNE Client 0.7-beta, incorporating 318 new merged pull requests and an addition of 7 contributors. In the past few weeks, we have significantly enhanced data persistence and whiteboard usability. Feature highlights:
- 📑 We now support subdocument in data model, facilitating async loading of multiple pages (#2948 #3157 #3221 #3082 #3176). This introduces the
page.waitForLoaded()
API and comes with novel provider adaptation support (#3182 #3186 #3193 #3073 #3190 #3200 #3201 #3222 #3213). - 🧩 We've added block spec support (#3175), which serves as the fundamental layer for forthcoming standardized third-party block definitions. This includes a new block-std package (#3164 #3179 #3261 #3297) and a work-in-progress widget API implementation (#3128 #3449 #3307).
- 🎨 We've enhanced whiteboard functionalities, including element rotation support (#2931 #3394), new connector (#3184 #3557 #3099 #3285 #3313 #3390 #3403 #3441 #3517), eraser tool (#3126), in-shape text functionality (#3423 #3386 #3521 #3554 #3573 #3552), a block slicer (#3314 #3343), and a redesigned toolbar (#3230 #3335 #3382 #3465 #3309 #3464 #3380 #3388 #3410 #3262 #3258).
- 🏷️ We've launched new page-level tag support (#3203), which can operate as a cross-page data source, complete with filtering capabilities (#3065).
- 📤 We've incorporated support for exporting to PDF and PNG (#3047 #3072 #3205 #3502 #3534 #3450 #3494).
So far, the primary focus of the BlockSuite project has been on feature-richness. However, with the next major release, we plan to make the editing feature more adaptable with a new API surface. Stay tuned!
Detailed Commits
- build: release package
block-std
@himself65 (#3179) - build: fix module exports @himself65 (#3196)
- build: fix output types @himself65 (#3197)
- build(store): compatibility with moduleResolution
Node
@himself65 (#3199) - chore: modify the size of the importIcon and add a hover effect to it @HydenLiu (#3039)
- chore: fix typo @HydenLiu (#3040)
- chore: upgrade pnpm in ci @Saul-Mirone (#3053)
- chore: update database tooltip content @doodlewind (#3067)
- chore: bump version @himself65 (#3120)
- chore: bump lock file version @fourdim (#3154)
- chore: disable note index by default @Flrande (#3334)
- chore: bump playwright @lawvs (#3409)
- chore: bump version @himself65 (#3452)
- chore: adjust delete item color @JimmFly (#3482)
- chore: spread url methods to common utils @QiShaoXuan (#3520)
- chore(edgeless): optimize tooltip text @doodlewind (#3364)
- ci: ignore coverage upload failed @lawvs (#3142)
- ci: add
lit-analyzer
@Flrande (#3168) - docs: update block desc @doodlewind (#3299)
- docs: update CLA @Yukiniro (#3311)
- docs: update CLA @AliceLanniste (#3438)
- docs: update CLA @youhua (#3547)
- docs: sign CLA @joshirakesh (#3564)
- docs: add release note automation script @doodlewind (#3574)
- feat: refactor to support multi-view and filter for database block @zzj3720 (#3010)
- feat: add block on clicking page bottom when necessary @QiShaoXuan (#3028)
- feat: add support for subdocuments @Saul-Mirone (#2948)
- feat: edgeless mode upload multiple images @donteatfriedrice (#3025)
- feat: export page to pdf file @zuoxiaodong0815 (#3047)
- feat: support pressing esc to select blocks @donteatfriedrice (#3035)
- feat: handling left key press for cursor transition from paragraph to page title @tillkwl (#2973)
- feat: support filter for the database block @zzj3720 (#3065)
- feat: export page to image @zuoxiaodong0815 (#3058)
- feat: support for indenting and unindenting multi-level blocks @donteatfriedrice (#3127)
- feat: the mouse pointer can become a gesture when dragging @zzj3720 (#3174)
- feat: optimizing line width icons in edgeless mode @donteatfriedrice (#3195)
- feat: support for adding tags to pages @zzj3720 (#3203)
- feat: use human-readable name in code block @lawvs (#3225)
- feat: support import notion database @fourdim (#3170)
- feat: show format-bar when click drag handler @lawvs (#2694)
- feat: delete empty subpages from import @fourdim (#3266)
- feat: rename bookmark property title to bookmarkTitle @QiShaoXuan (#3278)
- feat: improve page metadata UI @zzj3720 (#3275)
- feat: update edgeless toolbar ui and zoom bar position @donteatfriedrice (#3281)
- feat: hide toolbar when drag element move(#3271) @Yukiniro (#3310)
- feat: supports copying images and cross app pasting @fundon (#3318)
- feat: supports customizing the slash menu @lawvs (#3407)
- feat: modify style of bookmark and editor @QiShaoXuan (#3486)
- feat: add new css variable to control editor side padding @QiShaoXuan (#3491)
- feat(block-std): init package and move event dispatcher to std @Saul-Mirone (#3164)
- feat(block-std): add block spec @Saul-Mirone (#3175)
- feat(block-std): scaffolding new selection manager @Saul-Mirone (#3261)
- feat(blocks): support delete hotkey @Alkaidcc (#2552)
- feat(blocks): add page block service @Saul-Mirone (#3232)
- feat(database): support select option to modify color @zqran (#3015)
- feat(database): row selection uses pointer event instead of drag event @zqran (#3029)
- feat(database): drag inside the database without selecting the block @zqran (#3052)
- feat(database): save the last title being edited @zqran (#3101)
- feat(database): hide the tooltip of "+ New Record" button in edgeless mode @zqran (#3117)
- feat(database): set default width when dragging to create a database in edgeless mode @zqran (#3133)
- feat(database): save the last title being edited when add new column @zqran (#3134)
- feat(database): support modal display @zqran (#3167)
- feat(database): update the style of column-type arrow icon @zqran (#3211)
- feat(database): support
link
column type @zqran (#3187) - feat(database): title column hide
Move Right
@zqran (#3255) - feat(database): temporarily close the modal popup display @zqran (#3257)
- feat(database): update UI style @zqran (#3269)
- feat(database): hide the
Move Left
of the first normal column @zqran (#3354) - feat(database): optimize row selection @zqran (#3383)
- feat(database): remove the selection when deleting the cell @zqran (#3549)
- feat(edgeless): change text default color between themes @Flrande (#3007)
- feat(edgeless): add common math utils @regischen (#3009)
- feat(edgeless): add some utilies @regischen (#3034)
- feat(edgeless): update note border color @Flrande (#3057)
- feat(edgeless): edgless element drag snap @regischen (#2967)
- feat(edgeless): keep viewport state between mode switch @regischen (#3081)
- feat(edgeless): support drag canvas with middle button of mouse @doouding (#3146)
- feat(edgeless): edgeless earser tool @regischen (#3126)
- feat(edgeless): keep brush state in one session @regischen (#3161)
- feat(edgeless): support manage note index and hidden state @Flrande (#3177)
- feat(edgeless): update note ui @Flrande (#3185)
- feat(edgeless): support select element below the hollow shape @doouding (#3212)
- feat(edgeless): add index for other notes when selecting a note @Flrande (#3235)
- feat(edgeless): update toolbar ui @Flrande (#3262)
- feat(edgeless): improve toolbar ui @Flrande (#3258)
- feat(edgeless): support DnD images from outside into editor @fundon (#3123)
- feat(edgeless): support copy as PNG @fundon (#3072)
- feat(edgeless): connector @regischen (#3184)
- feat(edgeless): new edgeless tool bar @donteatfriedrice (#3230)
- feat(edgeless): support rotating shapes @fundon (#2931)
- feat(edgeless): toast message after copying to clipboard @fundon (#3337)
- feat(edgeless): support note clipping @doouding (#3314)
- feat(edgeless): optimize note cut interaction details @doouding (#3343)
- feat(edgeless): add overlay for note and shape tool @donteatfriedrice (#3335)
- feat(edgeless): click to add shape with shape tool @donteatfriedrice (#3382)
- feat(edgeless): support connecting rotated elements @regischen (#3394)
- feat(edgeless): support adding text in shape @Flrande (#3423)
- feat(edgeless): support pasting image in edgeless mode @zuoxiaodong0815 (#3445)
- feat(edgeless): migrate to lineWidthPanel for shape and connector @donteatfriedrice (#3459)
- feat(edgeless): complete canvas text component toolbar @donteatfriedrice (#3465)
- feat(slash-menu): insert database after the current block @zqran (#3102)
- feat(store): clarify different types of providers @himself65 (#3073)
- feat(store): lazy load spaces only when waitForLoaded is called @Saul-Mirone (#3082)
- feat(store): add workspace version in meta @Saul-Mirone (#3107)
- feat(store): let user control subdoc load timing after page meta added @Saul-Mirone (#3157)
- feat(store): init broadcast channel provider @himself65 (#3190)
- feat(virgo): support embed @Flrande (#3041)
- fix: unable to focus on image caption @lawvs (#3000)
- fix: link page menu active state @lawvs (#3038)
- fix: press enter in the middle of parent also indent children list @donteatfriedrice (#3046)
- fix: link page menu import icon @lawvs (#3054)
- fix: export two adjacent bookmarks produce one invalid url @donteatfriedrice (#3055)
- fix: ignore arrow key when select is composing @lawvs (#3076)
- fix: cannot drag to select the block @zqran (#3088)
- fix: exclude the current page from linked page popover @lawvs (#3114)
- fix: can not drop bookmark with new frame in edgeless from block-hub @QiShaoXuan (#3145)
- fix: notion import error on todo @fourdim (#3110)
- fix: handling backspace key press for cursor transition from paragraph to page title @zhengjitf (#3148)
- fix: text cannot be selected in edit mode @zzj3720 (#3173)
- fix: missing update in provider @himself65 (#3213)
- fix: edgeless text error when importing from snapshot @Saul-Mirone (#3229)
- fix: console error exporting PNG/P...
v0.6.0
🍬 We are excited to announce the release of BlockSuite 0.6.0! This version is shipped in AFFiNE Client 0.6.0, including 351 new pull requests merged and 18 more new contributors. In this version, we mainly focused on improving the usability of doc editing and whiteboard editing. Here are the updates:
- Architectural Updates
- Add event dispatcher for standardized DOM event handling @Saul-Mirone (#2680 #2691 #2722 #2725 #2754)
- Support schema validator for blocks @Saul-Mirone (#2291 #2317)
- Switch to single root block @Saul-Mirone (#2554 #2607 #2622 #2761)
- Add new
@blocksuite/lit
package for common UI components @Saul-Mirone (#2509 #2595) - Support co-existing of multiple editor instances @zzj3720 @lawvs (#2406 #2456)
- Use yjs-based data flow in phasor @Flrande (#2486)
- Editor Functionalities
- Database block @zqran
- New row-level selection and cell-level selection (#2561 #2612 #2656 #2665 #2705 #2769 #2902)
- New column type
checkbox
,progress
support (#2376 #2383 #2533 #2709) - Auto scroll on dragging support (#2531)
- New UI style improvements (#2330 #2356 #2476 #2487 #2526 #2543 #2562 #2587 #2598 #2613 #2633 #2733 #2894 #2896 #2919)
- Better
Enter
/Backspace
/Esc
and other keyboard operation support (#2455 #2458 #2701 #2736 #2768 #2975 #2962) - Hide clear icon when no search content (#2543)
- Click outside support (#2395)
- Preserve at least 1 blank row and empty state with 0 row (#2488 #2734)
- Support scaling in edgeless mode (#2758)
- Optimize interop with drag handle and format bar (#2773 #2828 #2936)
- Optimize the behavior of changing column types (#2900)
- Many other usability bugfixes (#2414 #2466 #2511 #2329 #2324 #2323 #2321 #2322 #2319 #2338 #2340 #2346 #2354 #2363 #2362 #2367 #2429 #2481 #2541 #2524 #2570 #2597 #2634 #2636 #2640 #2739 #2740 #2770 #2771 #2859 #2839 #2914 #2925 #2959 #2927 #2369)
- Bookmark block flavour that caches preview content of URLs @QiShaoXuan (#2693 #2906 #2940 #2827 #2818 #2871 #2912 #2951 #2980)
- Import and export
- Support Notion import @zuoxiaodong0815 (#2621 #2767 #2778 #2838 #2861 #2903 #2898 #2920 #2932 #2956 #2958)
- Add basic support for pdf and png export @fourdim (#2724 #2813)
- Fix code block export markdown and html @lzlme (#2637)
- Fix redundant list item line breaks on pasting rich content @zuoxiaodong0815 (#2494)
- Fix item in the middle of a unordered list disappears when backspace @zuoxiaodong0815 (#2506)
- Fix wrong format when paste a specify text @zuoxiaodong0815 (#2530)
- Fix part of what is copied in the list block is lost @zuoxiaodong0815 (#2538)
- Edgeless whiteboard improvements
- Optimize rendering perfmance by using page-level layer to replace block-level transform @fundon (#2700)
- Support canvas text rendering @Flrande (#2546 #2977 #2992 #2996 #2755 #2904 #2985 #2719 #2790 #2817 #2753 #2777 #2756 #2780 #2766 #2777 #2819 #2907)
- Support hand-drawn-like shape style @Flrande (#2575 #2584 #2696 #2808 #2721 #2590 #2591 #2565)
- Support switch to pan mode when holding right-key @fundon (#2512)
- Support delete shortcut to delete content @fundon (#2513)
- Support image uploads @fundon (#2610)
- Support support bring forward and send backward elements @fundon (#2527)
- Support smooth zoom and fit @regischen (#2765)
- Support dragging with
option
to duplicate element @regischen (#2843) - Support edge dragging on frame @fundon (#2895)
- Support select all via hotkey @blurname (#2789)
- Support
shift
+ click to multi-select @regischen (#2860) - Support shortcuts for zooming @fundon (#2911)
- Support proportional scaling with shift key @fundon (#2593)
- New connector line style @alt1o (#2310)
- Switch to
PointerEvent
with basic mobile compatibility @alt1o (#2269) - Split original block after drag out a block in edgeless mode @QiShaoXuan (#2477)
- Support max zoom @fundon @doodlewind (#2482 #2747)
- Auto add frame on click when no frame exists @regischen (#2905)
- Fix z-index for toolbar @karti16 (#2404)
- Fix continuous undo redo lost frame @regischen (#2965)
- Other UI improvements and usability bugfixes (#2731 #2675 #2676 #2678 #2717 #2699 #2833 #2857 #2875 #2917 #2571 #2714 #2596 #2626 #2420)
- Misc (common functionalities)
- Support automatic identify and convert link @QiShaoXuan (#2624)
- Add page command to the slash menu @lawvs (#2646)
- Code block supports fuzzy search @lawvs (#2387 #2516)
- Support input under block-level selection @QiShaoXuan (#2558)
- Click to add a paragraph block at the end of the page @rottenpen (#2410)
- Fix double click range error on blank area @donaldxdonald (#2585)
- Fix slash menu if insert "/" before select block @QiShaoXuan (#2999)
- Fix inline code or strikethrough error when hard enter @fourdim (#2642)
- Fix scrollbar not visible for code blocks @hritikchaudhary (#2659)
- Fix linked page popover CJK support @lawvs (#2413)
- Fix multi-line indentation @zzj3720 (#2397)
- Fix linked page keyboard shortcut not working on German keyboards @AlessioGr (#2371)
- Fix incorrect placeholder position for empty list parent @smallnine9 (#2845)
- Fix cursor position when using cmd+z hotkey @smallnine9 (#2881)
- Support shift-click @fundon (#2280)
- Fix code block scroll behavior when enter or backspace @lzlme (#2289)
- Store user can't define own root flavor @zzj3720 (#2292)
- Requires double enter to input a link @Lmmmmmm-bb (#2337)
- Press arrow-right works incorrect with multi-line selection @zzj3720 (#2352)
- Keep paragraph block's type when pasting excerpt text type (quote block) @PerfectPan (#2350)
- Init _cssVariables @donglixiaoche (#2420)
- Enable clipboard test cases in multiple editor @zzj3720 (#2427)
- Cleanup active editor when disconnected @himself65 (#2444)
- Support dragging block to blank @lawvs (#2469)
- Select texts when clicking on blank area @fundon (#2474)
- Ignore input event in code language filter @lawvs (#2501)
- Remove unreliable delimiter @lawvs (#2539)
- Fix wrong cursor position when pressing up/down in zoomed viewport @QiShaoXuan (#2532)
- Hide unregister flavour @lawvs (#2545)
- Fix wrong position in page mode after drag out a block in edgeless mode @QiShaoXuan (#2560)
- Slash menu insert image @lawvs (#2583)
- Press enter on title should add new line @Saul-Mirone (#2605)
- Hide divider in balloon toolbar @lawvs (#2604)
- Linked page trigger should not break bracket completion @lawvs (#2738)
- Fix deleting parent lost nested children @donteatfriedrice (#2969)
- Fix cursor pos when select multiple blocks and input @lawvs (#2983)
- Fix toolbar do not trigger in edgeless mode in some case @QiShaoXuan (#2995)
- Fix pasting code is not as expected @donteatfriedrice (#2993)
- Fix the block-hub toggle @imyuanx (#2655)
- Paste issue causing empty single-line block to not focus @boomyao (#2343)
- Fix input at left side of the bi-directional link will create redundant link @Flrande (#2348)
- Move cursor at the last line of the last block to the end @SevenOutman (#2418)
- Fix undo/redo in virgo-input @Flrande (#2568)
- Fix in title line, press key arrowdown will create a new line @donteatfriedrice (#2812)
- Do not convert markdown in quote block @donteatfriedrice (#2884)
- Database multi-select tab close icon invisible @donteatfriedrice (#2888)
- Fix number mode in virgo-input @Flrande (#2897)
- Shift-click in block level selects redundant blocks @donteatfriedrice (#2989)
- Optimize position of indicator in database @fundon (#2206)
- Fix position when hovering over border of database @fundon (#2674)
- Fix position when database has scrollLeft > 0 @fundon (#2683)
- Should not use native Text @Flrande (#2703)
- Sync debug menu color transition with content area on switching dark mode @Innei (#2825)
- Support responsive image block @fundon (#2224)
- Switch to PointerEvent @fundon (#2341)
- Don't show toolbar on selection @fundon (#2365)
- Schema validator of
moveBlocks
@zqran (#2366) - Support moving blocks in multiple frames @fundon (#2723)
- Fix input in the beginning of line may fail when inputting with IME @Flrande (#2287)
- Fix lit may be crashed by IME @Flrande (#2796)
- Fix arrow down not work well in zero-width character @Flrande (#2866)
- Move
calcDropTarget
method out of drag-handle @fundon (#2392) - UI stying optimization @JimmFly @zqran @Flrande (#2446 #2462 #2496 #2529 #2873 #2876 #2926 #2718 #2588 #2508 #2720)
- Database block @zqran
- Housekeeping
- Fix cyclic dependence in schema @himself65 (#2638)
- Remove duplicate shadowless element in block @Saul-Mirone (#2542)
- Unify editor theme from
@toeverything/theme
package @himself65 (#2412) - New element operation APIs @alt1o (#2347)
- Use typescript@5 const type param for
matchFlavours
@Saul-Mirone (#1786) - Remove redundant
transact
@Flrande (#2885) - Extract
AbstractEditor
for better typing @lawvs (#2448) - Add new
pageModeSwitched
slot @lawvs (#2452) - Refactor on database block code structure @zqran (#2372 #2394)
- Add
exportHtml
andexportMarkdown
@doodlewind (#2493) - Rename
transformPropertyValue
tocomputedValue
@Flrande (#2708) - Support JSON-based
importPageSnapshot
@doodlewind @Flrande @zzj3720 (#2359 #2972) - Add double click event dispatch for embed blocks @himself65 (#2328)
- Restore css debug menu @thorseraq (#2485)
- Add custom formatter for BaseBlockModel @lawvs (#2398)
- Support doc search @sxzz (#2373)
- Add custom elements slot in menu...
0.5.0
🍬 We're thrilled to announce the release of BlockSuite 0.5.0! This version is shipped in the first AFFiNE Client, including 660 pull requests merged from our vibrant community of developers, with 14 more new contributors. Here are some highlights of what you can expect from this release:
- 🔮 There is now support for nestable block model fields definitions.
- 🗄️ A new
DatabaseBlock
is available to use as a table. The data structure has been redesigned and moved to the block level. - 🔎 Cross-page indexing is possible through the
SearchIndexer
andBacklinkIndexer
. - 🎨 There are many enhanced edgeless and whiteboard editing capabilities, including a new
@blocksuite/connector
package that provides pathfinding support for computing shape connectors. - 📖 The documentation site is available, including onboarding documents and tutorials. The site can be accessed at blocksuite.affine.pro.
🚀 Features
- Store (@Saul-Mirone @lawvs @doodlewind)
- Edgeless (@alt1o @doodlewind)
- Support for various tools and modes, including drag and drop (#1417), view control panel (#1423), brush tool (#1418, #1458), text tool (#1563), and component toolbar (#1703).
- Basic hotkeys support (#1750) and pressing the ESC key to return to the default state (#1833).
- Active state maintenance between clicking frames (#1836) and support for bringToFront and sendToBack (#1945).
- Connectors can be attached to elements at any position (#1963) and copy-paste support in edgeless clipboard (#1965).
- Edgeless frame background (#2027), shape fill and stroke color support (#2042), and background grid optimization (#2047).
- Double-click the blank space to add text (#2163).
- Additional shapes (#1339) and brush support (#1337).
- Connector support (#1793) and shape border style support (#2166).
- Subpage (@lawvs)
- Database block (@zqran)
- Rich-text column soft enter support (#1765).
- Improved handling of placeholders, insertion, and selection (#1785, #1795, #1770).
- Enhanced database styling (#1831, #1855, #1861) and column operations (#1879, #1884, #1887).
- Tag color selection (#1917), renaming and deletion (#1891), and copy-paste support (#1908).
- More actions support (#1916) and drag and drop column width adjustment (#1931).
- Database conversion (#1941) and column operations with shortcuts (#2019).
- Title and tag length limits (#2000) and drag and drop row insertion (#2046).
- Icon and style updates (#2063, #2068) and mobile compatibility (#2187).
- Virgo integration for number input replacement (#2144) and select tag length limit update (#2230).
- Virgo (@Flrande)
- Selection (@fundon)
🙌 New Contributors
- @shengxinjing made their first contribution in #1269
- @qinluhe made their first contribution in #1313
- @PerfectPan made their first contribution in #1325
- @AlessioGr made their first contribution in #1387
- @suica made their first contribution in #1665
- @hanchayi made their first contribution in #1732
- @VictorNanka made their first contribution in #1799
- @adityash1 made their first contribution in #1903
- @yuusheng made their first contribution in #1988
- @blurname made their first contribution in #1990
- @luke358 made their first contribution in #2060
- @SkyeSun made their first contribution in #2087
- @DataDaoDe made their first contribution in #2096
- @zuozijian3720 made their first contribution in #2213
🐛 Detailed Refactoring and Bugfixes
- refactor: add
text
prop in schema (#1281) - refactor: migrate
SelectedBlock
toBlockRange
(#1334) - refactor: remove redundant cachedSelectedBlocks (#1332)
- refactor: add side effect in store (#1340)
- refactor: optimize some code in virgo (#1360)
- refactor: remove code block button (#1365)
- refactor: remove
depth
andparentIndex
fromBaseBlockModel
(#1372) - refactor: reorganize range structure (#1366)
- refactor: detect elements with Node.compareDocumentPosition in block selection (#1356)
- refactor: simplify test (#1379)
- refactor: migrate
BlockSuiteModelProps
toBlockModelProps
(#1408) - refactor: clearly distinguish lit's
state
andproperty
(#1428) - refactor: remove
handlePageEvent
timer (#1431) - refactor: simplify keyboard behavior (#1438)
- refactor:
Signal
->Slot
(#1481) - refactor: simplify code block language list logic (#1486)
- refactor: split basic
DefaultSelectionManager
modules (#1494) - refactor: remove redundant selection manager fields (#1496)
- refactor:
SelectionRect
->DraggingArea
(#1500) - refactor: extract
setSelectedBlocks
and slot effects (#1502) - refactor: remove
resetSelectedBlockByRect
(#1503) - refactor: switch to
selection.viewport
(#1506) - refactor: remove redundant selection manager fields (#1507)
- refactor: switch to
page.readonly
(#1511) - refactor: add
selection.state.draggingArea
(#1512) - refactor: extract block hub templates (#1521)
- refactor: move
codeBlockOption
to code block (#1519) - refactor:
Slot.disposableListener
->Slot.fromEvent
(#1526) - refactor: code option use viewport element (#1565)
- refactor: remove the deprecated
addBlock
api (#1613) - refactor: add async query for dom mutation scenario (#1621)
- refactor: replace
getRichTextByModel
withgetVirgoByModel
(#1626) - refactor: strict text attributes check (#1731)
- refactor: migrate nativeKeydown to hotkey (#1751)
- refactor: replace input tag with VEditor in database block (#1746)
- refactor: extract
getPopperPosition
function (#1816) - refactor: add
getRichTextBoundingBox
test action (#1819) - refactor: improve stability of inline suggestion (#1817)
- refactor: split
handleLineStartBackspace
(#1910) - refactor: check subpage reference (#2022)
- refactor: clean short key (#2051)
- refactor: extract keydown observer (#2062)
- refactor: remove redundant slot (#2140)
- refactor: remove
@blocksuite/react
package (#2179) - refactor: subpage meta sync (#2190)
- refactor: use
@toeverything/y-indexeddb
(#2207) - refactor: use virgo element as the ref node when obtaining the vRange (#2239)
- refactor: subpage update (#2264)
- refactor(blocks): replace textarea in title with virgo (#1168)
- refactor(blocks): replace quill with virgo (#1433)
- refactor(blocks): improve code-block highlight performance (#1682)
- refactor(blocks): add cache for highlight in code-block (#1762)
- refactor(blocks):
builtInSchemas
->AffineSchemas
(#1763) - refactor(blocks): prevent auto scroll in edgeless mode (#1830)
- refactor(code): replace
setTimeout
withResizeObserver
(#1680) - refactor(database):
tag
->column
(#1739) - refactor(database): optimize column related naming (#1913)
- refactor(database): remove
mode
in crdt model (#1918) - refactor(database): flatten
internalProperty
andproperty
(#1919) - refactor(database): add
DatabaseManager
andpage.db
entity (#1922) - refactor(database):
columns
->cells
(#1925) - refactor(database):
columnSchema
->column
(#1934) - refactor(database): split column header component file (#1957)
- refactor(database):
columnSchema
->column
(#1960) - refactor(database): column header (#1987)
- refactor(database): toolbar and row container (#1989)
- refactor(database): separate title (#1997)
- refactor(database): separate select type column (#1998)
- refactor(edgeless): split toolbar modules (#1348)
- refactor(edgeless): hotkeys (#1835)
- refactor(edgeless): add frame and update selection (#1834)
- refactor(editor): move content parser out of editor lifecycle (#1748)
- refactor(global): move global database types into blocks (#2278)
- refactor(phasor): switch to
getElementsBound
(#1445) - refactor(phasor): move edgeless viewport to
surface.viewport
(#1477) - refactor(selection): switch to
document.elementsFromPoint
(#1530) - refactor(selection): keep setSelectedBlocks logic simple (#1706)
- refactor(store): remove redundant type param (#1756)
- refactor(store): support synchronous
createPage
(#1760) - refactor(store):
addBlockByFlavour
->addBlock
(#1764) - refactor(store): remove redundant
moveBlocksToParent
(#1787) - refactor(store): remove
deleteBlockById
andupdateBlockById
(#1923) - refactor(store): set doc.guid to workspace id (#1958)
- refactor(store): init internal props should respect ext in schema (#2025)
- refactor(store): move cell and column to database props and add database model (#2053)
- refactor(store): use map proxy for object props (#2128)
- refactor(virgo): switch to
rootElement
(#1454) - refactor(virgo): use tuple (#...