mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
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 -->
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { Collection } from '@affine/env/filter';
|
||||
import type { Workspace } from '@blocksuite/affine/store';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { Map as YMap } from 'yjs';
|
||||
@@ -29,13 +28,6 @@ export class UserSetting {
|
||||
}
|
||||
return this.setting.whenLoaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
get view() {
|
||||
return this.setting.getMap('view') as YMap<Collection>;
|
||||
}
|
||||
}
|
||||
|
||||
export const getUserSetting = (docCollection: Workspace, userId: string) => {
|
||||
|
||||
Reference in New Issue
Block a user