Migrate to Avalonia 12 and update project structure and samples#6
Migrate to Avalonia 12 and update project structure and samples#6Onebeld merged 94 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
…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. |
Thanks for the screenshots! I've already launched the demo and looked at it.
Regarding versioning: you're developing version 5.1.* in your project, but the library is currently still in alpha version 5.0.0. Which versioning should we keep—the current one (5.0.0 will be released) or yours? I just have one question: in workflows, specifically in the release.yml file, I understand that AI is used to describe changes, using the OpenAI model. If we merge the PRs, how much will the API usage cost be, and who will need to pay? And if you don't mind, I can assign you as a co-author on this project so you can make any necessary changes |
Github models api is free while it is in public preview https://docs.github.com/ru/github-models/about-github-models - so for now no cost As for versioning - i bumped it to 5.1 since theres been many changes made - so the version bump can stick |
|
Okay! Anyway, let me know as soon as the PR is ready, and we'll merge it. |
…ization - Add SelectionList and SelectionListItem controls to PleasantUI library - Create SelectionListPage example with vertical and horizontal demonstrations - Add SelectionListPageView with XAML UI showcasing different list orientations - Register SelectionList in control factory with ViewListOutline icon - Add English and Russian localization strings for SelectionList examples - Include styling theme for SelectionList control in Controls.axaml - Support multi-select functionality with image thumbnails, titles, and timestamps
…ation and image templates - Refactor SelectionListPageView to generate items dynamically with CreateItems() method - Add colored placeholder panels as ImageTemplate for each item with initial letters - Implement CreateChipItems() helper method for chip item collection initialization - Update ImageTemplate ContentPresenter to stretch fill instead of center align - Remove redundant Content binding from ImageTemplate presenter - Simplify ReinitializeComponent() to single-line lambda expression - Add necessary Avalonia imports for layout and media support
…nd dynamic page routing - Reorganize NavigationView with nested NavigationViewItems grouped by category (BasicControls, PleasantControls, ToolKit) - Add Tag-based routing system to dynamically load pages based on selected navigation item - Implement MainView code-behind logic to handle navigation item selection and content switching - Add x:Name references to navigation items for programmatic access - Set HomeNavItem as initially open with SelectOnClose enabled for improved UX - Consolidate scattered navigation items into logical category groups for better discoverability - Replace static content binding with dynamic page loading mechanism
|
alright its probably as ready as its gonna get - made all improvements i wanted so far |
|
just gonna do the commits of fixing a subitem select bug in nav view |
- Remove early return when item is already selected to allow proper deselection of other items - Simplify SelectSingleItem logic by always running deselection flow - Maintain CloseAllSubMenuPopups call to prevent open submenu popups during selection - Fixes issue where selecting an already-selected item would not properly deselect other items
…e management - Add _lastLeafItem tracking to maintain reference to previously selected leaf NavigationViewItem - Implement ClearLastLeaf() method to explicitly deselect leaf items when switching to top-level navigation items - Refactor OnNavigationSelectionChanged to distinguish between top-level items (Tag is null) and leaf items - Clear previous leaf selection before tracking new leaf item to prevent stale selection state - Add clarifying comments explaining the selection behavior and why HomeNavItem must remain selected - Remove unnecessary blank line in NavigationView.cs for consistency - Ensure leaf items are properly deselected when user navigates away, preventing visual inconsistencies in the UI
























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.