* Initial plan
* CommandContext infrastructure: WeakReference and extension methods
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Align CommandContext infrastructure with PR #4620
- Update ViewExtensions.cs to use Terminal.Gui.ViewBase namespace
- Update WeakReferenceExtensions.cs to match PR #4620 format
- Change CommandContext constructor to take WeakReference<View>? directly
- Add CommandContext.ToString() implementation
- Update ICommandContext.Source documentation
- Update View.Command.cs to explicitly create WeakReference
- Update Shortcut.cs to handle WeakReference Source
- Update ComboBox.cs Source comparison
- Update Dialog.cs and DialogTResult.cs pattern matching
- Update MenuBar.cs and PopoverMenu.cs to work with WeakReference
- Update ScrollSlider.cs and OptionSelector.cs
Remaining: Fix Examples code and tests
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Fix Examples code for WeakReference Source
- Update UICatalogRunnable.cs to use TryGetTarget for Data access
- Update Menus.cs to use ToIdentifyingString() and TryGetTarget
- Update MouseTester.cs to use ToIdentifyingString() for all Source.Id access
All Examples now build successfully
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Update tests for WeakReference Source
- Fix CommandContextTests.cs to wrap Source in WeakReference
- Fix InputBindingTests.cs to wrap Source in WeakReference
- Update assertions to use TryGetTarget for safe access
- All CommandContext and InputBinding tests pass
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add TryGetSource extension methods and replace usage
- Add TryGetSource extension to WeakReferenceExtensions.cs
- Add CommandContextExtensions.cs with TryGetSource for ICommandContext
- Replace 14 instances of Source?.TryGetTarget pattern across codebase
- Updated Terminal.Gui files: ComboBox, Dialog, DialogTResult, MenuBar, PopoverMenu, OptionSelector, Shortcut
- Updated Examples files: UICatalogRunnable, Menus
- All files build successfully
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add tests for TryGetSource extension methods
- Add 6 tests for TryGetSource extension methods
- Test WeakReference<View>.TryGetSource with valid/null references
- Test ICommandContext.TryGetSource with valid/null contexts
- Test pattern matching usage with TryGetSource
- All 23 CommandContext tests pass
- Full test suite: 15,094 passed
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* code cleanup
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
* Phase 5: Add IsFixed and RequiresTargetLayout categorization properties
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Further simplify DimAuto.Calculate using IsFixed property
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor for-loops to foreach and clarify DimFill logic
Refactored multiple for-loops iterating over view lists to use foreach loops for improved readability and reduced boilerplate. Removed unused variables such as viewsNeedingLayout and index counters. Clarified DimFill handling by continuing early if the DimFill is not valid or lacks a To property, reducing nesting and improving intent. Made minor formatting and code style improvements for consistency.
* Refactor subview filtering and sizing logic
Refactored repeated LINQ queries for subview filtering into reusable helper methods (`GetViewsThatMatch`, `GetViewsThatHavePos<TPos>`, `GetViewsThatHaveDim<TDim>`), reducing duplication and improving readability. Moved max content size calculations for various subview types into new helper methods (`GetMaxSizePos<TPos>`, `GetMaxSizeDim<TDim>`). Updated main logic to use these helpers. Adornment thickness calculation now uses a switch expression. These changes improve modularity and maintainability.
* Refactor subview categorization for layout calculation
Refactored layout calculation to use a single-pass CategorizeSubViews method, grouping subviews by relevant Pos/Dim types into a new CategorizedViews struct. This replaces multiple helper methods and reduces redundant iterations. Updated main logic to use these categorized lists, and unified size calculation helpers to further reduce code duplication. Improves performance and maintainability by consolidating subview processing and removing obsolete methods.
* Revert perf POC commits and add missing overrides to Combine types
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add helper methods and simplify DimAuto.Calculate with foreach loops
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor layout calculation in DimAuto.cs
Removed commented-out code and unnecessary list declarations to clean up the layout calculation logic.
* removed old plan file
* Code cleanup
* Add performance analysis and improvement plan for DimAuto.Calculate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add DimAuto benchmarks and benchmark documentation
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Implement Phase 1 & 2 performance optimizations for DimAuto.Calculate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Code cleanup
* Delete plans/dimauto-perf-plan.md
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
Replace the redundant GetViewsUnderLocation call with a read from the
already-populated CachedViewsUnderMouse. Walk the cache backwards to
find the deepest *enabled* view, so disabled SubViews don't block the
SuperView from grabbing the mouse.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* menu deep dive
* Fixes#4672. OptionSelector is not behaving properly.
* Add NoStop to CheckBox and TextField. Replace commands for Down, Right, Up and Left
* Using navigation based on orientation
* Fixed ShowValue issue and code cleanup
* Refactor selector navigation tests, remove arrow key tests
Renamed the Tab/Shift+Tab navigation test for clarity and switched to using the ANSI driver. Removed cleanup code involving SessionToken. Deleted the test covering arrow key navigation within OptionSelector, so tests now only verify focus movement into and out of the selector using Tab and Shift+Tab. Arrow key navigation within the selector is no longer tested.
---------
Co-authored-by: Tig <tig@users.noreply.github.com>
- Consolidate ColorPicker16 tests into ColorPickerTests.cs
- Replace target-typed new and tuple-style constructors with explicit types (e.g., new Mouse, new Rectangle)
- Refactor mouse event simulation to use Mouse objects and Application input injection methods
- Improve test setup with VirtualTimeProvider and IApplication for isolation
- Remove redundant Clicking_On_Border_Is_Ignored test from ListViewTests
- Use new string(' ', n) for string construction
- Make variable initializations more explicit for clarity
- Modernize and clarify test code for maintainability and compatibility
Changed default Activate binding from LeftButtonPressed to LeftButtonReleased (issue #4674). Updated all affected tests to reflect new behavior: Activating now fires on release, not press. Adjusted assertions, test names, and mouse event simulation. Custom binding logic now uses ReplaceCommands for Released. Comments clarify new default; focus still set on press, activation on release.
1. Terminal.Gui/ViewBase/Mouse/View.Mouse.cs (Core Change)
- Changed default binding from LeftButtonPressed to LeftButtonReleased (lines 17-19)
- Updated MouseHoldRepeat logic to restore Released binding when disabled (line 268)
- Updated HandleAutoGrabRelease to support cancellation (only invoke commands if released inside viewport)
- Updated command invocation logic to prevent double-invocation
2. docfx/docs/command.md (Documentation)
- Updated Mouse → Command Pipeline table to reflect new default
- Updated View Command Behaviors table (Released column now shows Command.Activate)
- Added comprehensive note (#11) explaining cancellation behavior and how to revert to old behavior
3. Tests/UnitTestsParallelizable/ViewBase/Mouse/DefaultActivationTests.cs (New Tests)
- Created 13 comprehensive tests (all passing ✅)
- Tests cover: default behavior, cancellation, auto-grab, MouseHoldRepeat, backward compatibility
Test Results:
- ✅ 13/13 new DefaultActivationTests pass
- ⚠️ 6 existing MouseTests need updating (they test old Pressed behavior)
- These are expected failures due to the breaking change
Next Steps:
The implementation is functionally complete. To finish:
1. Update the 6 failing tests in MouseTests.cs to expect Released instead of Pressed
2. Run full test suite to identify any other affected tests
3. Manual testing with UICatalog recommended
The new behavior is working correctly - buttons now activate on release (with cancellation support), matching industry
standards!
Fixes issue #4674 where MouseBinding for xxxReleased (e.g., LeftButtonReleased) did not invoke bound commands due to logic in HandleAutoGrabRelease. Now, custom Released bindings are properly invoked regardless of MouseHoldRepeat. Refactored MouseTester demo for clarity and explicit command binding. Added a detailed test plan (PLAN.md) and new MouseReleasedBindingTests covering basic, AutoGrab, and multiple-command Released scenarios. Improves reliability and test coverage for mouse Released event handling in Terminal.Gui.
* Initial plan
* Add mouse click helper methods to InputInjectionExtensions with tests
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Update existing tests to use new mouse click helpers
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add issue scenario validation test
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Document mouse click helper methods in input-injection.md and mouse.md
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor input injection helpers and consolidate tests
Refactored InputInjectionExtensions methods to use expression-bodied members for conciseness. Simplified object initializations and variable declarations in test files. Consolidated and restored all input injection helper tests into a new InputInjectionExtensionsTests.cs under the InputTests namespace, removing redundant and duplicate test files. Added targeted tests for GitHub issue #4675. These changes improve code clarity, maintainability, and test coverage.
* add ref to input docs
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
* Add View command behaviors table to command.md
Documents how each View subclass handles Activate, Accept, and HotKey
commands. The table provides a reference for understanding what user
actions trigger each command/event in specific views.
Includes:
- 27 View subclasses documented
- User actions mapped to commands (Space/Click, Enter/Double-Click, Alt+Key)
- Notes explaining composite views, display-only views, and special cases
https://claude.ai/code/session_01YX1NAzjQFB6Yii4V1Y6GXM
* Add test plan for View command behavior unit tests
Creates a comprehensive plan for adding/improving unit tests to verify
current Activate, Accept, and HotKey command behaviors for all View
subclasses.
Key features:
- Documents 26 Views with specific test cases for each
- Includes test templates with required comments referencing command.md
- Organized by implementation priority (5 phases)
- Each test must reference the View Command Behaviors table in command.md
- Tests serve as behavioral specifications before upcoming changes (#4473)
https://claude.ai/code/session_01YX1NAzjQFB6Yii4V1Y6GXM
* Initial plan
* Add Phase 1 command behavior tests (Button, CheckBox, TextField, ListView, TableView)
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Remove accidental TestPattern directory
* Add TreeView and TextView command behavior tests
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add Phase 2 and 3 command behavior tests (Shortcut, Selectors, Dialog, Label, ProgressBar)
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add Phase 4 command behavior tests (Wizard, HexView, NumericUpDown, DatePicker, ColorPicker, ScrollBar, Bar)
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add final remaining command behavior tests (Menu, MenuItem, MenuBar, ComboBox, TabView, SpinnerView)
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Code cleanup
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
* Initial plan
* docs: Create implementation plan for DimFill 'to:' parameter feature
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* feat: Add 'to:' parameter to Dim.Fill for filling up to another view
- Modified DimFill record to include optional 'To' parameter
- Updated Calculate method to use To view's position as endpoint
- Added ReferencesOtherViews override for proper dependency tracking
- Added three new Dim.Fill factory method overloads
- Added comprehensive unit tests (14 new tests, all passing)
- Includes test for issue #4656 example code
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* refactor: Address code review feedback
- Use StringBuilder for ToString() for better performance
- Use Dim.Absolute(0) instead of hardcoded 0 for consistency
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* docs: Update implementation plan with completion status
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* fix: Replace var with explicit types in DimFill tests per coding standards
- Changed all var declarations to explicit types (View, Label, Button, TextField)
- Used target-typed new () syntax as per Terminal.Gui coding standards
- Follows rule: Never use var except for built-in types (int, string, bool, etc.)
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* feat: Update DimAuto to handle DimFill with 'To' parameter for auto-sizing
- Modified DimAuto.Calculate to check for DimFill.To and contribute to auto-sizing
- When DimFill has To set, SuperView is sized to accommodate both views
- Updated comment in DimAuto.cs line 425 to mention To parameter
- Updated DimAuto XML docs to mention both MinimumContentDim and To
- Updated Dim.cs API documentation for all Fill methods regarding auto-sizing
- Added 5 comprehensive unit tests in Dim.AutoTests.DimTypes.cs
- All 400 Dim tests passing
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor StatusBar visibility and height management
Replaces direct use of StatusBar.Visible with a static ShowStatusBar property and a StatusBarChanged event. StatusBar height is now set to Dim.Auto() or 0 based on ShowStatusBar, with Layout() called to update the UI. Updates related event handling and adjusts how categoryList and scenarioList heights are calculated. Includes minor formatting and initialization improvements.
* Fixed Config editor
* ViewportSettings
* shortcuts
* Adornments
* charmap
* FileDialog
* deleted plan
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
* On v2_4639_line-orientation-flip-back-fix: Fixes#4639. Flipping Orientation on Line changes Width/Height but doesn't flip back
* Ensuring change Length will update correct dimension based on orientation
* Fix bug by not setting Length when IsInitialized is true
---------
Co-authored-by: Tig <tig@users.noreply.github.com>
* Fixes#4625 - Ansi and unix drivers doesn't work on macOS 26 ARM64
* Using PlatformDetection for uni tests
* Remove IsFreeBSD from IsMac
---------
Co-authored-by: Tig <tig@users.noreply.github.com>
* Fixes#4606. Sixel isn't working in the Images scenario
* Replace 6 with PIXEL_HIGH
* Only subtract if height is grater than 6
* Adjust code to not conflict with unit tests
* GetHeightInPixels only return 0 if maxSizeHeight is lower than 6 and AvoidBottomScroll is true
* Replace test with Theory and using AvoidBottomScroll property
* Add test forSixelToRender.Id property
* Fix GetHeightInPixels to be multiple of 6 after multiply the height by the pixel height.
---------
Co-authored-by: Tig <tig@users.noreply.github.com>
* Fixes#4634 - Update Dim.Auto developer docs with more guidance
Add "How To" section to dimauto.md with non-trivial recipes drawn from
Shortcut, Dialog, Menu/Bar, and NumericUpDown (pin to natural size,
dynamic minimums, screen-clamped dialogs, uniform-width lists, nested
auto-sizing, and more).
Document the DimFill/DimAuto circular dependency pitfall (SubView gets
size 0) across all relevant XML API docs and the deep dive. Add deep
dive cross-references from DimAuto, Dim.Auto(), and DimAutoStyle XML
docs. Fix outdated claim that Dialog uses Dim.Percent(90). Update
layout.md Dim.Fill bullet with caveat.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Simplify mermaid classDiagram in layout.md for docfx compatibility
Replace `note for` syntax (unsupported by docfx's bundled mermaid) with
class label annotations. Remove empty class body declarations and let
relationships define nodes implicitly. All descriptive text now appears
as class display labels instead of separate notes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Attempt to addres intermittient GH workflow failures
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fixed bug
* Refactor DialogTests and add sizing regression tests
- Refactored DialogTests.cs to use concise object and array initializers, improving readability and consistency.
- Added two regression tests to ensure Dialog sizing never exceeds screen/container bounds:
- Dialog_Frame_Clamped_To_Container
- Dialog_Height_Never_Exceeds_Screen_Height
- Updated drawing tests to use indented multiline string literals for expected output.
- Improved test output with additional debug info via ITestOutputHelper.
- Made minor code cleanups (e.g., variable declarations, property immutability).
- No changes to Dialog implementation; all updates are to test code only.
* New workflow that will analyze the dmp file on the macos runner.
* Fixes#4629 -
* Update Terminal.Gui/App/Keyboard/KeyboardImpl.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add redraw propagation and arrangement tests, refactor tests
Adds new tests to verify redraw propagation when moving views
and when multiple runnables are stacked, addressing issues
#4623 and #4629. Refactors existing tests in
BorderArrangementTests.cs and NeedsDrawTests.cs for clarity,
resource management, and consistency. Improves object
initialization, assertion messages, and removes unnecessary
code. Ensures redraw logic is robust in complex view
arrangements and improves overall test reliability.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan
* Refactor MouseGrabView to WeakReference - Core implementation complete
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Replace MouseGrabView with IsGrabbed(view) in test files
Updated test files to use the new IsGrabbed(view) method instead of the deprecated MouseGrabView property:
- Assert.Equal(view, mouse.MouseGrabView) → Assert.True(mouse.IsGrabbed(view))
- Assert.Null(mouse.MouseGrabView) → Assert.False(mouse.IsGrabbed(anyView))
- mouse.MouseGrabView == view → mouse.IsGrabbed(view)
- mouse.MouseGrabView != view → !mouse.IsGrabbed(view)
- Updated method names and comments referencing MouseGrabView
Files updated:
- Tests/UnitTests/Application/Mouse/ApplicationMouseTests.cs
- Tests/UnitTestsParallelizable/ViewBase/Mouse/HighlightStatesTests.cs
- Tests/UnitTestsParallelizable/Application/RunTests.cs
- Tests/UnitTestsParallelizable/Application/Runnable/RunnableIntegrationTests.cs
- Tests/UnitTestsParallelizable/Application/ApplicationImplTests.cs
- Tests/UnitTestsParallelizable/Application/InitTests.cs
- Tests/UnitTests/View/Adornment/ShadowStyleTests.cs
- Tests/UnitTests/View/ArrangementTests.cs
- Tests/UnitTests/View/Mouse/MouseTests.cs
All tests pass successfully.
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Complete MouseGrabView refactoring - tests and documentation updated
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Fix mouse grab enter/leave logic - check grab state first
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Improve null-conditional pattern consistency for IsGrabbed calls
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Fix code style - use target-typed new() for WeakReference
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Code clean up and org.
* Code cleanup and better docs.
* Add IMouseGrabHandler.IsGrabbed() and related tests
Introduce a new parameterless IsGrabbed() method to IMouseGrabHandler, allowing checks for any active mouse grab regardless of view. Implement this method in MouseImpl, using WeakReference to determine grab state. Add comprehensive unit tests in ApplicationMouseTests and MouseInterfaceTests to verify correct behavior across grab, ungrab, disposal, and state reset scenarios. Also, perform minor code cleanups in MouseInterfaceTests.cs for clarity and consistency.
* code cleanup
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
- Clarified and unified ListView selection and marking logic for all four ShowMarks/MarkMultiple combinations (standard, hidden marks, radio button, checkbox).
- Moved command and key/mouse binding setup to new SetupBindingsAndCommands method in ListView.Commands.cs.
- Refactored mouse and keyboard event handling to ensure correct marking/selection behavior for all input types and modes.
- Improved and documented marking methods (MarkUnmarkSelectedItem, MarkAll, UnmarkAll, UnmarkAllButSelected) with clear behavior for each mode.
- Updated and expanded unit tests, including new ListViewTests_Combinations.cs for comprehensive coverage of all combinations and transitions.
- Improved code organization, comments, and documentation throughout for maintainability and clarity.
- Result: more robust, predictable, and testable ListView selection/marking system.
Renamed AllowsMarking → ShowMarks and AllowsMultipleMarking → MarkMultiple for clarity. ShowMarks now controls mark glyph visibility; MarkMultiple controls checkbox vs radio button behavior. Updated all usages, docs, UI, and tests. Refactored drawing logic for all combinations. IListDataSource and related comments updated for new terminology. Improves API clarity and marking flexibility.
Introduce AllowXPlusWidthGreaterThanContentWidth, AllowYPlusHeightGreaterThanContentHeight, and AllowLocationPlusSizeGreaterThanContentSize flags to enable viewport overscroll and blank space beyond content. Update clamping logic in View to respect these flags. Refactor ViewportSettingsFlags enum for clarity. Enable overscroll by default in TextView. Update and expand tests to cover new behaviors and ensure backward compatibility.
* New workflow that will analyze the dmp file on the macos runner.
* Add IValue<T> implementation plan document
Documents the plan to standardize IValue<T> interface across all
value-bearing Views, including:
- Non-generic IValue interface for command propagation
- Classification of Views that should/shouldn't implement IValue<T>
- Phased implementation approach
- Testing strategy
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add non-generic IValue interface
Phase 1 of IValue standardization:
- Add IValue interface with GetValue() method for boxed value access
- Update IValue<T> to inherit from IValue
- Add default implementation: IValue.GetValue() => Value
- Add unit tests for GetValue() and polymorphic usage
This enables command propagation to carry values without knowing
the generic type, supporting CommandContext.Value population.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* NumericUpDown implements IValue<T> with CWP events
- NumericUpDown<T> now implements IValue<T>
- Changed events from CancelEventArgs<T>/EventArgs<T> to
ValueChangingEventArgs<T>/ValueChangedEventArgs<T>
- Added virtual OnValueChanging and OnValueChanged methods
- Updated UICatalog scenarios for new event signatures
- Changed .Cancel to .Handled
- Updated event handler type arguments
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Implement IValue on CheckBox, TextField, and SelectorBase
- CheckBox implements IValue with GetValue() returning CheckedState
- TextField implements IValue with GetValue() returning Text
- SelectorBase implements IValue with GetValue() returning Value (int?)
- OptionSelector<TEnum> overrides GetValue() to return typed enum value
- FlagSelector<TFlags> overrides GetValue() to return typed flags value
- Added unit tests for all IValue implementations
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Implement IValue<T> on remaining value-bearing Views
- ScrollBar: IValue<int> mapping to Position
- DateField: IValue<DateTime?> mapping to Date
- TimeField: IValue<TimeSpan> mapping to Time
- DatePicker: IValue<DateTime> mapping to Date
- ListView: IValue<int?> mapping to SelectedItem
- CharMap: IValue<Rune> mapping to SelectedCodePoint
Also updates ValueChangedEventArgs usage from .Value to .NewValue
across UICatalog scenarios and tests.
Updates ivalue-implementation-plan.md with:
- Completion status for all implementations
- Detailed analysis of LinearRange<T> design challenges
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* cleanup
* revised
* 1. CheckBox - Removed CheckedState, CheckedStateChanging, CheckedStateChanged. Now uses Value, ValueChanging, ValueChanged.
2. ScrollBar - Removed Position, PositionChanging, PositionChanged. Now uses Value, ValueChanging, ValueChanged.
3. DateField - Removed Date, DateChanged. Now uses Value, ValueChanged.
4. TimeField - Removed Time, TimeChanged. Now uses Value, ValueChanged.
5. DatePicker - Removed Date property. Now uses Value.
6. ListView - Removed SelectedItemChanged. Now uses ValueChanged. SelectedItem is kept as a semantic alias for Value.
7. CharMap - Removed SelectedCodePointChanged. Now uses ValueChanged. SelectedCodePoint is kept as a semantic alias for Value.
8. ColorPicker - Removed ColorChanged. Now uses ValueChanged. SelectedColor is kept as a semantic alias for Value.
9. ColorPicker16 - Added IValue<ColorName16> implementation with Value, ValueChanging, ValueChanged.
Files Updated Across Codebase
- Examples: UICatalogRunnable.cs, TimeAndDate.cs, ScrollBarDemo.cs, CharacterMap.cs, Wizards.cs, Scrolling.cs, Themes.cs,
TextInputControls.cs, PromptExample/Program.cs, and many scenario files
- Tests: CheckBoxTests.cs, ScrollBarTests.cs, TimeFieldTests.cs, DateFieldTests.cs, DatePickerTests.cs, IValueTests.cs, and
others
Event Args Changes
- CheckedStateChangingEventArgs → ValueChangingEventArgs<CheckState> with NewValue (not Result)
- CheckedStateChangedEventArgs → ValueChangedEventArgs<CheckState> with NewValue (not Value)
- Similar pattern for all other views
* Code cleanup
* fixed merge issues
* Fixed regression
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>