Skip to content

Latest commit

 

History

History
230 lines (223 loc) · 22 KB

File metadata and controls

230 lines (223 loc) · 22 KB

InkkSlinger UI Framework TODO

Status

  • Core XAML/resources/styles/bindings pipeline is implemented and tested.
  • App-level resource bootstrap is wired through App.xml at host startup (XamlLoader.LoadApplicationResourcesFromFile(...) in Game1).
  • Current framework is usable for menu/data/rich-text oriented MonoGame UI.
  • Current validation baseline: dotnet test InkkSlinger.Tests/InkkSlinger.Tests.csproj -c Release -v minimal -> 855/855 passing.
  • CollectionView parity core (Sort/Filter/Group/CurrentItem) is implemented with ItemsSource integration and XAML CollectionViewSource authoring.
  • Current default host launch surface is ControlsCatalogView (selected control previews), replacing prior CLI demo-mode switching.
  • Touch/stylus/tablet input pipeline parity is explicitly unsupported until InkCanvas and InkPresenter are implemented.
  • This file tracks completed milestones, known parity gaps, and control coverage.

Completed Milestones

Note: milestone references to --demo-flags are legacy launch paths from older host wiring; those surfaces are now accessed through ControlsCatalogView.

  • XAML resources: UserControl.Resources / Panel.Resources, x:Key, {StaticResource ...}.
  • XAML resources: {DynamicResource ...} for attribute-based dependency/attached properties plus style setter, trigger setter, and trigger action value paths.
  • Freezable parity foundation: added Freezable semantics (Freeze/CanFreeze/clone paths) for brushes/transforms/geometries/effects, immutable mutation guards, style/template clone policy for frozen vs unfrozen values, and frozen-target animation fail-fast diagnostics.
  • Style completeness: BasedOn, explicit style references, implicit style lookup by TargetType.
  • Style event binding parity: EventSetter support in style model/runtime + XAML parsing with code-behind handler resolution (including HandledEventsToo and flexible 0/1/2-parameter handler signatures) and regression coverage.
  • Binding parity: Source, ElementName, RelativeSource.
  • Scope B binding parser/runtime parity pass: mixed/named RelativeSource grammar support, strict source-selector conflict validation (Source vs ElementName vs RelativeSource), Binding.RelativeSource property-element parsing, and runtime RelativeSource PreviousData resolution against active generated item projection order.
  • Cleanup: #nullable enable, reflection-assigned x:Name warning cleanup.
  • Popup/window visuals moved to XAML resources/styles.
  • Baseline tests for resources/styles/bindings/style precedence.
  • Binding lifecycle robustness: detach/rebind on reparent and DataContext/source changes.
  • Resource resolution and precedence hardening: local/tree/app lookup and implicit style replacement behavior.
  • Input/focus edge-case hardening: capture/focus recovery, popup open/close behavior, keyboard focus traversal.
  • Tooltip parity completion: added ToolTipService attached properties (ToolTip, IsEnabled, InitialShowDelay, BetweenShowDelay, ShowDuration) with hover-timed open/reopen/auto-close lifecycle and non-interactive tooltip behavior in UiRoot input pipeline, plus focused regression coverage (ToolTipParityTests).
  • Focus-restore safety hardening: menu/context-menu focus restore now guards against detached targets (matching popup restore safety), with regressions across menu/context-menu/stacked-overlay paths.
  • Multi-menu keyboard routing parity: replaced single-menu keyboard/access-key assumptions with scoped menu resolution (active menu mode -> focused ancestor menu -> highest-z visible menu -> fallback), plus dedicated regressions (MultiMenuParityInputTests).
  • Overlay dismiss/input parity hardening: outside-click now dismisses only the topmost eligible overlay and consumes the initiating click, right-click dismiss no longer opens underlay context menus from the same click, and popup close restores pre-open focus only when the restore target remains in the active visual tree.
  • Layout and resize correctness under viewport changes and DPI-like scaling scenarios.
  • Core layout rounding parity pass: added inherited UseLayoutRounding DP and measure/arrange rounding for layout slots and render sizes, with focused regression coverage (UseLayoutRoundingTests).
  • Rendering and invalidation efficiency pass (reduced redundant invalidations/updates).
  • Performance pass completed and baseline behavior verified in tests.
  • Wheel input routing fix: when hover-bypass mode is enabled and hover target is null, wheel now falls back to normal target resolution instead of dropping the event.
  • Better XAML diagnostics with element/property context plus line/position details.
  • Shared text layout module introduced (TextLayout) with reusable wrapping support (TextWrapping enum).
  • Text wrapping wired into text-bearing controls (TextBlock/Label, Button, popup title rendering path).
  • XML markup migration completed for views (.xaml -> .xml) with runtime/project path updates.
  • Schema/tooling hardening for XML authoring: expanded InkkSlinger.UI.xsd for resources/styles/triggers/bindings and added local Xaml2006.xsd mapping support for x: namespace.
  • Compile-time XML/class pipeline: shipped generator-driven InitializeComponent + x:Name field wiring with strict x:Class validation, x:FieldModifier/x:ClassModifier support, event-handler compile diagnostics, runtime acceptance of compile-time x: directives, and migrated Views/*.xml(.cs) constructors to generated initialization.
  • Declarative commanding input model: UIElement.InputBindings + KeyBinding/KeyGesture routing, XAML authoring support, and menu shortcut auto-text derivation when unset.
  • Mouse gesture commanding parity pass: added MouseBinding/MouseGesture, press-edge execution routing (Left/Right/Middle) through InputGestureService, and XAML/schema parser coverage.
  • Commanding API parity expansion: added RoutedUICommand, shared command target resolver plumbing, and ICommandSource contract with command/menu integration and regression coverage.
  • ICommandSource ecosystem parity pass: centralized shared command execution/CanExecute semantics (CommandSourceExecution), aligned MenuItem leaf invocation to raise Click plus command execution, and unified hyperlink command activation behavior across RichTextBox and DocumentViewer with focused target-resolution regressions.
  • Binding parity gap #5 shipped: PriorityBinding, BindingGroup (inherited + named group resolution), and UpdateSourceExceptionFilter across Binding/MultiBinding with XAML + schema + regression coverage.
  • Binding regression safety-net expansion: added coverage for BindingGroup atomic commit/rollback, PriorityBinding edge cases, UpdateSourceExceptionFilter semantics, parser negative cases, and mode-trigger-validation matrix combinations.
  • Frame-latency diagnostics shipped (INKKSLINGER_FRAME_LATENCY_LOGS): alert-only 60 FPS thresholds, event->next-draw latency focus, miss-rate/dominant-phase attribution, and coalescing-aware sampling for move/scroll.
  • Rich document XAML strict-validation pass: explicit container child handling, invalid-structure enforcement, attribute validation (TableCell spans, Hyperlink.NavigateUri, LineBreak metadata-only), and rich parser regression coverage.
  • Rich clipboard fidelity pass: range-based fragment serialization/deserialization, rich-fragment-first paste with plain-text fallback on invalid payload, and regression coverage for copy/cut/paste semantics.
  • Rich advanced-structure pass: list indent/outdent transforms, table insert/split/merge and cell navigation behavior (Tab/Shift+Tab, boundary delete handling), hyperlink activation routing, and inline/block UI-container boundary support in rich layout/serialization.
  • Rich diagnostics/perf hardening pass: RichTextBoxPerformanceSnapshot metrics (layout cache + p95/p99 build timing, render/selection timing, undo depth/op counts, clipboard serde timing), env-var-driven rich diagnostics logs, and regression tests for bounded local-edit invalidation/allocation behavior.
  • Rich parity hardening: keyboard/reporting consistency for read-only editing keys and Shift+Tab no-op handling, plus list/table boundary keyboard space insertion safety (Enter + Space) without caret jump into adjacent table content.
  • Rich paste perf/interoperability hardening: external clipboard plain-text interop (Windows native clipboard read + fallback), per-paste clipboard snapshotting (single sync/read per paste), batched structured text paste insertion, and dedicated INKKSLINGER_RICHTEXT_PASTE_CPU_LOGS diagnostics with stage breakdown + clipboard sync counters.
  • ContextMenu parity hardening: right-click open and keyboard open (Shift+F10/Apps), no-layout-impact overlay behavior, hover-to-highlight/expand semantics (including submenu depth), deterministic first-hover submenu open after right-click, and dedicated hover diagnostics (INKKSLINGER_CONTEXTMENU_HOVER_LOGS).
  • ContextMenu performance diagnostics hardening: dedicated CPU diagnostics (INKKSLINGER_CONTEXTMENU_CPU_LOGS) with hover/open/invoke timing splits, resolver-path attribution, deep-branch traversal counters, and first-open vs warm-open invalidation breakdowns.
  • Adorner authoring ergonomics pass: introduced reusable AnchoredAdorner/HandlesAdornerBase APIs and added dedicated AdornersLabView demo surface (--adorners-lab).
  • CollectionView parity pass: ICollectionView stack (CollectionView, ListCollectionView, CollectionViewSource) with filter/sort/group/current-item semantics, strict ItemsSource vs Items mutation behavior, grouped projection via GroupStyle/GroupItem, DataGrid header sort integration with view sort descriptors, XAML parser/schema support, dedicated parity demo (--collectionview-parity-demo), and follow-up diagnostics (CollectionViewCpuDiagnostics, pointer resolve instrumentation).
  • ListView lab added as dedicated validation surface (--listview-lab).
  • Collection add-isolation lab added as dedicated validation surface (legacy flag path: --collection-add-isolation-demo; now browsed from ControlsCatalogView).
  • App.xml resource/theme pipeline shipped: host startup now loads App.xml application resources, including implicit styles and shared theme keys, with phased compatibility + parser regression coverage (AppXmlPhase1-4CompatibilityTests, AppXmlResourcesTests, XamlResourceDictionarySourceTests).
  • Merged ResourceDictionary parity pass: reverse merge precedence (last merged wins), cycle-safe merge attach, Source-chained cycle diagnostics with line/property context, default App.xml bootstrap preserving merged-dictionary structure, schema authoring support (Application/Application.Resources/ResourceDictionary/ResourceDictionary.MergedDictionaries), and dedicated regression coverage (ResourceDictionaryMergedSemanticsTests, XamlResourceDictionarySourceTests, AppXmlResourcesTests).
  • Controls catalog style-driven demo refresh shipped: preview XML surfaces moved to shared theme tokens, template-driven demo visuals, and preview-chrome harmonization across samples.
  • Controls catalog regression hardening shipped: layout/hover/scroll-persistence stability fixes with dedicated regressions (ControlsCatalogLayoutTests, ControlsCatalogHoverRegressionTests, ControlsCatalogScrollPersistenceTests).
  • Scoped default App.xml resource bootstrap for file-backed view loads: XamlLoader.LoadInto(...) now hydrates missing app resources into the target root scope before parse, resolving DarkBgBrush lookup failures in view-loading tests without globally mutating app resources.
  • Experimental partial redraw host hardening: preserve-composition target path, redraw-on-surface-reset behavior, and compatibility fallback tuning for CatalogView validation.
  • Input hover/selection hardening for catalog + tree interactions: fixed stale hover reuse and retained-list structural sync regressions (TreeViewInputTests, ScrollViewerWheelHoverRegressionTests, ControlsCatalogHoverRegressionTests).
  • Host-level conditional draw suppression pass: Game1 now calls SuppressDraw() on frames where UiRoot.ShouldDrawThisFrame(...) is false, reducing idle CPU in steady-state scenes.
  • Retained rendering + redraw scheduling regression hardening: added exhaustive retained-sync (RetainedRenderSyncRegressionTests), scheduling-reason (RedrawSchedulingRegressionTests), and dirty-bounds/negative-edge (DirtyBoundsEdgeRegressionTests) suites, including metadata invariants, mixed-reason scheduling masks, dirty-region normalization/clip/coverage boundaries, and deterministic UiRoot test hooks.
  • Animation manager idle optimization pass: hold/fill lanes no longer force running-animation state, unchanged lane values avoid redundant sink writes, and frozen filling lanes are parked until lane mutations/reactivation.
  • Controls catalog demo expansion: added Catch Me! interactive canvas view with storyboard-driven run-away ellipse behavior.
  • Frame/Page navigation vertical slice: object navigation journal (Navigate, GoBack, GoForward, CanGoBack, CanGoForward), page-scoped NavigationService attach/detach semantics, XAML/schema support, and regression coverage (FrameNavigationTests).
  • DocumentViewer vertical slice: read-only paged FlowDocument viewing (selection, copy, hyperlink hover/activation, zoom/page navigation commands), shared viewing helpers (DocumentViewportController/DocumentPageMap), XAML/schema support, and focused regression coverage (DocumentViewer*Tests).
  • UserControl templating parity pass: custom ControlTemplate support enabled with WPF-strict behavior (Content is surfaced only through template ContentPresenter), including direct/template-style/XAML property-element regression coverage.
  • Internal automation/accessibility pass: shipped AutomationPeer runtime tree with frame-coalesced automation events, attached AutomationProperties metadata surface, broad control peer mapping + pattern providers (Invoke/Value/RangeValue/Selection/SelectionItem/ExpandCollapse/Scroll), and focused automation regression suites.
  • DataGrid editing/layout and typography parity refactor: rebuilt DataGrid state/presenter plumbing (DataGridState, DataGridRowsPresenter, DataGridColumnHeadersPresenter, DataGridEditingEventArgs, row-header lane coordination), fixed editing/focus/scroll/sort/layout regressions across the demo/catalog surfaces, pushed font-size-aware text measurement/rendering through the shared text stack (FontStashTextRenderer, TextLayout, TextBlock, TextBox, presenter fallback paths), and added dedicated regressions (DataGridParityChecklistTests, TextFontSizeParityTests, expanded styled/control-demo DataGrid suites).

Current Workstream Snapshot

  • DataTrigger parity improvements, including MultiDataTrigger.
  • MultiTrigger parity support: runtime evaluation, style/template XAML parsing, strict condition validation (Property xor Binding by trigger type), schema updates, and regression coverage.
  • Trigger EnterActions / ExitActions support.
  • Trigger-action parity completion: added SetStoryboardSpeedRatio and SkipStoryboardToFill across runtime, XAML parser/schema support, and regression coverage.
  • ListView / ListViewItem control support with keyboard navigation fixes.
  • ContextMenu parity rebase: WPF-style menu semantics (ItemsControl + MenuItem containers), attached-property element XAML shape (<Button.ContextMenu>), right-click open pipeline, and keyboard/pointer submenu traversal behavior.
  • ProgressBar control support (determinate + indeterminate rendering).
  • TreeView / TreeViewItem text rendering and keyboard navigation stability fixes.
  • ResizeGrip control support with drag and keyboard resizing.
  • Thumb control support with drag lifecycle events and demo.
  • App-level theme/style application path (App.xml) integrated into host startup + compatibility test matrix.
  • Style-driven control preview surfaces and template parity pass across catalog demos.
  • Resolve app-theme static-resource lookup regressions (DarkBgBrush) in test/demo view-loading paths (ControlsCatalog*, AdornerClippingTests, XNameSourceGeneratorTests, PasswordBoxTests).
  • Calendar and DatePicker MVP parity pass: selectable month grid, keyboard navigation, popup-backed date selection, text parse/format behavior, XAML/schema support, and constrained-height overflow regression coverage.

Diagnostics Backlog

  • Tail-latency diagnostics (p95/p99) for click/move/scroll interaction windows, based on event->next-draw latency.
  • Frame-budget miss diagnostics for 60 FPS (16.6ms) with dominant phase attribution (input, layout, draw, other update).
  • Dirty-region effectiveness diagnostics: partial redraw success rate, dirty-rect merge ratio, and full-redraw fallback trigger breakdown.
  • Retained-render churn diagnostics: per-frame retained-sync/invalidations and top redraw-driver attribution.
  • Allocation and GC diagnostics during interaction windows (allocated bytes delta, Gen0/1/2 collection deltas).
  • Input-routing complexity diagnostics: route depth and handler invocation counts for pointer/wheel/key routes.
  • No-op invalidation diagnostics (invalidations that produce no layout/visual delta).
  • Per-control hot-spot diagnostics (sampled top N controls by cumulative layout/draw/dispatch time).

WPF Drawing & Geometry Coverage

  • Path
  • Ellipse
  • Rectangle
  • Line
  • Polygon
  • Polyline
  • PathGeometry
  • GeometryGroup
  • CombinedGeometry
  • Transform (MatrixTransform, TranslateTransform, ScaleTransform, RotateTransform, SkewTransform, TransformGroup)

WPF Parity Gaps (From Discussion)

  • Templates and visual composition depth: ControlTemplate parity expansion, template triggers, richer template binding behavior, named-part conventions.
  • Items system parity: HeaderedContentControl, HeaderedItemsControl, ContentPresenter, ItemsPresenter.
  • Menu and commanding ecosystem: Menu, MenuItem, declarative key-binding routing parity shipped, including menu-mode keyboard traversal (F10, Alt+<letter>, nested arrow navigation, Esc close/focus restore), pointer-driven menu-mode interactions, and parity-lab validation surface.
  • Virtualization: VirtualizingStackPanel and container virtualization behavior for large lists/trees.
  • Transform-based ScrollViewer content scrolling parity: plain panel hosts (for example StackPanel) use transform-based scrolling by default; ScrollViewer.UseTransformContentScrolling="False" provides explicit opt-out when translated arrange behavior is needed.
  • Data templating depth: DataTemplate parity expansion and template selection support.
  • Animation system: Storyboards, timelines, keyframes, easing, trigger-driven animations.
  • Binding parity gap #5: PriorityBinding, BindingGroup, UpdateSourceExceptionFilter, plus dedicated demo surface (--binding-parity-gap5-demo).
  • Rich text and document layer: RichTextBox and flow-document style content stack.
  • Advanced layout/adornment layer depth: Adorner composition behaviors and layout nuances beyond the current primitives.
  • Windowing/popup edge parity: Popup/menu/window interaction parity and additional edge behavior validation.
  • Context menu structural parity depth: Rebased ContextMenu toward WPF-like menu semantics (MenuItem/Separator, keyboard submenu behavior) with right-click and keyboard open flows.
  • Context menu hover/input robustness: Pointer-move dispatch is forced while any context menu is open (so hover transitions are not dropped when raw hit targets jitter), and hover diagnostics now emit BeforeMove/AfterMove state.
  • Data/view layer parity: CollectionView stack with CollectionViewSource authoring, plus ItemsControl.ItemsSource support across controls with WPF-style Items mutation guards while source-bound.
  • Touch/stylus/tablet input pipeline parity: explicitly unsupported until InkCanvas and InkPresenter are implemented.

WPF Control Coverage

  • Bounties:
  • If nobody picks up these bounties, I will implement these controls myself after I finish the rest of the current priority queue.
  • AccessText
  • Border
  • Button
  • Calendar
  • Canvas
  • CheckBox
  • ComboBox
  • ComboBoxItem
  • ContentControl
  • ContentPresenter
  • ContextMenu
  • Control
  • DataGrid
  • DataGridCell
  • DataGridColumnHeader
  • DataGridDetailsPresenter
  • DataGridRow
  • DataGridRowHeader
  • DatePicker
  • Decorator
  • DockPanel
  • DocumentViewer
  • Expander
  • Frame
  • Grid
  • GridSplitter
  • GroupBox
  • GroupItem
  • HeaderedContentControl
  • HeaderedItemsControl
  • Image
  • InkCanvas (bounty: https://github.com/Chevalier12/InkkSlinger/issues/3)
  • InkPresenter (bounty: https://github.com/Chevalier12/InkkSlinger/issues/3)
  • ItemsControl
  • Label
  • ListBox
  • ListBoxItem
  • ListView
  • ListViewItem
  • MediaElement (bounty: https://github.com/Chevalier12/InkkSlinger/issues/5)
  • Menu
  • MenuItem
  • Page
  • Panel
  • PasswordBox
  • Popup
  • ProgressBar
  • RadioButton
  • RepeatButton
  • ResizeGrip
  • RichTextBox
  • ScrollBar
  • ScrollViewer
  • Separator
  • Slider
  • StackPanel
  • StatusBar
  • StatusBarItem
  • TabControl
  • TabItem
  • TextBlock
  • TextBox
  • Thumb
  • ToggleButton
  • ToolBar
  • ToolBarOverflowPanel
  • ToolBarPanel
  • ToolBarTray
  • ToolTip
  • TreeView
  • TreeViewItem
  • UniformGrid
  • UserControl
  • Viewbox
  • VirtualizingStackPanel
  • WrapPanel
  • Window