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:
zzj3720
2025-04-29 09:52:07 +00:00
parent bce9f8cdf0
commit 1ea73456ca
55 changed files with 6941 additions and 227 deletions
@@ -26,15 +26,6 @@ export const AFFINE_FLAGS = {
configurable: false,
defaultState: true,
},
enable_block_query: {
category: 'blocksuite',
bsFlag: 'enable_block_query',
displayName:
'com.affine.settings.workspace.experimental-features.enable-block-query.name',
description:
'com.affine.settings.workspace.experimental-features.enable-block-query.description',
configurable: isCanaryBuild,
},
enable_edgeless_text: {
category: 'blocksuite',
bsFlag: 'enable_edgeless_text',
@@ -259,6 +250,16 @@ export const AFFINE_FLAGS = {
configurable: isCanaryBuild,
defaultState: false,
},
enable_table_virtual_scroll: {
category: 'blocksuite',
bsFlag: 'enable_table_virtual_scroll',
displayName:
'com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.name',
description:
'com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.description',
configurable: isCanaryBuild,
defaultState: false,
},
enable_meetings: {
category: 'affine',
displayName:
+8
View File
@@ -5761,6 +5761,14 @@ export function useAFFiNEI18N(): {
* `Once enabled, you can use scribbled style in edgeless mode.`
*/
["com.affine.settings.workspace.experimental-features.enable-edgeless-scribbled-style.description"](): string;
/**
* `Database block table view virtual scroll`
*/
["com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.name"](): string;
/**
* `Once enabled, switch table view to virtual scroll mode in Database Block.`
*/
["com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.description"](): string;
/**
* `Only an owner can edit the workspace avatar and name. Changes will be shown for everyone.`
*/
@@ -1438,6 +1438,8 @@
"com.affine.settings.workspace.experimental-features.enable-editor-rtl.description": "Once enabled, the editor will be displayed in RTL mode.",
"com.affine.settings.workspace.experimental-features.enable-edgeless-scribbled-style.name": "Edgeless scribbled style",
"com.affine.settings.workspace.experimental-features.enable-edgeless-scribbled-style.description": "Once enabled, you can use scribbled style in edgeless mode.",
"com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.name": "Database block table view virtual scroll",
"com.affine.settings.workspace.experimental-features.enable-table-virtual-scroll.description": "Once enabled, switch table view to virtual scroll mode in Database Block.",
"com.affine.settings.workspace.not-owner": "Only an owner can edit the workspace avatar and name. Changes will be shown for everyone.",
"com.affine.settings.workspace.preferences": "Preference",
"com.affine.settings.workspace.billing": "Team's Billing",