Add a data table widget with sorting, filtering, and in-place editing - #517
Merged
Merged
Conversation
Keeps both the Waveform section from main and the data table section from this branch. The extra section class pushed ImGuiWidgetsDemo over the CA1506 coupling limit, so the extracted sections now go through SectionDemos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpVgY5FC9FuBkBuBAzXZJ6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCL6GX9wshgqiBeq6z98ZH
…lity findings The Ctrl+C test failed on Linux, where Dear ImGui keeps its own clipboard and an empty one reads back as a null pointer. GetClipboardTextS throws on that null, so the test now reads the pointer directly and treats null as empty. The enum editor draws the clicked name before checking it, which makes plain that every name is drawn and only a different one is a change. The navigation test that removes rows checks the active cell with a pattern, so the null case fails the test instead of being dereferenced. Also removes the "Review focus:" label from 13 test comments. It referred to the review process, not the code, and the explanations after it are unchanged.
SectionDemos drew the data table among the basic widgets as well as ShowAdvancedDemos drawing it, so the section appeared in two tabs with the same ImGui ids. It stays with the advanced demos, where the demo UI suite expects it.
Main's widget gallery checks that every public ImGuiWidgets member has a tile, and it failed on this branch for DataTable and its column and state types. The DataTable tile covers them, and DataTableCommands is listed as keymap registration rather than a widget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCL6GX9wshgqiBeq6z98ZH
|
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
Keep both CatalogCoverage entries: the piano keyboard's layout helper and the data table's command registration from #517. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv8Si9qNfudF41QNYfL2YB
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
Keep the zoomable Waveform description and add the DataTable entry that #517 introduced beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv8Si9qNfudF41QNYfL2YB
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
Main's data table (#517) added its demo to the old ShowAdvancedDemos list and SectionDemos.ResetState. This branch replaces both with the DemoSections registry, so the data table becomes one registry line in the Advanced Demos list, after the virtual table, where main shows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv8Si9qNfudF41QNYfL2YB
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
…els branch Main's data table (#517) sits after the virtual table in the Advanced Demos order, and the levels control keeps its place after the image canvas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv8Si9qNfudF41QNYfL2YB
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
…et browser branch Main's data table (#517) sits after the virtual table in the Advanced Demos order, and the asset browser keeps its place after the image canvas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv8Si9qNfudF41QNYfL2YB
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
Brings in the data table (#517) and the float-comparison fixes (#527). No conflicts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PndoA4WHoRsyywzECYDNX3
matt-edmondson
pushed a commit
that referenced
this pull request
Sep 29, 2026
Brings in the data table (#517) and the float-comparison fixes (#527). No conflicts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PndoA4WHoRsyywzECYDNX3
This was referenced Sep 30, 2026
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.



Adds
ImGuiWidgets.DataTable, a table of typed rows that sorts and filters itself, moves an active cell with the keyboard, and edits one cell at a time in place. The table never writes to your rows. Each editable column reports the edit throughOnEdit, and you apply it, which is what makes undo straightforward.What it does
DataTableColumn<TRow, TValue>reads a value, formats it, compares it, and optionally edits it. Strings, numbers,booland enums have built-in editors, and any other type supplies anEditor.RowFilteradds a condition of your own.SelectRows,ClearSelectionandActivateCellset the selection from code.OnContextMenudraws caller-supplied items for the right-clicked cell and the selection.ktsu.Keybindingkeymap when one is passed.DataTableCommands.Registerregisters them.An edited row stays where it is until you call
Refresh(), so it doesn't jump away while someone is working on it.How it's built
DataTableState<TRow>holds the view, the active cell, the selection, and the one edit session, and makes no ImGui calls, so its rules are unit tests. The renderer draws a frame from it and turns input into its commands. The clipper setup is now shared withVirtualTablethroughTableClipping, with no change toVirtualTable's behavior.The key chord matcher moved from
ImGui.NodeEditorintoImGui.Widgetsso both widgets share it. It gained optional key repeat and an option to ignore Shift, and now maps Tab, which it had silently dropped. The node editor's behavior is otherwise unchanged.The widgets demo gains a Data Table section with undo and redo through
ktsu.UndoRedo. The design and plan are indocs/superpowers/specs/2026-09-29-data-table-design.mdanddocs/superpowers/plans/2026-09-29-data-table.md.Things to look at
ImGui.Widgetsnow referencesktsu.Keybinding, which bringsMicrosoft.Extensions.DependencyInjection.Abstractionsto every consumer, plusSystem.Text.Jsonon net8.0 and net9.0.ImGui.WidgetsgrantsInternalsVisibleTotoImGui.NodeEditorand the UI tests, and setsPolyUseEmbeddedAttributeso Polyfill's generated extension methods don't become ambiguous across the two assemblies.ImGui.Appinstalls no clipboard functions. It saves and restores the clipboard around the test.VirtualTablehas its own row height mismatch whenRowHeightis set.Testing
The solution builds with 0 warnings. Widget unit tests 458 passed, widget UI tests 423 passed, node editor tests 266 passed, and widgets demo UI tests 30 passed. The UI tests drive the table headlessly, including sorting, filtering, editing, Tab while editing, typing into a filter, keypad Enter, a keymap, and scrolling the last row fully into view.
🤖 Generated with Claude Code