feat(core): add default filter rules for all docs (#12197)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a filter to exclude empty journals from document collections.
  - Added a live-updating list of non-trashed document IDs for improved document management.

- **Improvements**
  - Default filters in the document explorer have been updated to show all items, including trashed ones, unless filters are applied.
  - Enhanced filtering in workspace views to automatically exclude empty journals and trashed documents.
  - Increased the responsiveness of grouped document updates for a smoother user experience.

- **Bug Fixes**
  - Removed unnecessary debug output from the document synchronization, member search, session management, and member selector components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
EYHN
2025-05-12 02:05:11 +00:00
parent 6fb7f51ea2
commit a6394b7988
11 changed files with 71 additions and 16 deletions

View File

@@ -51,6 +51,11 @@ export class DocRecordList extends Entity {
[]
);
public readonly nonTrashDocsIds$ = LiveData.from<string[]>(
this.store.watchNonTrashDocIds(),
[]
);
public readonly isReady$ = LiveData.from(
this.store.watchDocListReady(),
false

View File

@@ -147,7 +147,7 @@ export class DocsStore extends Store {
this.workspaceService.workspace.rootYDoc.getMap('meta'),
'pages'
).pipe(
switchMap(yjsObserveDeep),
switchMap(pages => yjsObservePath(pages, '*.trash')),
map(meta => {
if (meta instanceof YArray) {
return meta
@@ -165,7 +165,7 @@ export class DocsStore extends Store {
this.workspaceService.workspace.rootYDoc.getMap('meta'),
'pages'
).pipe(
switchMap(yjsObserveDeep),
switchMap(pages => yjsObservePath(pages, '*.trash')),
map(meta => {
if (meta instanceof YArray) {
return meta