TableView sweep batch 3: last three sorting grids + retire the DataGrid package - #13020
Merged
Conversation
…rrors) Batch 3 of the TableView sweep: the three windows with deliberate SortMemberPath sorting keep their sorting via TableViewHeaderSorter, wired on every previously sortable column. - Shortcuts: all five columns sortable; column widths measured from actual content at construction; header double-click guarded so it sorts instead of opening the detect-key dialog. List order is presentation-only (rebuilt by search/filter). - BatchConvert: file grid sortable by name/format/status and by raw byte size (better than the DataGrid's string sort). The conversion loop enumerated the live ObservableCollection from a background task - a pre-existing crash hazard with mid-run filter changes - and now snapshots the job list, which also makes mid-run sorting safe. The functions checklist keeps its fixed order (headers were hidden before; TableView always shows them) and gets a fixed width against the Auto-cell star-column trap. - FixCommonErrors: rule execution order is now decoupled from the rules grid's display order (ApplyFixes runs selected rules in canonical _allFixRules order), since the sorter reorders the backing collection where the DataGrid sorted a view - a cosmetic sort can never change fix results. Both rules and fixes grids fully sortable; fixes apply per-item by identity. Also: TableViewHeaderSorter now refills the collection detached and restores selection through the selection model by index - headless benchmarking showed per-item SelectedItems.Add is O(n) each (8.6s for 2,000 adds on a 10k-row grid) while a batch range select is ~4ms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With every grid converted to TableView, the DataGrid infrastructure goes: - Package reference removed from UI.csproj; theme include and the DataGrid double-tap scrollbar guard removed from Program.cs; the DataGrid Loaded scrollbar-autohide workaround removed from UiTheme. - DataGridScrollBarBehavior and DataGridCheckboxMultiSelect deleted (native ScrollViewer paging and ListBox extended selection + TableViewExtras.AddSpaceToggle replaced them), along with the trough-paging test. - DataGrid cell themes and AttachHomeEndNavigation(DataGrid) removed from UiUtil; DataGrid styles removed from UiTheme and Styles.axaml. - The grid-lines setting enum is now SE's own SeGridLinesVisibility; member names match the old DataGridGridLinesVisibility, so persisted GridLinesAppearance values keep working. - The TableView header background resource (DataGridColumnHeaderBackgroundBrush, previously supplied by the DataGrid theme) is now defined in Styles.axaml with the same SystemAltHighColor value; SE's custom themes still override the header background directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final batch of the TableView migration (#13017, #13018, #13019). Zero DataGrids remain; the
Avalonia.Controls.DataGridpackage is gone from the build.Conversions (sorting kept via TableViewHeaderSorter)
Sorter perf fix
Headless benchmarking (10k rows) showed
SelectedItems.Addis O(n) per call on ListBox-based controls (8.6 s for 2,000 adds) while a batchedSelectRangeis ~4 ms. The sorter now refills the collection detached and restores selection through the selection model by index.For the record, DataGrid vs TableView on identical 10k-row data: first layout 378 → 44 ms, ItemsSource reset ×10 480 → 64 ms, scroll jumps comparable.
DataGrid retirement
DataGridScrollBarBehavior,DataGridCheckboxMultiSelect) deleted; DataGrid styles stripped from UiTheme/Styles.axaml; DataGrid cell themes and helpers removed from UiUtil.SeGridLinesVisibility, same member names — persisted settings keep working).Testing
Full solution builds clean; all 983 UI tests pass (one obsolete trough-paging test removed with its subject). Smoke-test priorities:
🤖 Generated with Claude Code