Skip to content

refactor!: Kumiko* naming, collision-free public types, one type per file (#16) - #136

Merged
michaelstonis merged 5 commits into
mainfrom
refactor/16-naming
Oct 25, 2026
Merged

michaelstonis merged 5 commits into
mainfrom
refactor/16-naming

Conversation

@michaelstonis

@michaelstonis michaelstonis commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #16.

Breaking renames: one prefix, Kumiko*

Every grid type now uses the Kumiko prefix. Drawn components keep Drawn, and other types keep descriptive unprefixed names (FilterDescription, EditSession, …). Namespaces (KumikoUI.*) and member names are unchanged, e.g. KumikoColumn.SortDirection, KumikoDataGrid.GridSelectionMode and KumikoDataGrid.GridStyle. The full old → new list is in the CHANGELOG.

  • Host control: DataGridView → KumikoDataGrid (MAUI and Uno, including XAML)
  • Models:
    • DataGridSource → KumikoSource, DataGridColumn → KumikoColumn, DataGridColumnType → KumikoColumnType
    • DataGridStyle → KumikoStyle, DataGridTheme(Mode) → KumikoTheme(Mode), CellStyle → KumikoCellStyle, RowStyle → KumikoRowStyle
    • DataGridRenderer → KumikoRenderer
  • Selection and sorting: SelectionModel/SelectionMode/SelectionChangedEventArgs → KumikoSelectionModel/KumikoSelectionMode/KumikoSelectionChangedEventArgs; SortDirection → KumikoSortDirection
  • Primitives: GridColor, GridFont, GridFontMetrics, GridPaint, GridRect, GridSize, GridPoint, GridTextAlignment, GridVerticalAlignment → Kumiko*
  • Input: GridKey, GridKeyEventArgs, GridPointerEventArgs, GridInputController, GridHitTester, HitTestResult, GridLayoutEngine → Kumiko*
  • Event arguments: TextChangedEventArgs, TimeChangedEventArgs, ColumnReorderedEventArgs, FocusChangedEventArgs → Kumiko*; RowTappedEventArgs2 → RowTappedEventArgs
  • Drawn components: ComboBoxItem → DrawnComboBoxItem, FocusManager → DrawnFocusManager, CheckState → DrawnCheckState
  • Uno package: KumikoUI.Uno no longer ships KumikoUI.Uno.WindowExtensions. Uno.Resizetizer's source generator added this app-icon helper to the library, and it clashed with Microsoft.Maui.WindowExtensions; the library build now drops that generator.

The naming rules are in CONTRIBUTING.md under "Public type names". New DataGrid*/Grid* type names are not allowed, because other grids (WPF, Windows Community Toolkit, Avalonia) use those prefixes.

One type per file

Every top-level type in src/ now lives in its own file named after it. For example, GridState.cs is now ScrollState.cs, KumikoStyle.cs and DragHandlePosition.cs. Code was moved verbatim.

CI name-collision check (eng/TypeNameCheck)

  • A console tool, not packed and not in the solution, reads public top-level type names with System.Reflection.Metadata. It fails when a KumikoUI type shares a simple name with:
    • another KumikoUI type, except the same type defined by each host
    • Microsoft.Maui (Controls, Core, Graphics) or CommunityToolkit.Maui
    • WinUI (Windows App SDK) or Uno's Microsoft.UI.Xaml, or the Windows Community Toolkit DataGrid
    • WPF or Windows Forms (System.Windows.*)
    • Avalonia or Avalonia.Controls.DataGrid
  • Platform names come from pinned packages (versions in Directory.Packages.props), so the tool needs no workloads.
  • Each source must contain a sentinel type, so a changed package layout cannot make the check pass silently.
  • It runs in build-core (Core + SkiaSharp), build-maui (Core + SkiaSharp + Maui, Windows TFM) and build-uno (Core + SkiaSharp + Uno, desktop head).

Verification (local, macOS)

  • Core tests: 465 passed, 3 skipped. Uno tests: 63 passed.
  • Builds: Core and SkiaSharp (Release), KumikoUI.Uno desktop, KumikoUI.Maui Catalyst and Android, SampleApp.Uno desktop, SampleApp.Maui Catalyst.
  • Name check, no collisions on:
    • Core + SkiaSharp
    • Core + SkiaSharp + Uno (desktop)
    • Core + SkiaSharp + Maui (Catalyst)
  • The check still fails with exit 1 when given a colliding assembly.
  • Not built locally: the Windows heads and the Uno ios, android and wasm heads. CI covers them.

Notes

  • The implementation started with a Sonnet subagent (per the model:sonnet label) and was reviewed and extended here.
  • Each CI job that runs the check restores the platform packages it compares against: about 820 MB extracted, mostly Uno.WinUI (~400 MB) and the Windows App SDK WinUI package (~220 MB). The Uno and MAUI jobs already restore those for their own builds; the Core job pays the full cost.
  • UnoWinUIVersion must track the Uno.WinUI version that Uno.Sdk resolves.

🤖 Generated with Claude Code

…mes, one type per file (#16)

- DataGridView -> KumikoDataGrid on MAUI and Uno (XAML included).
- Renamed public types that collide with Microsoft.Maui.Controls, Microsoft.UI.Xaml (WinUI and Uno)
  or System.Windows.Forms: DataGridSelectionMode, DataGridSelectionChangedEventArgs,
  DataGridSelectionModel, DataGridSortDirection, DataGridRowStyle, GridTextChangedEventArgs,
  GridTimeChangedEventArgs, GridColumnReorderedEventArgs, DrawnComboBoxItem, DrawnFocusManager,
  DrawnCheckState; RowTappedEventArgs2 -> RowTappedEventArgs.
- Every public type in its own file named after it; no namespace or behaviour change.
- eng/TypeNameCheck: reads public type names from the pinned MAUI, Windows App SDK WinUI, Uno.WinUI
  and Windows Desktop reference packages and fails CI on any simple-name collision (Core, SkiaSharp,
  Maui and Uno assemblies).
- Product name 'KumikoUI DataGrid' in package metadata and the README; CHANGELOG and CONTRIBUTING.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 10:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@michaelstonis
michaelstonis requested a balanced review from Copilot October 25, 2026 10:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Comment thread eng/TypeNameCheck/Program.cs Fixed
Comment thread eng/TypeNameCheck/Program.cs Fixed
Comment thread eng/TypeNameCheck/Program.cs Fixed
Comment thread eng/TypeNameCheck/Program.cs Fixed
Comment thread eng/TypeNameCheck/Program.cs Fixed
michaelstonis and others added 2 commits October 25, 2026 05:51
TypeNameCheck: drop an unused local, LINQ instead of filtering/mapping foreach loops, Path.Join.
Core (moved files): catch only conversion exceptions in NumericUpDownEditorDescriptor and
ProgressBarCellRenderer; merge the nested CSV check in GridColorTypeConverter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CellStyle; name check covers more frameworks

- CellStyle -> DataGridCellStyle (pairs with DataGridRowStyle).
- TypeNameCheck now also reads Microsoft.Maui.Core/Graphics, WPF, the Windows Community Toolkit
  DataGrid, CommunityToolkit.Maui and Avalonia (+ DataGrid), and flags duplicate simple names
  among the KumikoUI assemblies; CI passes Core + SkiaSharp + host together.
- Renamed what it found: DataGridColumn -> GridColumn (and DataGridColumnType -> GridColumnType),
  DataGridSelectionMode -> GridSelectionMode, DataGridSortDirection -> GridSortDirection,
  HitTestResult -> GridHitTestResult, FocusChangedEventArgs -> GridFocusChangedEventArgs.
- KumikoUI.Uno drops Uno.Resizetizer's source generator, which added a public
  KumikoUI.Uno.WindowExtensions app-icon helper (clashes with Microsoft.Maui.WindowExtensions).
- CONTRIBUTING prefix rules and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelstonis michaelstonis changed the title refactor!: KumikoDataGrid host control, collision-free public type names, one type per file (#16) refactor!: KumikoDataGrid, collision-free public type names, one type per file (#16) Oct 25, 2026
All DataGrid* and Grid* types become Kumiko*: KumikoSource, KumikoColumn, KumikoColumnType,
KumikoStyle, KumikoTheme, KumikoThemeMode, KumikoCellStyle, KumikoRowStyle, KumikoRenderer,
KumikoSelectionModel, KumikoSelectionMode, KumikoSelectionChangedEventArgs, KumikoSortDirection,
KumikoColor (+ TypeConverter), KumikoFont, KumikoFontMetrics, KumikoPaint, KumikoRect, KumikoSize,
KumikoPoint, KumikoTextAlignment, KumikoVerticalAlignment, KumikoKey, KumikoKeyEventArgs,
KumikoPointerEventArgs, KumikoInputController, KumikoHitTester, KumikoHitTestResult,
KumikoLayoutEngine, KumikoTextChangedEventArgs, KumikoTimeChangedEventArgs,
KumikoColumnReorderedEventArgs, KumikoFocusChangedEventArgs. Drawn components keep Drawn*.
Member names are unchanged (KumikoDataGrid.GridSelectionMode, GridStyle). Files, tests, docs,
CONTRIBUTING naming rules and CHANGELOG follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelstonis michaelstonis changed the title refactor!: KumikoDataGrid, collision-free public type names, one type per file (#16) refactor!: Kumiko* naming, collision-free public types, one type per file (#16) Oct 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelstonis
michaelstonis merged commit d845665 into main Oct 25, 2026
5 checks passed
@michaelstonis
michaelstonis deleted the refactor/16-naming branch October 25, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Naming pass: KumikoDataGrid control, collision-free type names, RowTappedEventArgs2, file = type

3 participants