mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
e98ec93af11fc64f21af4b7cf52486b979918157
1190 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e98ec93af1 |
fix: connector label editing (#12282)
Fixes [BS-3373](https://linear.app/affine-design/issue/BS-3373/connector%E7%9A%84%E5%8F%8C%E5%87%BB%E6%B7%BB%E5%8A%A0note%E8%A1%8C%E4%B8%BA%E5%8F%97%E5%88%B0%E4%BA%86%E8%A6%86%E7%9B%96%E8%8C%83%E5%9B%B4%E7%9A%84%E5%BD%B1%E5%93%8D) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Connector label elements now include identity and creator metadata. - **Bug Fixes** - Improved hit-testing for pointer interactions, resulting in more accurate detection of hovered elements. - **Refactor** - Enhanced internal comparison logic for elements, improving sorting and ordering consistency. - Strengthened type definitions for search filters, improving result accuracy and clarity. - **Tests** - Added end-to-end tests to verify correct label entry and retrieval for multiple connectors. - Introduced utility functions to fetch connector labels and improved connector creation in test actions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6c9f28e08b |
feat(core): workspace embedding settings (#11801)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced "Indexer & Embedding" workspace settings to manage AI embedding for local content, including document ignoring and attachment uploads. - Added UI components for embedding settings, attachments, and ignored documents with pagination and deletion capabilities. - Provided comprehensive file-type icons for attachments. - **Improvements** - Added a new tab for indexing and embedding in workspace settings navigation. - Included test identifiers on key UI elements to enhance automated testing. - **Localization** - Added English localization strings covering all embedding-related UI text and actions. - **Bug Fixes** - Enabled previously skipped end-to-end tests for embedding settings to improve reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d00315e372 |
test(core): embedding settings (#11554)
### TL;DR tests: workspace embedding e2e > CLOSE BS-3052 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced comprehensive end-to-end tests for workspace embedding settings, including toggling embedding, uploading and managing attachments, pagination, and ignoring documents. - Added utilities for automated interaction with the settings panel and document creation in tests. - **Tests** - Implemented detailed scenarios to verify workspace embedding functionality and user interactions within the settings panel. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6fabc0eb1f |
fix(editor): adjustment of scaled and folded synced doc (#12294)
Close [BS-3418](https://linear.app/affine-design/issue/BS-3418/折叠的embed-doc调整宽度时,会出现一个最小高度,不需要这个) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for dynamically scaling the height of embedded synced document blocks, including proper handling when folding and unfolding. - Introduced a new property to track the scaled height of folded synced document blocks. - **Bug Fixes** - Improved accuracy of height calculations for synced document blocks by accounting for both viewport zoom and block scale. - **Tests** - Enhanced end-to-end tests to consistently apply scaling before running size adjustment checks. - Added a utility function to simulate scaling elements with keyboard shortcuts during test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
278aa8f7a0 |
fix(editor): remove the fixation of created-by and created-time (#12260)
close: BS-3474, BS-3153 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced property addition to support specifying both type and name for new properties across databases and views. - Added context menu for selecting property type when adding new columns in table headers. - Introduced `addToGroup` functions to various group-by configurations for consistent grouping behavior. - **Bug Fixes** - Improved grouping logic to treat empty arrays as ungrouped in multi-member group configurations. - Refined grouping behavior to respect explicit group addition settings. - Ensured grouping operations only occur when both group key and row ID are present. - **Tests** - Updated test expectations to align with revised default column naming conventions. - Adjusted test utilities to accommodate the updated property addition method. - Improved typing simulation in column type selection for more reliable test execution. - **Improvements** - Introduced a new root component rendering on the share page to enhance UI integration. - Refined default property naming logic for clearer and more consistent column titles. - Simplified created-time and created-by property configurations for better maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6959a2dab3 |
fix: peekable in edgeless mode (#12271)
Fixes [BS-3374](https://linear.app/affine-design/issue/BS-3374/) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved control over when the peek view is shown in "edgeless" editor mode, ensuring it only activates when interacting directly with the relevant component. - **Bug Fixes** - Prevented unintended peek view activation in "edgeless" mode when clicking outside the associated component. - **Tests** - Added end-to-end test verifying the peek view does not open when content is covered by a canvas element. - **Chores** - Added utility function to streamline creating synced pages in edgeless mode during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3ebed1d5a8 |
chore(editor): adjust size of synced doc (#12163)
Close [BS-3418](https://linear.app/affine-design/issue/BS-3418/折叠的embed-doc调整宽度时,会出现一个最小高度,不需要这个) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved resizing and folding interactions for embedded synced documents in edgeless mode, including dynamic height calculation and enhanced drag-handle styling. - **Bug Fixes** - Adjusted minimum height for synced document embeds to allow more compact display. - Ensured consistent width settings across embed cards. - **Tests** - Added end-to-end tests covering folding, unfolding, and resizing behaviors for edgeless synced document embeds. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f737327f12 |
feat(core): show stop modal if clickoutside during generating (#12227)
### TL;DR feat: show stop model if click-outside during ai generating >CLOSE AI-89 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a confirmation dialog when attempting to stop AI content generation by clicking outside the panel, ensuring users can confirm or cancel the stop action. - **Tests** - Introduced an end-to-end test to verify the confirmation dialog appears and AI generation stops as expected when clicking outside during generation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
fb16caf192 |
fix(core): ai find-actions falky (#12257)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Updated test assertions to use case-insensitive matching for verifying displayed text, improving test reliability across different text casing scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> > Close AF-2616 |
||
|
|
08d6c5a97c |
refactor(editor): rewrite resize and rotate (#12054)
### Changed
This pr split the old `edgeless-selected-rect` into four focused modules:
- `edgeless-selected-rect`: Provide an entry point for user operation on view layer only, no further logic here.
- `GfxViewInteractionExtension`: Allow you to plug in custom resize/rotate behaviors for block or canvas element. If you don’t register an extension, it falls back to the default behaviours.
- `InteractivityManager`: Provide the API that accepts resize/rotate requests, invokes any custom behaviors you’ve registered, tracks the lifecycle and intermediate state, then hands off to the math engine.
- `ResizeController`: A pure math engine that listens for pointer moves and pointer ups and calculates new sizes, positions, and angles. It doesn’t call any business APIs.
### Customizing an element’s resize/rotate behavior
Call `GfxViewInteractionExtension` with the element’s flavour or type plus a config object. In the config you can define:
- `resizeConstraint` (min/max width & height, lock ratio)
- `handleResize(context)` method that returns an object containing `beforeResize`、`onResizeStart`、`onResizeMove`、`onResizeEnd`
- `handleRotate(context)` method that returns an object containing `beforeRotate`、`onRotateStart`、`onRotateMove`、`onRotateEnd`
```typescript
import { GfxViewInteractionExtension } from '@blocksuite/std/gfx';
GfxViewInteractionExtension(
flavourOrElementType,
{
resizeConstraint: {
minWidth,
maxWidth,
lockRatio,
minHeight,
maxHeight
},
handleResize(context) {
return {
beforeResize(context) {},
onResizeStart(context) {},
onResizeMove(context) {},
onResizeEnd(context) {}
};
},
handleRotate(context) {
return {
beforeRotate(context) {},
onRotateStart(context) {},
onRotateMove(context) {},
onRotateEnd(context) {}
};
}
}
);
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added interaction extensions for edgeless variants of attachment, bookmark, edgeless text, embedded docs, images, notes, frames, AI chat blocks, and various embed blocks (Figma, GitHub, HTML, iframe, Loom, YouTube).
- Introduced interaction extensions for graphical elements including connectors, groups, mind maps, shapes, and text, supporting constrained resizing and rotation disabling where applicable.
- Implemented a unified interaction extension framework enabling configurable resize and rotate lifecycle handlers.
- Enhanced autocomplete overlay behavior based on selection context.
- **Refactor**
- Removed legacy resize manager and element-specific resize/rotate logic, replacing with a centralized, extensible interaction system.
- Simplified resize handle rendering to a data-driven approach with improved cursor management.
- Replaced complex cursor rotation calculations with fixed-angle mappings for resize handles.
- Streamlined selection rectangle component to use interactivity services for resize and rotate handling.
- **Bug Fixes**
- Fixed connector update triggers to reduce unnecessary updates.
- Improved resize constraints enforcement and interaction state tracking.
- **Tests**
- Refined end-to-end tests to use higher-level resize utilities and added finer-grained assertions on element dimensions.
- Enhanced mouse movement granularity in drag tests for better simulation fidelity.
- **Chores**
- Added new workspace dependencies and project references for the interaction framework modules.
- Extended public API exports to include new interaction types and extensions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
13d882d6d8 |
refactor(core): refactor collection to use new filter system (#12228)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new Collection entity and store with reactive management and real-time updates. - Added reactive favorite and shared filters with expanded filtering options. - **Refactor** - Overhauled collection and filtering logic for better performance and maintainability. - Replaced legacy filtering UI and logic with a streamlined, service-driven rules system. - Updated collection components to use reactive data streams and simplified props. - Simplified collection creation by delegating ID generation and instantiation to the service layer. - Removed deprecated hooks and replaced state-based filtering with observable-driven filtering. - **Bug Fixes** - Improved accuracy and consistency of tag and favorite filtering in collections. - **Chores** - Removed deprecated and unused filter-related files, types, components, and styles to reduce complexity. - Cleaned up imports and removed unused code across multiple components. - **Documentation** - Corrected inline documentation for improved clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
42ae6e6e40 |
feat(editor): group configuration of note styles to panel from toolbar (#12230)
Close [BS-3401](https://linear.app/affine-design/issue/BS-3401/note-style-需要合并同类项)  |
||
|
|
f3ca17fcb3 |
refactor(editor): extract slider component (#12210)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new slider component for line width selection, providing a more interactive and streamlined UI. - Added support for using the slider component across relevant panels. - **Improvements** - Simplified the line width selection panel for easier use and improved maintainability. - Enhanced event handling to prevent dropdowns from closing when interacting with the panel. - **Bug Fixes** - Improved event propagation control within the line styles panel. - **Chores** - Updated package exports to include the new slider component. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b3f0f38b41 |
feat(editor): improve status display in attachment embed view (#12180)
Closes: [BS-3438](https://linear.app/affine-design/issue/BS-3438/attachment-embed-view-中的-status-组件) Closes: [BS-3447](https://linear.app/affine-design/issue/BS-3447/触发-litportal-re-render) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a visual status indicator for embedded attachments with reload capability. - Added a new resource status component to display error messages and reload actions. - **Improvements** - Enhanced attachment rendering flow with reactive state and unified embed handling. - Simplified resource state and blob URL lifecycle management. - Added status visibility flags for PDF and video embeds. - **Bug Fixes** - Improved error handling and refresh support for embedded content including PDFs, videos, and audio. - **Style** - Added styles for the attachment embed status indicator positioning. - **Refactor** - Streamlined attachment and resource controller implementations for better maintainability. - **Tests** - Added end-to-end test verifying PDF viewer reload and re-rendering in embed mode. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
76b4da54b7 |
chore(core): pdf viewer is enabled by default (#12207)
Related to: [BS-3101](https://linear.app/affine-design/issue/BS-3101/pdf-embed-模式的选中框选-和点开看详情有比较大的问题) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - PDF embed preview is now enabled by default for all users, regardless of workspace sharing mode. - **Bug Fixes** - Improved reliability of PDF viewer interaction in tests by updating the element used for visibility checks. - Enabled opening the PDF viewer peek view in readonly and sharing modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6d012f093f |
fix(core): ai replace selection (#11875)
### TL;DR * Fix the issue of inaccurate content replacement in AI Replace Selection * Optimize unit Tests utils ### What Changed 1. Fixed the issue of inaccurate content replacement in AI Replace Selection: - Convert the AI Answer into a Snapshot, then transform it into a sequence of Blocks ready for insertion. - Invoke the `replaceSelectedTextWithBlocks` command to replace the current selection with blocks (given the complexity of block combinations, this command uses [ts-pattern](https://github.com/gvergnaud/ts-pattern) implementation to ensure compile-time prevention of pattern handling omissions). 2. Optimized unit test assertions for commands, now allowing direct document content comparison using `toEqualDoc`. ```ts const host = affine` <affine-page id="page"> <affine-note id="note"> <affine-paragraph id="paragraph-1">Hel<anchor />lo</affine-paragraph> <affine-paragraph id="paragraph-2">Wor<focus />ld</affine-paragraph> </affine-note> </affine-page> `; // .... const expected = affine` <affine-page id="page"> <affine-note id="note"> <affine-paragraph id="paragraph-1">Hel111</affine-paragraph> <affine-code id="code"></affine-code> <affine-paragraph id="paragraph-2">222ld</affine-paragraph> </affine-note> </affine-page> `; expect(host.doc).toEqualDoc(expected.doc); ``` 3. Added support for text cursors in unit test template syntax. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit > CLOSE BS-3278 - **New Features** - Introduced the ability to replace selected text in documents with blocks, supporting advanced merging and insertion scenarios for various block types. - **Bug Fixes** - Improved handling of text selection and cursor placement in document templates used for testing. - **Tests** - Added comprehensive tests for replacing selected text with blocks, including edge cases and complex selection scenarios. - Enhanced test utilities for document structure comparison and selection handling. - Updated end-to-end tests to verify correct replacement of selected text via AI-driven actions. - **Chores** - Added and updated dependencies to support new features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
11dfc1d1df |
feat(editor): insert embed doc with quick search by default (#12165)
Close [BS-3404](https://linear.app/affine-design/issue/BS-3404/通过embed-doc时,插入的doc还是card-view,应该要默认embed-view) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to insert and display embedded synced documents, supporting different link types based on editor mode and user preferences. - Introduced new UI interactions and view options for embedded synced documents in edgeless mode. - **Bug Fixes** - Updated UI selectors and preference keys to ensure consistent behavior and correct application of user settings. - **Tests** - Added and updated end-to-end tests for embedding synced documents, including header interactions and viewport fitting. - Improved test coverage for quick search insertion and edgeless embed synced doc features. - **Chores** - Renamed settings and updated exports to align with new embedding functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d379143db3 |
refactor(core): use overcapacityMemberCount for quota checking instead of calculating the difference (#12117)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved accuracy of member quota warnings by updating the logic that detects when the member limit has been exceeded. - Enhanced test reliability by adjusting member list pagination test to better handle confirmation modals. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2d1600fa00 |
refactor(core): implement doc created/updated by service (#12150)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Documents now automatically track and display "created by" and "updated by" user information. - Document creation and update timestamps are now managed and shown more accurately. - Workspace and document metadata (name, avatar) updates are more responsive and reliable. - Document creation supports middleware for customizing properties and behavior. - **Improvements** - Simplified and unified event handling for document list updates, reducing redundant event subscriptions. - Enhanced integration of editor and theme settings into the document creation process. - Explicit Yjs document initialization for improved workspace stability and reliability. - Consolidated journal-related metadata display in document icons and titles for clarity. - **Bug Fixes** - Fixed inconsistencies in how workspace and document names are set and updated. - Improved accuracy of "last updated" indicators by handling timestamps automatically. - **Refactor** - Removed deprecated event subjects and direct metadata manipulation in favor of more robust, reactive patterns. - Streamlined document creation logic across various features (quick search, journal, recording, etc.). - Simplified user avatar display components and removed cloud metadata dependencies. - Removed legacy editor setting and theme service dependencies from multiple modules. - **Chores** - Updated internal APIs and interfaces to support new metadata and event handling mechanisms. - Cleaned up unused code and dependencies related to editor settings and theme services. - Skipped flaky end-to-end test to improve test suite stability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
388641bc89 |
refactor(editor): rename doc to store on block components (#12173)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Unified internal data access by replacing all references from `doc` to `store` across all components, blocks, widgets, and utilities. This affects how readonly state, block operations, and service retrieval are handled throughout the application. - **Tests** - Updated all test utilities and test cases to use `store` instead of `doc` for document-related operations. - **Chores** - Updated context providers and property names to reflect the change from `doc` to `store` for improved consistency and maintainability. No user-facing features or behaviors have changed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
95b9e4b3d0 | refactor(editor): rename model.doc to store (#12172) | ||
|
|
3afecc0605 |
fix(core): cannot space inside ai panel input (#12167)
### TL;DR fix: cannot space inside ai panel input > CLOSE BS-3428 |
||
|
|
8ea39d5438 |
fix(core): cannot input space at the beginning of a blank paragraph (#12166)
### TL:DR fix: cannot input space at the beginning of a blank paragraph > CLOSE BS-3427 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved space key handling in the editor: pressing space on an empty AI input now hides the AI panel and inserts a space character back into the editor. - **Bug Fixes** - Prevented the AI panel from processing empty input when space is pressed, ensuring smoother user experience. - **Tests** - Added an end-to-end test verifying that pressing space on an empty AI input hides the AI panel and inserts a space. - **Refactor** - Streamlined event handling logic for space key detection in the editor. - **Chores** - Enhanced editor content retrieval to optionally preserve whitespace while removing invisible characters. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
93b1d6c729 |
fix(editor): improve image block upload and download states (#12017)
Related to: [BS-3143](https://linear.app/affine-design/issue/BS-3143/更新-loading-和错误样式) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a unified resource controller for managing image and attachment resources, providing improved loading, error, and state handling. - Added a visual loading indicator overlay to image blocks for better feedback during image loading. - **Improvements** - Simplified and centralized image and attachment state management, reducing redundant properties and manual state tracking. - Updated fallback UI for image blocks with clearer titles, descriptions, and improved layout. - Enhanced batch image block creation and download handling for improved efficiency. - Refined image block accessibility with improved alt text and streamlined rendering logic. - Centralized target model selection for image insertion in AI actions. - Reordered CSS declarations without affecting styling. - Improved reactive state tracking for blob upload/download operations in mock server. - **Bug Fixes** - Improved cleanup of object URLs to prevent resource leaks. - Adjusted toolbar logic to more accurately reflect available actions based on image state. - **Tests** - Updated end-to-end tests to match new UI text and behaviors for image loading and error states. - **Chores** - Refactored internal logic and updated comments for clarity and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0ffa6fbe89 |
chore(server): hoist deps (#12145)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated workflow to move the node_modules directory during the build process. - Adjusted Prisma client output directory for improved file organization. - Removed unused properties from backend server package configuration. - **Refactor** - Simplified type annotations for improved code clarity in test utilities. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
fdb2a92c1c |
test(core): fix chat with tag falky (#12141)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Improved reliability of chat panel end-to-end tests by refining the sequence of UI interactions and wait conditions during tag and collection selection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3ac92d0d27 |
chore(core): update onboarding snapshot (#12138)
fix AF-2590 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Improved the flexibility of the "Unused blobs" count test by dynamically verifying the count before and after deletion, instead of relying on hardcoded values. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f79dfe837f |
feat(editor): support preview mode in code block (#11805)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a preview mode for code blocks, allowing users to toggle between code and rendered previews (e.g., HTML output) directly within the editor. - Added a preview toggle button to the code block toolbar for supported languages. - Enabled dynamic rendering of code block previews using a shared WebContainer, allowing live HTML previews in an embedded iframe. - Added HTML preview support with loading and error states for enhanced user feedback. - Integrated the preview feature as a view extension provider for seamless framework support. - **Bug Fixes** - Improved toolbar layout and button alignment for a cleaner user interface. - **Tests** - Added end-to-end tests to verify the new code block preview functionality and language switching behavior. - **Chores** - Updated development server configuration to include enhanced security headers. - Added a new runtime dependency for WebContainer support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1994dd6d9d | fix(editor): can not delete code block with delete keyboard (#11988) | ||
|
|
676c5d8de6 | refactor(editor): remove global gfx tool types (#12119) | ||
|
|
30a2e5b4fb |
refactor(editor): remove gfx tool global type (#12116)
Closes: BS-2650 |
||
|
|
e0308c5815 |
feat(editor): make height of edgeless embed doc to fit content (#12089)
Close [BS-3388](https://linear.app/affine-design/issue/BS-3388/embed-doc-拖入后的初始高度不要超过800,不要限制用户随后的调整空间) This PR impl a extension which initialize the height of added `affine-embed-edgeless-synced-doc-block` to fit its content <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved handling of embedded synced document block height to better fit content within edgeless mode. - **Tests** - Added an end-to-end test to verify correct height adjustment for embedded synced documents in edgeless mode. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d856911144 |
refactor(editor): cleanup dead code (#12072)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Simplified and removed several internal AI block extension files and utility functions, streamlining the codebase and reducing unused features. - Updated logic to access editor modes and controllers directly, removing reliance on DOM queries and certain abstractions. - Reduced and restructured effect type declarations for improved clarity. - **Bug Fixes** - Improved type safety in the editor component by explicitly typing queried elements. - **Chores** - Removed obsolete exports and internal functions with no impact on user-facing functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0d6c595adf |
feat(editor): autofill turn-into-linked-doc modal with fisrt paragraph (#12032)
Close [BS-3288](https://linear.app/affine-design/issue/BS-3288/从note转换-linked-doc-时,默认把note的第一行填入doc拟定的标题) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - When converting a note block to a linked document, the initial document title now uses the first paragraph in the note (if available) as a placeholder. - **Tests** - Updated tests to verify that the linked document creation modal pre-fills the title with the note's first paragraph and checks for correct paragraph order. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
315ea00390 |
feat(editor): header of edgeless embed doc (#12029)
Close [BS-3268](https://linear.app/affine-design/issue/BS-3268/edgeless-下,-dark-mode-embed的配色应该更加清晰) Close [BS-3067](https://linear.app/affine-design/issue/BS-3067/在embed上,添加split-view等相关的操作入口,基本接近page-block(见设计稿)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced an interactive header for embedded synced documents with fold/unfold toggle, document opening, and multiple view options. - Added info and copy link buttons for embedded synced documents and notes to improve document management and sharing. - **Enhancements** - Updated styles for embedded synced document blocks and headers for better visual consistency. - Added new localization entries for header actions: "Fold", "Unfold", and "Open". - Disabled redundant open document actions in toolbars, centralizing controls in the header. - **Refactor** - Unified header button components for notes and embedded synced documents into reusable components. - Simplified header components by delegating button behaviors to shared components. - **Bug Fixes** - Fixed conditional rendering of editor content in embedded synced documents when folded. - **Chores** - Upgraded theme dependency version from "^1.1.12" to "^1.1.14" across multiple packages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
365a0a605b |
feat(editor): improve visibility of hidden content of edgeless note (#12068)
Close [BS-3066](https://linear.app/affine-design/issue/BS-3066/优化长note的展示和折叠) - Enhanced the visibility behavior of hidden content in edgeless notes by: - Showing hidden content when a note is being edited, even when it's outside the viewport - Improving hover behavior with a delay when leaving from the bottom of the note - Adding proper cleanup of hover timeouts when the component is disconnected - Optimizing the viewport element to keep editing blocks or elements visible ## Testing - Added new E2E test cases covering: - Hover behavior on selected notes - Content visibility during editing - Viewport scrolling behavior - Edge cases for content visibility ## Impact This change improves the user experience when working with collapsed notes in edgeless mode by making the content more accessible and preventing accidental content hiding during editing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved visibility of hidden content in edgeless notes when hovering near the bottom edge or editing the note, especially after resizing or clipping. - **New Features** - Enhanced hover behavior with delayed clearing based on mouse position to improve user experience. - **Tests** - Added new tests verifying hidden content visibility in edgeless notes during hover and editing, simulating diverse user interactions. - **Chores** - Added utilities to get and set viewport center for improved test control. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
081974e824 |
fix(editor): should keep order of note after sliced by scissor (#12034)
Close [BS-3175](https://linear.app/affine-design/issue/BS-3175/剪刀剪出来的段落,排序应该紧跟原段落,而不是排到所有段落最后) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the accuracy of new note insertion, ensuring new notes are added immediately after the anchor note in the correct order. - **Tests** - Enhanced end-to-end tests for note slicing, including more interactions and assertions to verify correct note order and display modes after slicing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bce9f8cdf0 |
chore: bump up all non-major npm dependencies (#11994)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@ai-sdk/openai](https://sdk.vercel.ai/docs) ([source](https://redirect.github.com/vercel/ai)) | [`1.3.19` -> `1.3.20`](https://renovatebot.com/diffs/npm/@ai-sdk%2fopenai/1.3.19/1.3.20) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@aws-sdk/client-s3](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.796.0` -> `3.797.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.796.0/3.797.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@aws-sdk/s3-request-presigner](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/packages/s3-request-presigner) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/s3-request-presigner)) | [`3.796.0` -> `3.797.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fs3-request-presigner/3.796.0/3.797.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@napi-rs/cli](https://redirect.github.com/napi-rs/napi-rs) | [`3.0.0-alpha.77` -> `3.0.0-alpha.78`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.77/3.0.0-alpha.78) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@playwright/test](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`=1.51.1` -> `=1.52.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.51.1/1.52.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@playwright/test](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`=1.51.1` -> `=1.52.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.51.1/1.52.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@toeverything/theme](https://redirect.github.com/toeverything/design) | [`1.1.13` -> `1.1.14`](https://renovatebot.com/diffs/npm/@toeverything%2ftheme/1.1.13/1.1.14) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@vitest/browser](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/browser#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`3.1.1` -> `3.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/3.1.1/3.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@vitest/coverage-istanbul](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`3.1.1` -> `3.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/3.1.1/3.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`3.1.1` -> `3.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fui/3.1.1/3.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [app-builder-lib](https://redirect.github.com/electron-userland/electron-builder) ([source](https://redirect.github.com/electron-userland/electron-builder/tree/HEAD/packages/app-builder-lib)) | [`26.0.13` -> `26.0.14`](https://renovatebot.com/diffs/npm/app-builder-lib/26.0.13/26.0.14) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [browser-fs-access](https://redirect.github.com/GoogleChromeLabs/browser-fs-access) | [`^0.35.0` -> `^0.37.0`](https://renovatebot.com/diffs/npm/browser-fs-access/0.35.0/0.37.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [bullmq](https://bullmq.io/) ([source](https://redirect.github.com/taskforcesh/bullmq)) | [`5.51.0` -> `5.51.1`](https://renovatebot.com/diffs/npm/bullmq/5.51.0/5.51.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [cc](https://redirect.github.com/rust-lang/cc-rs) | `1.2.19` -> `1.2.20` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | build-dependencies | patch | | [clap](https://redirect.github.com/clap-rs/clap) | `4.5.36` -> `4.5.37` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [file-type](https://redirect.github.com/sindresorhus/file-type) | [`20.4.1` -> `20.5.0`](https://renovatebot.com/diffs/npm/file-type/20.4.1/20.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [gradle](https://gradle.org) ([source](https://redirect.github.com/gradle/gradle)) | `8.13` -> `8.14` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [graphql](https://redirect.github.com/graphql/graphql-js) | [`16.10.0` -> `16.11.0`](https://renovatebot.com/diffs/npm/graphql/16.10.0/16.11.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [graphql](https://redirect.github.com/graphql/graphql-js) | [`16.10.0` -> `16.11.0`](https://renovatebot.com/diffs/npm/graphql/16.10.0/16.11.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [lib0](https://crates.io/crates/lib0) | `0.16.5` -> `0.16.10` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [lucide-react](https://lucide.dev) ([source](https://redirect.github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)) | [`^0.488.0` -> `^0.503.0`](https://renovatebot.com/diffs/npm/lucide-react/0.488.0/0.503.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [objc2-foundation](https://redirect.github.com/madsmtm/objc2) | `0.3.0` -> `0.3.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [playwright](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`=1.51.1` -> `=1.52.0`](https://renovatebot.com/diffs/npm/playwright/1.51.1/1.52.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [rand](https://rust-random.github.io/book) ([source](https://redirect.github.com/rust-random/rand)) | `0.9.0` -> `0.9.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [rand](https://rust-random.github.io/book) ([source](https://redirect.github.com/rust-random/rand)) | `0.9.0` -> `0.9.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [react-resizable-panels](https://redirect.github.com/bvaughn/react-resizable-panels) | [`2.1.8` -> `2.1.9`](https://renovatebot.com/diffs/npm/react-resizable-panels/2.1.8/2.1.9) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [sqlx](https://redirect.github.com/launchbadge/sqlx) | `0.8.4` -> `0.8.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [tldts](https://redirect.github.com/remusao/tldts) | [`7.0.3` -> `7.0.4`](https://renovatebot.com/diffs/npm/tldts/7.0.3/7.0.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [vitest](https://redirect.github.com/vitest-dev/vitest) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`3.1.1` -> `3.1.2`](https://renovatebot.com/diffs/npm/vitest/3.1.1/3.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [yrs](https://redirect.github.com/y-crdt/y-crdt) | `=0.23.0` -> `=0.23.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [yrs](https://redirect.github.com/y-crdt/y-crdt) | `0.23.0` -> `0.23.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | com.google.firebase:firebase-bom | `33.12.0` -> `33.13.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [androidx.datastore:datastore-preferences](https://developer.android.com/jetpack/androidx/releases/datastore#1.1.5) ([source](https://cs.android.com/androidx/platform/frameworks/support)) | `1.1.4` -> `1.1.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [androidx.compose:compose-bom](https://developer.android.com/jetpack) | `2025.04.00` -> `2025.04.01` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | --- ### Release Notes <details> <summary>vercel/ai (@​ai-sdk/openai)</summary> ### [`v1.3.20`](https://redirect.github.com/vercel/ai/releases/tag/%40ai-sdk/openai%401.3.20) [Compare Source](https://redirect.github.com/vercel/ai/compare/@ai-sdk/openai@1.3.19...@ai-sdk/openai@1.3.20) ##### Patch Changes - [`dd5450e`](https://redirect.github.com/vercel/ai/commit/dd5450e): feat(provider/openai): add o3 & o4-mini with developer systemMessageMode </details> <details> <summary>aws/aws-sdk-js-v3 (@​aws-sdk/client-s3)</summary> ### [`v3.797.0`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#37970-2025-04-25) [Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.796.0...v3.797.0) **Note:** Version bump only for package [@​aws-sdk/client-s3](https://redirect.github.com/aws-sdk/client-s3) </details> <details> <summary>aws/aws-sdk-js-v3 (@​aws-sdk/s3-request-presigner)</summary> ### [`v3.797.0`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/packages/s3-request-presigner/CHANGELOG.md#37970-2025-04-25) [Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.796.0...v3.797.0) **Note:** Version bump only for package [@​aws-sdk/s3-request-presigner](https://redirect.github.com/aws-sdk/s3-request-presigner) </details> <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.0.0-alpha.78`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.77...@napi-rs/cli@3.0.0-alpha.78) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.77...@napi-rs/cli@3.0.0-alpha.78) </details> <details> <summary>microsoft/playwright (@​playwright/test)</summary> ### [`v1.52.0`](https://redirect.github.com/microsoft/playwright/compare/v1.51.1...471930b1ceae03c9e66e0eb80c1364a1a788e7db) [Compare Source](https://redirect.github.com/microsoft/playwright/compare/v1.51.1...v1.52.0) </details> <details> <summary>toeverything/design (@​toeverything/theme)</summary> ### [`v1.1.14`](https://redirect.github.com/toeverything/design/compare/1.1.13...1.1.14) [Compare Source](https://redirect.github.com/toeverything/design/compare/1.1.13...1.1.14) </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v3.1.2`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.1.2) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v3.1.1...v3.1.2) ##### 🐞 Bug Fixes - Add global `chai` variable in `vitest/globals` (fix: [#​7474](https://redirect.github.com/vitest-dev/vitest/issues/7474)) - by [@​Jay-Karia](https://redirect.github.com/Jay-Karia) in [https://github.com/vitest-dev/vitest/issues/7771](https://redirect.github.com/vitest-dev/vitest/issues/7771) and [https://github.com/vitest-dev/vitest/issues/7474](https://redirect.github.com/vitest-dev/vitest/issues/7474) [<samp>(d9297)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d9297920) - Prevent modifying `test.exclude` when same object passed in `coverage.exclude` - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/7774](https://redirect.github.com/vitest-dev/vitest/issues/7774) [<samp>(c3751)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c375101d) - Fix already hoisted mock - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7815](https://redirect.github.com/vitest-dev/vitest/issues/7815) [<samp>(773b1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/773b10e0) - Fix test.scoped inheritance - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7814](https://redirect.github.com/vitest-dev/vitest/issues/7814) [<samp>(db6c3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/db6c3bcc) - Remove pointer-events-none after resizing the left panel - by [@​alexprudhomme](https://redirect.github.com/alexprudhomme) in [https://github.com/vitest-dev/vitest/issues/7811](https://redirect.github.com/vitest-dev/vitest/issues/7811) [<samp>(a7e77)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a7e773bd) - Default to run mode when stdin is not a TTY - by [@​kentonv](https://redirect.github.com/kentonv), [@​hi-ogawa](https://redirect.github.com/hi-ogawa) and [@​sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/7673](https://redirect.github.com/vitest-dev/vitest/issues/7673) [<samp>(6358f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6358f216) - Use happy-dom/jsdom types for `envionmentOptions` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7795](https://redirect.github.com/vitest-dev/vitest/issues/7795) [<samp>(67430)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/67430083) - **browser**: - Fix transform error before browser server initialization - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7783](https://redirect.github.com/vitest-dev/vitest/issues/7783) [<samp>(5f762)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5f762ec5) - Fix mocking from outside of root - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7789](https://redirect.github.com/vitest-dev/vitest/issues/7789) [<samp>(03f55)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03f55d74) - Scale iframe for non ui case - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/6512](https://redirect.github.com/vitest-dev/vitest/issues/6512) [<samp>(c3374)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3374808) - **coverage**: - `await` profiler calls - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/7763](https://redirect.github.com/vitest-dev/vitest/issues/7763) [<samp>(795a6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/795a6433) - Expose profiling timers - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/7820](https://redirect.github.com/vitest-dev/vitest/issues/7820) [<samp>(5652b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5652bf92) - **deps**: - Update all non-major dependencies - in [https://github.com/vitest-dev/vitest/issues/7765](https://redirect.github.com/vitest-dev/vitest/issues/7765) [<samp>(7c3df)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7c3dfb17) - Update all non-major dependencies - in [https://github.com/vitest-dev/vitest/issues/7831](https://redirect.github.com/vitest-dev/vitest/issues/7831) [<samp>(15701)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/15701f5d) - **runner**: - Correctly call test hooks and teardown functions - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/7775](https://redirect.github.com/vitest-dev/vitest/issues/7775) [<samp>(3c00c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3c00c875) - Show stacktrace on test timeout error - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7799](https://redirect.github.com/vitest-dev/vitest/issues/7799) [<samp>(df33b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/df33bba7) - **ui**: - Load panel sizes from storage on initial load - by [@​userquin](https://redirect.github.com/userquin) in [https://github.com/vitest-dev/vitest/issues/7265](https://redirect.github.com/vitest-dev/vitest/issues/7265) [<samp>(6555d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6555d61d) - **vite-node**: - Named export should overwrite export all - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/7846](https://redirect.github.com/vitest-dev/vitest/issues/7846) [<samp>(5ba0d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5ba0d914) - Add ERR_MODULE_NOT_FOUND code error if module cannot be loaded - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/7776](https://redirect.github.com/vitest-dev/vitest/issues/7776) [<samp>(f9eac)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f9eacbc5) ##### 🏎 Performance - **browser**: Improve browser parallelisation - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/7665](https://redirect.github.com/vitest-dev/vitest/issues/7665) [<samp>(816a5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/816a5c51) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v3.1.1...v3.1.2) </details> <details> <summary>electron-userland/electron-builder (app-builder-lib)</summary> ### [`v26.0.14`](https://redirect.github.com/electron-userland/electron-builder/blob/HEAD/packages/app-builder-lib/CHANGELOG.md#26014) [Compare Source](https://redirect.github.com/electron-userland/electron-builder/compare/v26.0.13...v26.0.14) ##### Patch Changes - [#​9032](https://redirect.github.com/electron-userland/electron-builder/pull/9032) [`3d65267a`]( |
||
|
|
83670ab335 |
feat(editor): add experimental feature citation (#11984)
Closes: [BS-3122](https://linear.app/affine-design/issue/BS-3122/footnote-definition-adapter-适配) Closes: [BS-3123](https://linear.app/affine-design/issue/BS-3123/几个-block-card-view-适配-footnote-态) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new citation card component and web element for displaying citations. - Added support for citation-style rendering in attachment, bookmark, and linked document blocks. - Enabled citation parsing from footnote definitions in markdown for attachments, bookmarks, and linked docs. - Added a feature flag to enable or disable citation features. - Provided new toolbar logic to disable downloads for citation-style attachments. - **Improvements** - Updated block models and properties to support citation identifiers. - Added localization and settings for the citation experimental feature. - Enhanced markdown adapters to recognize and process citation footnotes. - Included new constants and styles for citation card display. - **Bug Fixes** - Ensured readonly state is respected in block interactions and rendering for citation blocks. - **Documentation** - Added exports and effects for new citation components and features. - **Tests** - Updated snapshots to include citation-related properties in block data. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
362f89b669 |
feat(editor): adjust attachment block UI (#11763)
Closes: [BS-3143](https://linear.app/affine-design/issue/BS-3143/更新-attachment-错误样式) Closes: [BS-3341](https://linear.app/affine-design/issue/BS-3341/attachment-select状态ui调整) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved attachment block with unified reactive state handling for loading, errors, and downloads. - Enhanced card layouts with modular rendering and dynamic buttons based on state. - **Bug Fixes** - Fixed UI state for "Embed view" action, now correctly disabled when not embedded. - Resolved attachment card styling issues and text overflow with new utility classes. - **Refactor** - Streamlined attachment block rendering and state management for better performance and maintainability. - Updated toolbar configuration for consistent parameter naming. - Simplified embedded and open methods for improved clarity. - Made internal functions private to reduce exported API surface. - **Chores** - Removed unused icon export and legacy upload tracking functions. - Updated attachment utilities to use reactive state, added data refresh, and improved error handling. - Refined image dimension handling for consistent resizing behavior. - Improved test selectors to target focused attachment containers for better reliability. - Refactored CSS to separate container and card styling and adopt theme-based colors consistently. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d7be1b3424 |
fix(core): skip onboarding in e2e tests (#12044)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated test setup to automatically skip onboarding steps during environment initialization. - Simplified test utility methods by removing notification handling logic from chat panel and editor mode switching processes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d57b9372ae |
fix(editor): edgeless note duplicated from embed-doc should be above other elements (#12028)
Close [BS-3357](https://linear.app/affine-design/issue/BS-3357/duplicate-note-注意设置z轴的数据) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Duplicating an edgeless note now ensures the new note appears above other elements in the stacking order. - **Tests** - Added a test to verify that duplicated edgeless notes are rendered above existing elements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
81b439c4e1 |
feat(editor): add gfx pointer extension (#12006)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new pointer graphics module with tools and quick tool integration for edgeless surfaces. - Added a quick tool button for pointer interactions in edgeless mode. - Exposed new extension points for pointer graphics and effects. - **Improvements** - Integrated pointer graphics as a dependency into related packages. - Enhanced toolbar context to support additional surface alignment modes. - Added conditional clipboard configuration registrations for edgeless contexts across multiple block types. - **Removals** - Removed legacy tool and effect definitions and related quick tool exports from edgeless components. - Streamlined extension arrays and removed unused exports for a cleaner codebase. - Deleted obsolete utility functions and component registrations. - **Chores** - Updated workspace and TypeScript project references to include the new pointer graphics module. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
aae65d231c |
fix(editor): should toggle toolbar when creating connector via auto complete (#11862)
Closes: [BS-2403](https://linear.app/affine-design/issue/BS-2403/[improvement]-edgeless-拖出-connector-时,yuan素的-toolbar-需要消失) |
||
|
|
3d2f0e7b5b |
feat(core): chat-panel buttons ui (#11942)
Close [AI-7](https://linear.app/affine-design/issue/AI-7).  |
||
|
|
a603c06fab |
feat(core): add web search tool and reasoning params (#11912)
Close [AI-60](https://linear.app/affine-design/issue/AI-60). ### What changed? - Add Exa web search tool - Add reasoning params |
||
|
|
13b28e2ad8 | fix(core): remove image proxy in onboarding snapshots (#11954) | ||
|
|
a9ad01491c |
test(core): enable no-floating-promises rule for tests (#11915)
Sometimes, missing `await` in the test code can cause timing issues, leading to test failures. This PR enables the `no-floating-promises` rule for the test code to ensure that such errors do not occur. |
||
|
|
9dbdd4b7ba |
refactor(editor): add helper function for undo notification (#11903)
### What Changes - Refactors the `notify` function call with undo button. It is called `notifyWithUndo`, which can associate the visibility of the `NotificationCard` with the top undo item in history stack, such as undo by shortcut `Cmd+Z`. - change icon of the "Insert into page" button. Close [BS-3267](https://linear.app/affine-design/issue/BS-3267/frame和group的insert-into-page图标也更换一下) |
||
|
|
27ff9ab9f4 |
refactor(core): move actions to footer of notification card (#11894)
This PR move all actions button to the footer of `NotificationCard`. There are some example as following: ### No Changes    ### Changes ### Before  #### After  |