Added column drag and drop reordering with persistant sizing and ordering#484
Added column drag and drop reordering with persistant sizing and ordering#484
Conversation
There was a problem hiding this comment.
Pull request overview
Adds persisted column sizing and drag-and-drop column reordering to the EventTable UI, introducing defaults and preference storage so column layouts survive app restarts.
Changes:
- Reworked
event_table.jsto use an init/dispose lifecycle, add column drag-reorder, and persist column resize events back to .NET. - Added persisted
ColumnWidths+ColumnOrdertoEventTableState, along with new actions/reducers/effects and a “Reset Column Defaults” menu item. - Introduced centralized
ColumnDefaults(enabled columns, order, widths) and removed hardcoded column-width CSS.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/EventLogExpert/wwwroot/js/event_table.js | New JS lifecycle + resize persistence + drag/drop reorder support |
| src/EventLogExpert/Shared/Components/TableColumnMenu.razor.cs | Adds Reset Defaults dispatch |
| src/EventLogExpert/Shared/Components/TableColumnMenu.razor | Adds UI entry to reset column defaults |
| src/EventLogExpert/Services/PreferencesProvider.cs | Adds preference keys/properties for column widths + order |
| src/EventLogExpert/Components/EventTable.razor.css | Removes hardcoded column width rules; adds dragging style |
| src/EventLogExpert/Components/EventTable.razor.cs | JS interop callbacks + persisted width lookup + ordered enabled columns |
| src/EventLogExpert/Components/EventTable.razor | Applies persisted width inline and adds data-column + @key to headers |
| src/EventLogExpert.UI/Store/EventTable/EventTableState.cs | Adds ColumnWidths + ColumnOrder to state |
| src/EventLogExpert.UI/Store/EventTable/EventTableReducers.cs | Implements reducers for reorder + set width; loads widths/order on LoadColumnsCompleted |
| src/EventLogExpert.UI/Store/EventTable/EventTableEffects.cs | Loads/persists widths+order and adds reset defaults effect |
| src/EventLogExpert.UI/Store/EventTable/EventTableAction.cs | Adds actions for reorder, set width, reset defaults; extends LoadColumnsCompleted payload |
| src/EventLogExpert.UI/Interfaces/IPreferencesProvider.cs | Exposes column widths/order preferences |
| src/EventLogExpert.UI/ColumnDefaults.cs | New central defaults for enabled columns, order, widths |
| src/EventLogExpert.UI.Tests/Store/EventTable/EventTableStoreTests.cs | Updates and adds reducer/action tests for widths/order |
| src/EventLogExpert.UI.Tests/Store/EventTable/EventTableEffectsTests.cs | Adds effect tests for loading/persisting widths/order and reset defaults |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1da77be to
b44751d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b44751d to
23c883b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5191b26 to
4e52023
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/EventLogExpert/Shared/Components/TableColumnMenu.razor.cs:54
ToggleColumndispatches bothEventTableAction.ToggleColumnandEventTableAction.LoadColumns(). With the newEventTableEffects.HandleToggleColumnalready computing widths/order and dispatchingLoadColumnsCompleted, the extraLoadColumnscauses a second redundant state update/render (and potentially extra JS re-init work). Consider removing theLoadColumns()dispatch here (or changing the effect to only update preferences and rely on a single load action) so toggling a column results in one state transition.
private void ToggleColumn(ColumnName columnName)
{
Dispatcher.Dispatch(new EventTableAction.ToggleColumn(columnName));
Dispatcher.Dispatch(new EventTableAction.LoadColumns());
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4e52023 to
10a4159
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
10a4159 to
ffdf4b5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ffdf4b5 to
d0d503b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d0d503b to
5c83586
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resolves #332