mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
fb4043afbce6c4f57d7c7e5b284df3f8749b110b
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fb4043afbc |
Fixes #3829. Rename Slider to LinearRange and implement CWP (#4509)
* Initial plan * Rename Slider to LinearRange - files and code updated Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix variable name mismatches in scenario files Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix typos in comments identified by code review Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update HelpText for consistency with LinearRange rename Co-authored-by: tig <585482+tig@users.noreply.github.com> * Refactor LinearRange properties to use CWP with CWPPropertyHelper - Added CWP events (Changing/Changed) for Type, LegendsOrientation, MinimumInnerSpacing, ShowLegends, ShowEndSpacing, and UseMinimumSize properties - Used CWPPropertyHelper for consistent property change workflow - Added virtual OnChanging/OnChanged methods for each property - All existing tests pass Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix CWP property implementations - remove duplicate field updates in doWork - CWPPropertyHelper updates the ref parameter, so doWork should only contain side effects - Fixed Type, MinimumInnerSpacing, LegendsOrientation, ShowLegends, ShowEndSpacing, and UseMinimumSize - Added comprehensive CWP tests for property changes (9 new tests, all passing) - All 45 pre-existing LinearRange tests still pass (10 were already failing before changes) Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add fluent integration tests for LinearRange - Created LinearRangeFluentTests with 5 test scenarios - Tests cover rendering, navigation, type changes with CWP events, range selection, and vertical orientation - All tests build successfully Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix unit tests and address review comments - Fixed review comments: Updated Title properties from "_Slider" to "_LinearRange" in DimAutoDemo and ViewportSettings - Fixed review comment: Renamed filterSlider to filterLinearRange in Mouse.cs - Fixed CWP implementation: Use local variable instead of backing field as ref parameter to CWPPropertyHelper - This ensures doWork can update the backing field BEFORE SetContentSize() reads it - All 55 LinearRange tests now passing (was 45/55, now 55/55) Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update DimAutoDemo.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update ViewportSettings.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * code cleanup * Refactor LinearRanges scenario for clarity and modularity Refactored the LinearRanges scenario to separate UI setup, configuration, and event logic. The Main() method now handles all UI layout, configuration controls, and event wiring, while MakeSliders() is responsible only for adding LinearRange controls to the main window. Updated event handlers to use discard parameters for unused arguments and modernized code with collection initializers and LINQ. This results in a clearer separation of concerns and improved maintainability. * un did change * cleanup * cleanup * cleanup * fixed unit test code cleanup --------- Co-authored-by: Tig <tig@users.noreply.github.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: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
4145b984ba |
Fixes #2485 ++ - Wizard v2 architecture modernization with Padding-based layout (#4510)
* Initial plan * Fix Wizard v2 architecture issues - ScrollBar API, event handlers, key bindings Co-authored-by: tig <585482+tig@users.noreply.github.com> * Implement issue #4155 - Put nav buttons in bottom Padding, Help in right Padding Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address code review feedback - Extract helper method, improve null checks Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fix disposal issue - Ensure _helpTextView is always disposed Co-authored-by: tig <585482+tig@users.noreply.github.com> * Refactor & improvements. WIP * Tweaking layout * Wizard tweaks * Added View.GetSubViews that optinoally gets subviews of adornments * Refactor Wizard API: modern events, layout, and design - Replaced custom event args with standard .NET event args (CancelEventArgs, ValueChangingEventArgs, etc.) - Removed Finished event; use Accepting for wizard completion - Updated Cancelled, MovingBack, MovingNext to use CancelEventArgs - Refactored UICatalog scenarios and tests to new event model - Improved WizardStep sizing and wizard auto-resizing to content - Enhanced IDesignable for Wizard and WizardStep with richer design-time UI - Simplified help text padding logic in WizardStep - Removed obsolete code and modernized code style throughout - Improves API consistency, usability, and .NET idiomatic usage * Fixes #4515 - Navigating into and out of Adornments does not work * WIP. QUite broken. * All fixed? * Tweaks. * Exclude Margin subviews from drawing; add shadow tests Update Margin adornment to skip drawing subviews that are themselves Margin views, preventing unsupported nested Margin rendering. Add unit tests to verify that opaque-shadowed buttons in Margin are not drawn, while Border and Padding still support shadow rendering. Update test class to use output helper and assert driver output. * Final code cleanup and test improvements. * Update Margin.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update View.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update View.Hierarchy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update View.Hierarchy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactor: code style, formatting, and minor logic cleanup - Standardized spacing and formatting for method signatures and object initializations. - Converted simple methods and properties to expression-bodied members for conciseness. - Replaced named arguments with positional arguments for consistency. - Improved XML documentation formatting for readability. - Simplified logic in event handlers (e.g., Wizard Back button). - Removed redundant checks where properties are guaranteed to exist. - Fixed minor bugs related to padding, height calculation, and event handling. - Adopted consistent use of `var` for local variables. - Corrected namespace declarations. - Refactored methods returning constants to use expression-bodied syntax. - General code cleanup for clarity and maintainability; no breaking changes. * api 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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |