Commit Graph
2858 Commits
Author SHA1 Message Date
chinboy bd3ccc812f refactor(Calendar,DatePicker): remove unused theme references from multiple files 2026-05-05 15:13:45 +08:00
chinboy 470946e31b refactor(Popup,ShadowsAwareContainer): rename overlay layer variable and optimize shadow configuration 2026-05-05 15:08:38 +08:00
chinboy a24627f2f3 refactor(TimePicker,RangeTimePicker): update bindings and clean up unused code 2026-05-05 14:13:39 +08:00
chinboy 9839504497 refactor(Flyout,Menu,Popup): rename ShouldUseOverlayLayer to ShouldUseOverlayPopup for consistency 2026-05-05 13:05:47 +08:00
chinboy b73c5b1ee6 refactor(Calendar,DatePicker,TimePicker): replace theme constants with string literals 2026-05-05 12:49:53 +08:00
chinboy 57802f76b9 gallery(TimePicker): port TimePickerShowCase from release/5.0 to release/6.0 with Avalonia 12
- Add TimePickerViewModel with const string ID (release/6.0 pattern)
- Add TimePickerShowCase AXAML with x:DataType for compiled bindings
- Add TimePickerShowCase code-behind with ReactiveUserControl
- Register ViewModel in CaseNavigationViewModel
- Register View mapping in ShowCaseRegister
- Add menu item to CaseNavigation.axaml under DataEntry category
- Add Chinese language resource: DataEntry_TimePicker = "TimePicker 时间选择框"
- Add English language resource: DataEntry_TimePicker = "TimePicker"
- All 7 registration steps completed for Gallery integration
2026-05-05 12:30:33 +08:00
chinboy eba166cdcb docs(skill): add MathUtilities → MathUtils migration guide to Avalonia 12 skill
- Document that Avalonia.Utilities.MathUtilities is now internal in Avalonia 12
- Add detection pattern for MathUtilities usage
- Document fix: use AtomUI.Utils.MathUtils as public wrapper
- Explain that MathUtils provides identical epsilon-based floating-point comparison methods
2026-05-05 12:22:58 +08:00
chinboy 42b0851a26 feat(DatePicker,TimePicker): migrate InfoPickerInput, TimePicker and DatePicker to Avalonia 12
- Remove obsolete Flyout Predicate mechanisms (OpenFlyoutPredicate, ClickHideFlyoutPredicate)
- Remove FlyoutPresenterCreated event subscription (event removed in Avalonia 12)
- Remove IsDetectMouseClickEnabled property (removed in Avalonia 12)
- Remove custom Tab key handling using internal APIs (FocusUtils, KeyboardNavigationHandler)
- Fix Flyout property bindings: PopupFlyoutBase.* → Flyout.* (MarginToAnchor, IsMotionEnabled)
- Fix gesture event: Gestures.ScrollGestureEndedEvent → InputElement.ScrollGestureEndedEvent
- Replace internal MathUtilities with AtomUI.Utils.MathUtils
- Fix PickerClearUpButton property registration typo (SelectHandle → PickerClearUpButton)
- Add minimal ListViewToken for TimeViewCell theme support
2026-05-05 12:20:32 +08:00
chinboy e8fec601ea feat(TimePicker): add TimePicker and RangeTimePicker controls with Avalonia 12 support
- Add TimePicker and RangeTimePicker controls with time selection UI
- Add InfoPickerInput base control for picker-style inputs
- Add TimeView, TimePickerPresenter, and TimePickerFlyout components
- Add localization resources (en_US, zh_CN)
- Fix RenderScaleAwareDoubleConfigure for Avalonia 12 (use IPresentationSource.RenderScaling)
- Add placeholder files for TimePickerShowCase
2026-05-05 10:51:17 +08:00
chinboy 69a9734e82 refactor(NavMenu): replace theme constants with string literals 2026-05-04 20:38:38 +08:00
chinboy 8ba4cab055 fix(NavMenu): remigrate from release/5.0 to fix selection state bug and optimize HashSet creation
- Remove incorrectly added logic in HandleSubMenuOpenChanged (SetCurrentValue(IsSelectedProperty, true) and SelectedIndex = -1)
- Remove incorrectly added methods (PointerMoved, KeyDown, HandleKeyDown) and special top-level handling in NotifyPointerEntered/NotifyPointerExited
- Optimize HashSet creation in Select method by using ToHashSet() directly instead of foreach loop
- Update migrate-to-avalonia12 skill to emphasize preserving control behavior during migration
2026-05-04 20:31:44 +08:00
chinboy 235d89b1b0 refactor(Flyouts,Popup): improve popup positioning and token bindings
Refactor flyout and popup components to improve positioning behavior, token resource bindings, and internal API access for ContextMenu integration.

**Flyout Token Improvements:**
- Change Flyout.MotionDuration binding from CreateTokenBinding to CreateGlobalTokenBinding for consistency
- Add HorizontalOffset and VerticalOffset properties to FlyoutHostToken (default to SharedToken.UniformlyMarginXS)
- Bind MenuFlyout HorizontalOffset/VerticalOffset to FlyoutHostToken values
- Set MenuFlyout.ShouldUseOverlayLayer default to true

**ContextMenu Theme:**
- Add ShouldUseOverlayLayer, MotionDuration, PopupRootShadow, OverlayHostShadow setters to ContextMenuTheme
- Enable overlay layer and motion support for ContextMenu by default

**Popup Positioning Fix:**
- Fix PopupUtils.CalculatePopupPositionAndAnchor for PlacementMode.Pointer with overlay host
- Apply marginToAnchor first, then add shadowThickness only when not using overlay host
- Prevents double-offset when overlay host already handles shadow spacing

**Internal API Access:**
- Change Popup.HandleCustomPlacement from private to internal
- Allows ContextMenu to set CustomPopupPlacementCallback = _popup.HandleCustomPlacement

**Cleanup:**
- Remove commented-out code in NavMenuItemTheme.axaml
- Remove duplicate PaginationThemeConstants.cs (already committed in previous commit)
- Update generated files (LanguageResourceConst.g.cs, TokenResourceConst.g.cs)
2026-05-04 17:42:13 +08:00
chinboy 8efccc68f0 feat(MenuShowCase): port MenuShowCase from release/5.0 to release/6.0 with Avalonia 12 upgrades
Port MenuShowCase component from release/5.0 branch to release/6.0, upgrading to Avalonia 12 standards and fixing compatibility issues.

**MenuShowCase Port:**
- Add MenuViewModel with IActivatableViewModel pattern
- Add MenuShowCase.axaml with 14 showcase items (basic menu, ItemsSource, NavMenu modes, icons, toggle types, scrollable, context menu, menu flyout)
- Add MenuShowCase.axaml.cs with ReactiveUserControl pattern and proper disposal
- Register in ShowCaseRegister and CaseNavigationViewModel
- Add localization entries (en_US: "Menu", zh_CN: "Menu 导航菜单")
- Add navigation menu item in CaseNavigation.axaml

**Avalonia 12 Compatibility Fixes:**
- Remove Flyout.HorizontalOffset/VerticalOffset (removed in Avalonia 12)
- Fix Visual parent conflict: create separate NavMenuNode trees for InlineModeMenu and ItemsSourceDemoNavMenu (Avalonia 12 enforces strict single-parent rule for Visuals)
- Add ItemsSourceDemoNavMenuNodes property to avoid sharing INavMenuNode instances with Icon Visuals across multiple NavMenu controls

**ContextMenu Avalonia 12 Migration:**
- Refactor ContextMenu popup creation to match Avalonia 12 architecture
- Rename MenuReflectionExtensions.cs to ContextMenuReflectionExtensions.cs
- Add reflection accessors for ContextMenu private methods (PopupOpened, PopupClosed, PopupClosing, PopupKeyUp)
- Implement lazy popup creation in CreatePopup() method (called by base class Open() when _popup is null)
- Add proper event handler delegation to base class methods via reflection
- Add PopupRootShadow, OverlayHostShadow, MotionDuration, OpenMotion, CloseMotion properties
- Bind AtomUI-specific properties (ShouldUseOverlayLayer, IsMotionEnabled, shadows, motions) to internal Popup instance
- Fix CustomPopupPlacementCallback handling via Popup.HandleCustomPlacement
- Add TakesFocusFromNativeControl property (matches Avalonia base class behavior)

**Technical Details:**
- Avalonia 12 ContextMenu uses _popup field (not _popupLazy like PopupFlyoutBase)
- Base class Open() method creates popup if null, then syncs all placement properties
- AtomUI CreatePopup() injects customized Popup via reflection before base class creates default one
- Use AddClosingEventHandler instead of Closing += (AtomUI Popup uses extension method)
2026-05-04 17:38:35 +08:00
chinboy 10d4dcf3ad feat(Pagination): add pagination controls and localization resources 2026-05-03 22:28:55 +08:00
chinboy c6c8525688 feat(CaseNavigation): add ProgressBar view model and update resources 2026-05-03 21:27:12 +08:00
chinboy d52e188a85 feat(CaseNavigation): add Watermark view model and menu item 2026-05-03 21:13:38 +08:00
chinboy 2c69a768a2 feat(CaseNavigation): add InfoFlyout to navigation and view model registration 2026-05-03 20:58:25 +08:00
chinboy 96b0953978 feat(ResultShowCase): add ResultShowCase view and view model for displaying results 2026-05-03 19:32:41 +08:00
chinboy 5817add4b5 fix(TabControl): explicitly set IsLightDismissEnabled for overflow menu flyouts 2026-05-03 16:32:02 +08:00
chinboy d298894449 gallery(TabControl): migrate TabControlShowCase from release/5.0 to Avalonia 12 2026-05-03 16:31:34 +08:00
chinboy bb0dcbfe8a fix(Flyout): add IsLightDismissEnabled property and bind to Popup 2026-05-03 16:30:38 +08:00
chinboy b1e5d7005b gallery(QRCode): migrate QRCodeShowCase from release/5.0 to Avalonia 12 2026-05-03 15:58:57 +08:00
chinboy 296753b907 gallery(LineEdit): migrate LineEditShowCase from release/5.0 and fix TextBox reflection
- Add LineEditShowCase with Avalonia 12 compiled bindings
- Register LineEdit in Gallery navigation (ViewModel factory, View mapping, localization)
- Fix TextBoxReflectionExtensions: remove ScrollViewer_ScrollChanged reflection (method removed in Avalonia 12)
- Simplify TextArea.NotifyScrollViewerCreated: remove ScrollChanged event subscription
2026-05-03 15:47:52 +08:00
chinboy 7b422990bf feat(QRCode): add QRCode control with Avalonia 12 compatibility 2026-05-03 15:10:08 +08:00
chinboy 20be12826c chore: update skill triggers, enable Timeline theme, and add TLAIC logo 2026-05-03 14:40:00 +08:00
chinboy 58806a24d4 gallery(Timeline): register Timeline showcase in navigation menu 2026-05-03 14:38:24 +08:00
chinboy 20375b414f gallery(Timeline): migrate TimelineShowCase from release/5.0 to Avalonia 12 2026-05-03 14:09:34 +08:00
chinboy 176750304a chore(Window,TabControl): remove theme constants and inline strings 2026-05-03 13:38:49 +08:00
chinboy 8d0f6089c2 chore(Steps): remove StepsThemeConstants and inline constants 2026-05-03 13:12:19 +08:00
chinboy 844a881567 chore(Splitter): remove SplitterThemeConstants and inline constants 2026-05-03 13:05:18 +08:00
chinboy dc8f0ade90 chore(CompactSpace): remove CompactSpaceThemeConstants and inline constants 2026-05-03 12:58:50 +08:00
chinboy 4de1727a35 chore(Slider): remove SliderThemeConstants and inline constants 2026-05-03 12:53:49 +08:00
chinboy cd4fa8e48e chore(Skeleton): remove SkeletonThemeConstants and inline constants 2026-05-03 12:50:30 +08:00
chinboy 1ff59bdf20 chore(ScrollViewer): remove ScrollViewerThemeConstants and inline constants 2026-05-03 12:44:37 +08:00
chinboy 2183268617 chore(NumericUpDown): remove NumericUpDownThemeConstants and inline constants 2026-05-03 12:41:45 +08:00
chinboy 7f8c52fc52 chore(Notifications): remove unused NotificationsThemeConstants 2026-05-03 12:39:15 +08:00
chinboy 5fe915aa53 fix(NumericUpDown): 替换 TextBoxThemeConstants 为内联字符串 2026-05-03 12:37:36 +08:00
chinboy 1fd53361b3 chore(Input): remove InputThemeConstants and inline constants 2026-05-03 12:34:00 +08:00
chinboy 5d1d4d6542 chore(HeaderedContentControl): remove HeaderedContentControlThemeConstants and inline constants 2026-05-03 12:30:31 +08:00
chinboy 10f7cf616c chore(GroupBox): remove GroupBoxThemeConstants and inline constants 2026-05-03 12:29:06 +08:00
chinboy 352e97b4d5 chore(Expander): remove ExpanderThemeConstants and inline constants 2026-05-03 12:27:03 +08:00
chinboy 5945368c84 chore(ComboBox): remove unused ComboBoxThemeConstants 2026-05-03 11:40:14 +08:00
chinboy 9af1e0321e chore(Collapse): remove CollapseThemeConstants and inline constants 2026-05-03 11:38:23 +08:00
chinboy 249ae19e06 chore(Calendar): remove CalendarThemeConstants and inline constants 2026-05-03 11:30:46 +08:00
chinboy 25da94844f chore(Alert): remove AlertThemeConstants and inline constants 2026-05-03 11:21:56 +08:00
chinboy af3d4901ce chore(Timeline): remove unused TimelineThemeConstants 2026-05-03 11:20:09 +08:00
chinboy 4d6ddb7938 feat(Badge): add Badge control with Avalonia 12 compatibility 2026-05-03 11:15:58 +08:00
chinboy 1e3169c87d feat(SplitView): add SplitView control with motion support 2026-05-03 11:04:25 +08:00
chinboy 68039b7178 gallery(Result): port ResultShowCase from release/5.0 with Avalonia 12 adaptation 2026-05-03 10:50:09 +08:00
chinboy 35c197c991 gallery(GroupBox): port GroupBoxShowCase from release/5.0 with Avalonia 12 adaptation 2026-05-03 10:44:11 +08:00