Table system overhaul — options gear, striping, insert indicators, edit flyout (1.34.0)
Details
Restructure Notes plugin table system to use the new UI.Adaptive 1.20.0
TableGrid capabilities:
TableBlockEditor split into 5 partial classes (~200 lines each) from the
previous 949-line monolith:
- TableBlockEditor.axaml.cs: lifecycle, rendering, data source dispatch
- TableBlockEditorImport.cs: import/refresh from CSV/TSV/JSON files
- TableBlockEditorDatasetConfig.cs: dataset configuration wizard panel
- TableBlockEditorColumns.cs: column visibility/reorder flyout
- TableBlockEditorOptionsMenu.cs: gear menu wiring, state persistence
New features:
- Options gear menu replaces scattered toolbar buttons — Import, Refresh,
Columns, Edit Source now appear as menu items alongside built-in options
(Header Row, Striped Rows, Export, Edit Table)
- TableEditFlyout for editing table title, caption, header, striping,
and color theme (Default/Blue/Green/Purple/Orange presets)
- HasHeader flag synced bidirectionally with Rows[0].IsHeader for backward
compat when loading older tables
- FilterText, PageSize, IsStriped persisted to TableBlock on commit events
- ColorTheme and IsStriped forwarded to TableGrid for rendering
Data source changes:
- All 6 ITableGridDataSource implementations updated with positional
insert/delete methods (OnInsertRowAtAsync, OnDeleteRowAtAsync,
OnInsertColumnAtAsync, OnDeleteColumnAtAsync)
- ManualTableSource and EntityTableSource: full implementations with
header offset handling, sort order shifting, column width management
- DatasetTableSource, ViewTableSource, PluginQueryTableSource,
SourceBackedTableSource: throw NotSupportedException (read-only)
Model changes:
- TableBlock gains IsStriped, HasHeader, SortColumn, SortDirection,
ColorTheme, Caption properties with JSON serialization
- Tablemeta marker extended to 13 fields for markdown round-trip
- MarkdownBlockParser parses extended tablemeta with fallback application
when block ID is not found in existing block map
AXAML cleanup:
- Removed DataSourceControls panel (Edit Source, Columns buttons) — these
are now menu items in the options gear flyout
Unify all table types through TableGrid, gut TableBlockEditor (1.33.0)
Details
Phase 2 completion — all 6 table types now render through the shared TableGrid component
in UI.Adaptive. TableBlockEditor reduced from 3,272 to ~550 lines by extracting all
grid rendering, cell editing, drag-drop, context menus, sorting, filtering, paging,
and export into the shared component.
New files:
- ManualTableSource: ITableGridDataSource adapter for inline manual tables. Rows stored
directly in TableBlock.Rows. Full editing, sorting (SmartComparer), filtering, paging,
row/column reorder, and structure editing support
- EntityTableSource: ITableGridDataSource adapter for entity-backed tables. Rows stored
as separate entities via TableRowService. Implements IDisposable for debounce cleanup.
Debounced save (300ms per-row CancellationTokenSource) for cell edits
Modified files:
- TableBlockEditor.axaml: Removed manual Grid, toolbar, filter/paging controls. Kept
unified TableGrid, ImportPanel, DataSourceControls, DatasetConfigPanel, QueryErrorBorder
- TableBlockEditor.axaml.cs: Removed ~2,700 lines of inline rendering (RebuildManualTable,
RebuildEntityTableAsync, CreateEditableCell, CreateEntityCell, all navigation, context
menus, drag handlers, resize handlers, export methods). Kept lifecycle, data source
dispatch, import/refresh, dataset config, and column visibility as thin wiring layer
- NotesPlugin.cs: Version 1.32.0 -> 1.33.0
Migrate read-only tables to UI.Adaptive TableGrid (1.32.0)
Details
Migrate 4 read-only table types (dataset-backed, view-backed, plugin-query,
source-backed) from inline rendering in TableBlockEditor to the new shared
TableGrid component in PrivStack.UI.Adaptive.
Each table type now has a dedicated ITableGridDataSource adapter:
- DatasetTableSource: queries IDataObjectProvider with sort/filter/page
- ViewTableSource: wraps inline SQL with WHERE/ORDER BY clauses
- PluginQueryTableSource: resolves cross-plugin providers via ICapabilityBroker
- SourceBackedTableSource: reads paged CSV/TSV via TableImportService
TableBlockEditor changes:
- 4 async rebuild methods reduced from ~700 lines total to ~45 lines each
- Added ReadOnlyTableGrid XAML element alongside existing manual Grid
- Visibility toggling between ReadOnlyTableGrid and manual Grid based on type
- Cached data source to preserve sort state across filter/page changes
- Syncs _datasetColumns from adapters for column visibility flyout
- Manual/entity tables remain unchanged (Phase 2)
Net reduction: 537 lines from TableBlockEditor.axaml.cs (3,808 -> 3,271).
Bumps Notes plugin from 1.31.1 to 1.32.0.
Migrate sidebar to PluginSidebar
Details
Replace manual sidebar Border, collapse button, and resize handle with
PluginSidebar control using IsContentScrollable=False to preserve tree
virtualization. CollapsedContent slot provides icon-only new page and data
sources buttons when collapsed. Remove BoolToGridLengthConverter,
BoolToWidthConverter, BoolToStringConverter, BoolToPathIconConverter, and
~60 lines of sidebar resize code-behind. Data sources vertical resize
handlers retained (separate concern). Grid simplified to Auto,*. Version 1.31.0.
Migrate sidebar to PluginSidebar
Details
Replace manual sidebar Border, collapse button, and resize handle with
PluginSidebar control from UI.Adaptive. Remove BoolToWidthConverter and
BoolToPathIconConverter (no longer needed). Sidebar resize is now handled
internally by PluginSidebar with WidthChanged event for VM persistence.
Grid column defs simplified from Auto,Auto,* to Auto,*. Version 1.7.0.
Get notified about new releases