Migrate to Avalonia 12 and update project structure and samples#6
Migrate to Avalonia 12 and update project structure and samples#6ghudulf wants to merge 87 commits intoOnebeld:mainfrom
Conversation
- Add Kiro specs for Avalonia 12 migration with bugfix requirements and design documentation - Update all project files to target Avalonia 12 package versions - Update PleasantUI.MaterialIcons target framework from netstandard2.0 to net8.0 - Remove Avalonia.Diagnostics package references (removed in Avalonia 12) - Replace ExtendClientAreaChromeHints enum usage with Avalonia 12 equivalents - Replace ExtendClientAreaTitleBarHeightHint property with new API - Replace SystemDecorations with WindowDecorations enum - Remove ExtendClientAreaToDecorationsHint property calls - Update window decoration and chrome handling in PleasantWindow, PleasantMiniWindow, and PleasantTitleBar - Update ModalWindowHost, NavigationView, and ShadowBorder for Avalonia 12 compatibility - Update SmoothScrollContentPresenter scroll handling API - Update ThemeService and ThemeEditorWindow for theme management changes - Update XAML control themes for BasicControls and PleasantControls styling compatibility - Update sample projects (Desktop, Browser, Android) to Avalonia 12
- Remove ItemContainerGenerator dependency and replace with VirtualizingPanel container APIs - Replace this.GetVisualRoot() is ILayoutRoot with TopLevel.GetTopLevel(this) is not null in ScrollIntoView - Update method references from RecycleElement to RecycleElementCore, RecycleElementOnItemRemoved to RecycleElementOnItemRemovedCore, and UpdateElementIndex to UpdateElementIndexCore - Simplify GetRecycledElement to use PrepareContainerForIndex instead of generator methods - Simplify CreateElement to use GetOrCreateElement helper method - Replace ItemContainerGenerator.ClearItemContainer calls with RecycleElement and RecycleElementOnItemRemoved - Update UpdateElementIndex to use base class implementation - Add Andrey Savich (pieckenst) as co-author in Package.props - Mark migration tasks 6.5 and 6.6 as in-progress
- Remove Avalonia.Controls.Generators and Avalonia.Utilities usings - Replace ItemContainerGenerator usages with Avalonia 12 VirtualizingPanel container APIs in VirtualizingWrapPanel.cs - Replace MathUtilities.IsZero() calls with Math.Abs() comparisons for floating-point checks - Replace MathUtilities.AreClose() calls with direct double comparison logic - Update LayoutHelper.RoundLayoutSizeUp() calls to use new Avalonia 12 signature (remove scale parameter duplication) - Change CanHorizontallyScroll and CanVerticallyScroll from private to public properties in SmoothScrollViewer - Replace this.GetVisualRoot() is ILayoutRoot with TopLevel.GetTopLevel(this) is not null in ScrollIntoView - Update migration task checklist to mark sections 6.5 and 6.6 as complete
- Remove WindowDrawnDecorations wrapper from PleasantMiniWindow and PleasantWindow - Move title bar Panel outside of WindowDrawnDecorations to VisualLayerManager level - Add ZIndex="1" to title bar Panel for proper layering - Simplify visual hierarchy by flattening decoration structure - Maintain all existing title bar functionality (pin button, drag area, close/minimize buttons) - Improves rendering performance and z-order management in Avalonia 12
- Remove Avalonia.Utilities dependency from SerilogSink and replace CharacterReader with manual string indexing - Update ThemeService clipboard operations with null-coalescing pattern for safer null handling - Replace CompiledBinding with Binding in ColorView for compatibility - Update ThemeEditorWindow event handlers to use Avalonia 12 event signatures (FocusChangedEventArgs) - Replace DataFormat.Files with DataFormat.File and use IAsyncDataTransfer.TryGetFilesAsync() - Refactor window control templates in PleasantMiniWindow and PleasantWindow for Avalonia 12 layout system
- Remove PleasantUI.Example.Browser project and all related files - Delete browser-specific XAML views and code-behind files - Remove web assembly configuration and wwwroot assets - Update global.json SDK version from 8.0.0 to 9.0.0 - Remove browser project references from solution file - Simplify sample projects to focus on desktop targets
…ia 12 - Update MainActivity to extend non-generic AvaloniaMainActivity and remove CustomizeAppBuilder override - Add AndroidApp class extending AvaloniaAndroidApplication<App> with proper JNI constructor - Add IActivityApplicationLifetime check before ISingleViewApplicationLifetime in App.axaml.cs - Update App.axaml.cs to use MainViewFactory pattern for activity lifetime - Add required using statements for Avalonia.Android and Avalonia.Controls.ApplicationLifetimes - Mark Section 7 tasks as complete in migration checklist
- Replace null! Content properties with actual view instantiations in page classes - Update ControlPageCardItemTemplate layout with flexible sizing (MinWidth/MaxWidth) - Adjust card margins for better spacing consistency - Add missing view imports to Calendar, Carousel, ComboBox, ProgressBar, Slider, and TextBox pages - Update migration task checklist to mark build verification as complete - Ensure all example pages properly initialize their UI content for Avalonia 12
…unctionality - Add carousel navigation handlers to CarouselPageView with previous/next button logic - Implement ProgressBarPageView with determinate, indeterminate, and disabled states plus ProgressRing examples - Populate TextBoxPageView with various input types including password, multiline, read-only, disabled, and NumericUpDown - Expand OptionsDisplayItemPageView with basic items, icon support, navigation, toggle switches, combo boxes, and expandable sections - Expand PleasantTabViewPageView with tab examples demonstrating different tab configurations - Replace placeholder content with functional control demonstrations for the example application
…tionsDisplayItem content - Move AutoCompleteBox items from XAML to code-behind initialization in ComboBoxPageView - Bind fruit items dynamically using FindControl and ItemsSource assignment - Wrap OptionsDisplayItem content in explicit Content property element for clarity - Expand ComboBoxPageView constructor to multi-line format for better readability
- Replace direct indexer access with TryGetString method for safer localization lookups - Add fallback to original string values when localization keys are not found - Prevent potential null reference exceptions from missing localization entries - Enhance robustness of message box title and text resolution
- Redesign ControlPageCardItemTemplate with icon in bordered container - Replace WrapPanel with UniformGrid (2 columns) for consistent card layout - Update card dimensions to use HorizontalAlignment="Stretch" instead of fixed widths - Enhance icon styling with 40x40 border and centered 20x20 PathIcon - Adjust spacing and padding for better visual hierarchy - Update text block themes and sizing for improved readability - Fix Russian localization for "WelcomeToPleasantUI" string - Improve overall card presentation and consistency across control pages
… improved layout - Migrate ProgressPage to use ProgressBarPageView instead of ProgressRingPageView - Update namespace import from PleasantControlPages to ControlPages - Simplify Content property to use auto-property initialization - Standardize code formatting with consistent indentation - Add ProgressBarPageView.axaml.cs to project file compilation configuration - Expand ProgressBarPageView with comprehensive control demonstrations including live animated demo with start/reset buttons - Reorganize examples into distinct sections: live demo, indeterminate states, determinate states, and ring sizes - Enhance UI with bordered containers, improved spacing, and descriptive labels for better visual hierarchy - Increase design height from 450 to 600 to accommodate expanded content
- Replace hardcoded strings with localization keys in MainView navigation items - Add 90+ localization entries covering all control pages and UI sections - Update App.resx with English translations for navigation, pages, and controls - Add corresponding Russian translations in App.ru.resx - Implement Localizer class with fallback mechanism for missing translations - Update SettingsViewModel to support theme localization - Localize AboutView, HomePage, and all control page headers and labels - Enable dynamic language switching throughout the application
…descriptions - Replace hardcoded card descriptions with localization keys (Card/*) - Update ControlPageCard model to implement INotifyPropertyChanged for dynamic language switching - Store description keys and resolve them dynamically via Localizer.Instance - Add LocalizationChanged event handler to notify UI of description updates - Align card factory formatting with consistent column spacing for readability - Add localization resource strings for all control and custom control cards in English and Russian
- Replace outdated project description with detailed feature overview - Add complete control inventory table covering all themed Avalonia controls - Document all custom Pleasant controls with descriptions and use cases - Expand theme engine section with list of built-in themes and customization details - Add localization system documentation with code examples - Introduce packages section describing PleasantUI, ToolKit, MaterialIcons, and DataGrid - Simplify Getting Started section with clearer setup instructions - Update package version reference to 5.1.0-alpha1 - Improve code examples with better formatting and clarity - Add visual structure with headers and tables for better readability
- Add build.yml workflow to compile projects on push and pull requests - Configure multi-project build pipeline for PleasantUI, DataGrid, and MaterialIcons - Upload NuGet packages as artifacts after successful builds - Add publish job to push packages to NuGet on release events - Add release.yml workflow to automate GitHub releases from version changes - Extract version from build/Package.props and create tagged releases - Include NuGet packages in release assets for distribution - Enable trusted publishing to NuGet registry using OIDC authentication
- Add timeout-minutes to build and release jobs for better resource management - Implement retry mechanism (3 attempts, 15-30s intervals) for dotnet restore and nuget push operations - Add package verification step to ensure .nupkg files exist before upload - Add if-no-files-found: error to artifact upload for early failure detection - Refactor publish job to download artifacts instead of rebuilding from source - Add pre-release detection based on version string format (hyphen presence) - Add git fetch --tags and improved tag existence validation with logging - Add package verification in publish job before pushing to NuGet - Add --skip-duplicate flag to nuget push for idempotent publishing - Improve error messages and logging throughout workflow steps for better debugging
- Enhance package verification script to search all possible output locations (bin/Release, bin/Release/net*, obj, etc.) - Add detailed diagnostic output showing all discovered .nupkg files under src/ - Improve error messages with directory listings when packages are not found - Refactor verification logic to use clearer variable naming and exit status handling - Apply consistent improvements to both build.yml and release.yml workflows - Better troubleshooting experience when package builds fail or output locations vary
…arget framework - Upgrade target framework from net8.0 to net9.0 - Remove redundant project properties (LangVersion, Nullable, versioning details) - Import shared package configuration from build/Package.props - Add explicit Title property for package metadata - Standardize ProjectReference indentation for consistency - Centralize version and repository management through shared build properties
… ui - you may edit this out later
- Add conditional check for NUGET_KEY secret availability - Include explicit --api-key parameter when secret is present - Fallback to skip-duplicate-only push when secret is unavailable - Improve security by using authenticated pushes when credentials available
- Add workflow_dispatch trigger to build.yml with publish boolean input for manual package publishing - Add workflow_dispatch trigger to release.yml with force boolean input to override existing tag checks - Update build.yml publish job condition to trigger on release events or manual dispatch with publish=true - Update release.yml tag existence check to respect force flag and proceed when explicitly requested - Enable manual control over CI/CD pipeline execution without requiring code changes or releases
…taGridTheme class - Create PleasantDataGridTheme.axaml and PleasantDataGridTheme.axaml.cs as dedicated theme container - Add fallback brush definitions to DataGrid.axaml for standalone rendering support - Update App.axaml to use StyleInclude instead of ResourceInclude for proper theme composition - Add AvaloniaResource item group to csproj for XAML asset inclusion - Improve theme integration by separating DataGrid resources into composable theme class
- Add Department, Salary, and Status properties to DataModel - Update DataModel constructor to accept new properties - Add five new boolean properties to DataGridViewModel for column and grid customization (ShowGridLines, CanUserReorderColumns, CanUserResizeColumns, CanUserSortColumns, ShowRowDetails) - Expand sample data from 5 to 12 records with realistic employee information - Add interactive toolbar with checkboxes to toggle DataGrid features - Implement row details template to display Department and Salary information - Configure DataGrid with auto-generated columns disabled and extended selection mode - Bind grid properties to ViewModel controls for dynamic UI behavior
…tion - Replace static GridLinesVisibility binding with dynamic property handling - Remove RowDetailsVisibilityMode binding and implement programmatic control - Add x:Name reference to MainDataGrid for code-behind access - Implement OnLoaded event handler to subscribe to ViewModel property changes - Add PropertyChanged listener that updates GridLinesVisibility and RowDetailsVisibilityMode based on ViewModel state - Improve separation of concerns by moving binding logic to code-behind event handling
…iff collection - Restructure commit range detection to handle initial releases without previous tags - Expand source diff collection to entire repo (excluding samples/) instead of src/ only - Increase diff capture limit from 1200 to 2500 lines for more comprehensive analysis - Improve public API surface detection with better filtering and deduplication - Add diagnostic logging for previous tag, diff range, commit count, and file statistics - Simplify file list collection to exclude samples/ directory across whole repository - Enhance prompt header with clearer instructions on handling empty diffs and conservative descriptions - Refactor prompt construction to use static header followed by dynamic data appends
…nstead of heredoc - Replace heredoc syntax with printf for improved YAML indentation handling - Eliminate potential YAML parsing issues caused by heredoc indentation - Maintain identical prompt content and structure for release notes generation - Improve shell script robustness by avoiding heredoc edge cases in workflow files
…le pages - Add PleasantDrawer control with DrawerPosition enum for positioning from any edge - Add PopConfirm control with PopConfirmTriggerMode enum for confirmation workflows - Create PleasantDrawerPage and PopConfirmPage example pages with interactive demos - Add PleasantDrawerPageView and PopConfirmPageView XAML views with code-behind - Add styling themes for PleasantDrawer and PopConfirm controls - Add ModalWindowHost styling theme for consistent modal presentation - Update ControlPageCardsFactory to register new control pages in example app - Add localization strings for both controls in English and Russian - Update IconGeometries with new icons for drawer and confirm controls - Update Controls.axaml to include new control theme references
- Add null checks before running animations in ContentDialog, PleasantDrawer, and PleasantSnackbar to prevent null reference exceptions - Wrap OnLoaded animation execution in try-catch block with debug output for error tracking - Add Closed event handler to ContentDialog to ensure TaskCompletionSource is properly resolved - Remove unused OnOverlayPressed method from PleasantDrawer - Convert animation calls from fire-and-forget to properly awaited operations where applicable - Improve robustness of popup element animations across the control library
- Add PathPicker control combining TextBox and browse button for path selection - Add PathPickerMode enum supporting OpenFile, SaveFile, and OpenFolder modes - Implement multi-path selection with AllowMultiple property - Add file filtering support with customizable filter patterns - Add SelectedPathsText property for two-way binding to path strings - Add Command support with cancel handling options - Add pseudo-classes for empty and populated states - Add PathPicker styling theme with Avalonia XAML template - Integrate PathPicker into Controls.axaml theme registry
- Add PathPickerPage.cs with localized page implementation - Create PathPickerPageView.axaml with interactive demo showcasing OpenFile, SaveFile, OpenFolder, and multi-select modes - Add PathPickerPageView.axaml.cs code-behind for view logic - Register PathPicker control card in ControlPageCardsFactory - Add English localization strings for PathPicker page, description, and mode labels - Add Russian localization strings for PathPicker page and all UI elements - Demonstrates PathPicker control capabilities with practical usage examples
- Replace DockPanel with Grid layout for better control alignment - Add VerticalContentAlignment property to PathPicker control - Update TextBox styling to inherit background, border, and corner radius from control - Replace PathIcon with Viewbox and Path for better icon rendering consistency - Refactor Compact theme to use Grid layout with integrated button styling - Improve button margin and padding for better visual spacing - Update icon references from FolderRegular to FileImportRegular across themes - Add dynamic text fill color to icon paths for better theme support
- Add PleasantFileChooser control with file and folder browsing capabilities - Add PleasantFileChooserViewModel for managing file system navigation and filtering - Add PleasantFileChooserFilter and PleasantFileChooserItem models for filter and item representation - Add PleasantFileChooser.axaml theme styling for the custom picker UI - Integrate UseCustomPicker property to PathPicker for switching between platform-native and custom UI - Update PathPicker to use PleasantFileChooser when UseCustomPicker is enabled - Add example demonstrating custom picker usage in PathPickerPageView - Update documentation grid to include UseCustomPicker property details - Provides built-in file browser alternative to platform-native storage dialogs
|
This is simply incredible... You've accomplished so much in just one pull request! I was thinking of rewriting the library, but it looks like my plans have changed, hah I see you're still adding to the PR. Let me know when you're ready to merge it; I'll review all the changes in the meantime. |
- Add FullScreenEnterRegular and FullScreenExitRegular icon geometries for full screen toggle - Implement full screen button in PleasantCaptionButtons with state management - Add IsFullScreenButtonVisible property to PleasantWindow for controlling button visibility - Store previous window state before entering full screen to restore on exit - Add :fullscreen pseudo-class to caption buttons for styling full screen state - Update button visibility logic based on window capabilities and full screen state - Add full screen toggle UI control to settings page with localization support - Enhance PleasantTitleBar to properly manage full screen button visibility
… and drag-drop - Add DockArea, SideBar, and ReDock controls for flexible panel management - Implement drag-and-drop behavior for rearranging docked panels via DockAreaDragDropBehavior - Add split view controls (HorizontallySplittedView, VerticallySplittedView) for panel layout - Add OverflowLayoutView for handling overflow content in constrained spaces - Implement SideBarButton with display modes and context menu support for panel navigation - Add comprehensive styling for all docking controls in PleasantDockingStyles.axaml - Add DockingPage example with localized UI demonstrating docking system capabilities - Update icon geometries to support docking UI elements - Add localization strings for English and Russian languages - Update project file to include new docking control files
- Update max-tokens from default to 8000 for improved context handling - Increase max-completion-tokens from 3000 to 8000 to allow longer release notes - Ensures sufficient token budget for comprehensive release note generation with GPT-4o
- Split monolithic prompt into three focused chunks (commits+API, diff part 1, diff part 2) - Implement parallel AI inference passes to handle large diffs within token limits - Remove debug logging (commit count, file count, diff line count) - Extract shared system prompt to reusable template file - Upload prompt artifacts for parallel job consumption - Simplify prompt construction using printf without heredocs - Rename step from "Collect commits and build prompt" to "Collect commits and build context chunks" - Add step output for diff range to enable downstream job access - Improves token efficiency and enables processing of larger changesets across multiple API calls
…rocess - Split single merge step into two parallel merge passes (merge-A for passes 1-3, merge-B for passes 4-6) - Add intermediate consolidation stage to deduplicate findings before final merge - Restructure prompts to guide AI toward category-grouped bullet points in intermediate stages - Increase token allocation for merge steps (8000 max-tokens, 2000 completion-tokens each) - Update final merge prompt to work with two condensed summaries instead of six raw passes - Improve fallback logic to reference intermediate merge outputs instead of all raw passes - Reduces redundancy and improves coherence in final release notes by deduplicating across logical groupings
…ss analysis - Restructure initial system prompt to focus on extracting complete per-file diffs rather than producing final notes - Clarify that first pass output should be structured bullet points grouped by category, not release notes - Update merge prompts (passes 1-3 and 4-6) to emphasize lossless intermediate summaries with deduplication of exact duplicates only - Enhance version and release type formatting in initial prompt context - Add IS_PRERELEASE and VERSION variables for final merge step - Refine final merge prompt instructions to prioritize completeness and proper deduplication across all batches - Improve output format specifications with consistent heading structure and bullet point formatting - Ensures no meaningful changes are dropped during multi-batch analysis and consolidation
- Remove max-completion-tokens parameter from all AI pass steps (passes 1-6) - Remove max-completion-tokens parameter from merge and compress steps - Add explicit save steps to persist each AI pass response to /tmp files - Update prompt building steps to read from persisted /tmp files instead of step outputs - Improves reliability by decoupling AI response persistence from step output availability
- Increase release job timeout from 30 to 60 minutes to accommodate longer processing - Add 15-second delays after each individual AI pass (passes 1-5) to prevent rate limiting - Add 20-second delays after merge and compress operations to allow API recovery - Remove trailing blank line before final merge response step for consistency
- Increase sleep duration after AI pass 1 from 15s to 65s - Increase sleep duration after AI pass 2 from 15s to 65s - Increase sleep duration after AI pass 3 from 15s to 65s - Increase sleep duration after AI pass 4 from 15s to 65s - Increase sleep duration after AI pass 5 from 15s to 65s - Increase sleep duration after AI pass 6 from 20s to 65s - Increase sleep duration after merge-A from 20s to 65s - Increase sleep duration after compress-A from 20s to 65s - Increase sleep duration after merge-B from 20s to 65s - Increase sleep duration after compress-B from 20s to 65s - Standardize all inter-step delays to 65 seconds for consistent pacing
- Replace gpt-4o with gpt-4o-mini in all six initial analysis passes - Replace gpt-4o with gpt-4o-mini in merge and compress steps for both pass groups - Update final merge step to use gpt-5 for enhanced output quality - Reduces inference costs while maintaining release notes generation quality
Onebeld
left a comment
There was a problem hiding this comment.
LGTM!
I'd like to contact you about collaborating. If possible, please contact me via the contact links on my GitHub page.
… loads settings - Split app initialization into two phases: early setup and post-theme setup - Add InitializeFromSettings() method called after PleasantTheme loads persisted settings - Apply persisted language preference after PleasantSettings.Current is available - Add localization strings for full screen toggle (On, Off, FullScreen, ExitFullScreen, FullScreenButton, FullScreenButtonDescription) in English and Russian - Refactor LocalizedUserControl to use weak event pattern for LocalizationChanged subscriptions - Add theme change debug logging in SettingsViewModel - Fix initialization order to prevent language mismatches during app restarts and hot reload scenarios
|
Yea ive been adding onto the controls here and also doing some additions - its plenty of changes - including adding docking and other controls - just been piling on features i need in my apps - so that the ui library has features i personally might use - it can be merged tbh even now - i just keep on adding features i find useful - so thats why there's been this much commits |
i can always send in pull requests later if needed - but yea got a email at - rsncra@gmail.com for contact or ya can ping me via GitHub issues or discussions on the repo instead |
|
heads up on the PleasantPackageIdPrefix in Directory.Build.props - it's currently set to pieckenst.Avalonia12. which prefixes the NuGet package IDs so I could publish test builds without conflicting with the official packages (the README install section reflects this with the pieckenst.Avalonia12.* package names). when you merge and build for an official release you'll want to remove that property from Directory.Build.props and update the install instructions in the README to use the plain PleasantUI, PleasantUI.DataGrid, PleasantUI.MaterialIcons, and PleasantUI.ToolKit package IDs. it only affects package naming, nothing else in the build. |






















Overview
Full migration of PleasantUI from Avalonia 11 to Avalonia 12, covering all breaking API changes across the library, samples, and designer.
Changes
Package updates All projects bumped to Avalonia 12.x. Avalonia.Diagnostics replaced with AvaloniaUI.DiagnosticsSupport. PleasantUI.MaterialIcons target framework updated from netstandard2.0 to net9.0.
Window chrome API Removed ExtendClientAreaChromeHints, ExtendClientAreaTitleBarHeightHint, replaced SystemDecorations with WindowDecorations and updated ExtendClientAreaToDecorationsHint usage in PleasantWindow and PleasantMiniWindow.
Clipboard API GetTextAsync() replaced with TryGetTextAsync() in ThemeService.
Drag-and-drop API Updated to DataFormat.Files, e.DataTransfer, and await GetFilesAsync() in the theme editor drag handler.
Gesture events Gestures.ScrollGestureEvent replaced with InputElement.ScrollGestureEvent.
Renamed members Watermark/PART_Watermark/PART_FloatingWatermark renamed to Placeholder equivalents across 8 XAML files. VisualRoot replaced with TopLevel.GetTopLevel(this) in 4 files. ItemContainerGenerator replaced with Avalonia 12 virtualizing panel container APIs.
Android MainActivity updated to extend AvaloniaMainActivity, AndroidApp class added, IActivityApplicationLifetime check added in App.axaml.cs.
CI/CD Added GitHub Actions workflows for build, automated release on version bump, and NuGet publishing via trusted publishing with API key fallback.