mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 18:40:00 +08:00
refactor(editor): support virtual scroll for table view of database block (#11642)
close: BS-3378 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a modular virtualized table view with grouping, selection, drag-and-drop, clipboard support, and batch task management for optimized rendering. - Added comprehensive keyboard shortcuts, drag-to-fill functionality, and clipboard operations for efficient table editing. - Enabled dynamic column statistics, number formatting controls, and flexible switching between virtual and standard table views via a feature flag. - Provided detailed row and group header/footer components with context menus, row management actions, and column reordering/resizing. - Added a table view selector component to toggle between virtual and standard table views based on feature flags. - **Style** - Added extensive styling modules for virtual table elements including headers, footers, rows, cells, and interactive controls. - **Chores** - Registered numerous custom elements via modular effect functions to streamline component initialization. - Updated feature flag system to include virtual table scrolling toggle. - Added new dependencies to support styling and component functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { DataViewKanban, TableViewSelector } from './index.js';
|
||||
import { MobileKanbanCard } from './kanban/mobile/card.js';
|
||||
import { MobileKanbanCell } from './kanban/mobile/cell.js';
|
||||
import { MobileKanbanGroup } from './kanban/mobile/group.js';
|
||||
import { MobileDataViewKanban } from './kanban/mobile/kanban-view.js';
|
||||
import { KanbanCard } from './kanban/pc/card.js';
|
||||
import { KanbanCell } from './kanban/pc/cell.js';
|
||||
import { KanbanGroup } from './kanban/pc/group.js';
|
||||
import { KanbanHeader } from './kanban/pc/header.js';
|
||||
import { MobileTableCell } from './table/mobile/cell.js';
|
||||
import { MobileTableColumnHeader } from './table/mobile/column-header.js';
|
||||
import { MobileTableGroup } from './table/mobile/group.js';
|
||||
import { MobileTableHeader } from './table/mobile/header.js';
|
||||
import { MobileTableRow } from './table/mobile/row.js';
|
||||
import { MobileDataViewTable } from './table/mobile/table-view.js';
|
||||
import { pcEffects } from './table/pc/effect.js';
|
||||
import { pcVirtualEffects } from './table/pc-virtual/effect.js';
|
||||
import { DataBaseColumnStats } from './table/stats/column-stats-bar.js';
|
||||
import { DatabaseColumnStatsCell } from './table/stats/column-stats-column.js';
|
||||
|
||||
export function viewPresetsEffects() {
|
||||
customElements.define('affine-data-view-kanban-card', KanbanCard);
|
||||
customElements.define('mobile-kanban-card', MobileKanbanCard);
|
||||
customElements.define('affine-data-view-kanban-cell', KanbanCell);
|
||||
customElements.define('mobile-kanban-cell', MobileKanbanCell);
|
||||
customElements.define('affine-data-view-kanban-group', KanbanGroup);
|
||||
customElements.define('mobile-kanban-group', MobileKanbanGroup);
|
||||
customElements.define('affine-data-view-kanban', DataViewKanban);
|
||||
customElements.define('mobile-data-view-kanban', MobileDataViewKanban);
|
||||
customElements.define('affine-data-view-kanban-header', KanbanHeader);
|
||||
|
||||
customElements.define('mobile-table-cell', MobileTableCell);
|
||||
customElements.define('mobile-table-group', MobileTableGroup);
|
||||
customElements.define('mobile-data-view-table', MobileDataViewTable);
|
||||
customElements.define('mobile-table-header', MobileTableHeader);
|
||||
customElements.define('mobile-table-column-header', MobileTableColumnHeader);
|
||||
customElements.define('mobile-table-row', MobileTableRow);
|
||||
|
||||
customElements.define('affine-database-column-stats', DataBaseColumnStats);
|
||||
customElements.define(
|
||||
'affine-database-column-stats-cell',
|
||||
DatabaseColumnStatsCell
|
||||
);
|
||||
customElements.define('affine-database-table-selector', TableViewSelector);
|
||||
|
||||
pcEffects();
|
||||
pcVirtualEffects();
|
||||
}
|
||||
Reference in New Issue
Block a user