Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Port features from Flowery.Uno to Flowery.NET
Summary
This PR ports several missing controls from the Flowery.Uno implementation to Flowery.NET (Avalonia), ensuring they follow established Flowery.NET patterns including
IScalableControl, design tokens fromDaisyTokens.axaml, and centralized icon management.New Controls Added
DaisyClock - A comprehensive clock control with three modes:
DaisyProductThemeDropdown - A dropdown for selecting product palettes (themes). It can register missing product palettes into
DaisyThemeManagerand applies the selected theme, while staying synced to external theme changes.DaisyIconText - A control that displays an icon and/or text with proper scaling. Supports icon placement (Left, Right, Top, Bottom), size presets, and variant colors.
DaisyPasswordBox - A themed password input control. Features include:
DaisySlideToConfirm - A slide-to-confirm interaction control requiring users to drag a handle to complete an action. Features include:
DaisyPatternedCard - A decorative card control extending
DaisyCardwith configurable background patterns and corner ornaments. Supports generated-tile patterns and themed asset-based rendering.Enhancements to Existing Controls
DaisyButtonGroup - Added selection support with
SelectedIndex(Single mode) andSelectedIndices(Multiple mode), plus items/lifecycle change handling to keep thebutton-group-activevisual state in sync.DaisyCarousel - Port/refactor toward Flowery.Uno parity:
CarouseltoContentControlwith an internal slide containerSelectedIndex,ShowNavigation,WrapAround,Orientation)Mode,SlideInterval) and aSlideChangedevent hook viaFlowerySlideshowController(reusable timer-driven controller supporting sequential + non-repeating random modes)SlideEffect/SlideTransition/TransitionDurationproperties (visual transitions currently minimal/placeholder)DaisyCountdown - Added
Size(DaisySize) styled property + CLR wrapper (defaultMedium), with corresponding AXAML styles for size-based font scalingDaisyDivider - Expanded capabilities beyond the basic divider:
DividerStyle,Ornament,Size,LineThickness,TextBackground) and wired them into rendering/templating.Flowery.Enumsfor reuse/consistency.DaisyDrawer - Ported Flowery.Uno fixes: added
DrawerWidth,DrawerSide,IsDrawerOpen,OverlayMode,ResponsiveMode, andResponsiveThresholdstyled properties withSplitViewsync, plusOpen/Close/Togglehelpers; updated the template so Inline mode pushes content while Overlay mode uses the scrim/slide-in behavior, added edge-swipe open plus pane swipe-to-close gestures for touch scenarios, and exposedSwipeThreshold/EdgeSwipeZonefor gesture tuning (keepsIsPaneOpen/OpenPaneLengthcompatibility for existing Avalonia usage).DaisyExpandableCard - Major "Batteries-Included" enhancements:
UseBatteriesIncludedModeto auto-generate card UI from 14 new convenience properties (Title,Subtitle,Gradient,ExpandedText,IconData, etc.).AnimationDurationproperty (default 300ms).DaisyButtonand semantic theme brushes for professional programmatic UI generation.DaisyIndicator - Ported Uno-style marker behavior: added
Marker,MarkerPosition, andMarkerAlignment, moved positioning to template + code for inside/edge/outside placement (with a 3px inset for inside), and kept legacyBadge*properties for compatibility.DaisyJoin - Added active item highlighting support via
ActiveIndexplus optionalActiveBackground/ActiveForegroundbrushes; applies theme-resource fallbacks and re-applies styling on lifecycle attach and children changes.DaisyLoading - Added 15 new animation variants (42 total) - ✅ Reviewed and tested:
DocumentFlipOn- Document pages sliding in (opening)DocumentFlipOff- Document pages sliding out (closing)MailSend- Letter sliding into envelopeCloudUpload- Cloud with rising arrowCloudDownload- Cloud with falling arrowDocumentStamp- Document with "OK" approval stampDocumentReject- Document with "X" rejection stampChartPulse- Bar chart with pulsing columnsCalendarTick- Calendar with checkmark animationApprovalFlow- Three workflow nodes pulsing in sequenceBriefcaseSpin- Briefcase with wobble animationWin95FileCopy- Papers flying between foldersWin95Search- Flashlight sweeping across foldersWin95Delete- Papers flying into recycle binWin95EmptyRecycle- Papers flying out of recycle binDaisyPagination - Enhanced pagination control with automatic page generation (
TotalPages,MaxVisiblePages,CenterVisiblePages), optional navigation buttons (prev/next, first/last, jump), ellipsis truncation, mouse-wheel navigation, and press-and-hold repeat on nav buttons.DaisyStatusIndicator - Refactored into multiple partial classes for maintainability:
DaisyStatusIndicator.cs- Core control logic and propertiesDaisyStatusIndicator.Animations.cs- Animation helpers and timingDaisyStatusIndicator.StatusGlyphs.cs- Status glyph definitionsDaisyStatusIndicator.Overlays.cs- Overlay rendering logicBatteryusingBatteryChargePercent(0-100)TrafficLight*usingTrafficLightActiveWifiSignal/CellularSignalusingSignalStrength(0-3 / 0-5)DaisyStatusIndicator.Motion.axamlto cover a much broader set of animation variants (keyframe-based transforms/opacity)DaisyStatusIndicator.Effects.axamlwith additional effect-oriented variants (multi-ellipse rings/sweeps and related transforms)DaisySteps - Added JSON-driven steps via
JsonSteps(usable from XAML and C#), restored visible default circle border, and aligned circle/line/font sizes to new design tokens.DaisyThemeManager - Extended theme infrastructure to support registering themes at runtime via palette factories (instead of only loading built-in AXAML palettes), enabling large sets of additional themes (e.g. product palette/classifier themes) to be added and applied through the same ThemeChanged flow.
DaisyPaletteFactorybuilds an AvaloniaResourceDictionary(matching existingDaisy*Color/Daisy*Brushkeys) from aThemePalette, avoiding the need to generate many AXAML palette files for product themes.ProductPaletteFactorydefines a set of product-category palettes (with keyword matching) and converts them intoThemePalette/ResourceDictionaryviaDaisyPaletteFactory; also includes a generator for precompiled palette code to avoid runtime conversion overhead.ProductPalettes.Generated.cscontains the generated precompiledThemePalettedictionary used by product theme selection (so runtime conversion can be skipped).DaisyTabs - Standardized header container/border sizing on design tokens and ensured non-ghost variants show a default theme-colored border (bordered underline, boxed/lifted outlines) with tokenized thickness values.
Helpers
Helper: DaisyControlLifecycle - New composition helper to centralize theme + global size subscription/unsubscription via attach/detach lifecycle, and to apply global
DaisySizeonly after load so XAML-set values win.Helper: FloweryAlarmHelpers - Added alarm scheduling helpers (
AlarmRepeatflags,Alarmmodel,AlarmScheduler) with repeat patterns, snooze/dismiss handling, and events (AlarmTriggered/AlarmSnoozed/AlarmDismissed) driven by aManagedTimer.Helper: FloweryAnimationHelpers - Added shared Avalonia animation utilities (zoom/pan/combined transforms, pulse, fade, rotation) plus higher-level slide effects (
PanAndZoom,Breath,Throw,Drift) usingFlowerySlideEffect/FlowerySlideEffectParams.Helper: FloweryColorHelpers - Added color utility helpers for parsing hex/named colors, luminance/contrast detection, lighten/darken/brightness adjustment, blending, opacity, and hex formatting.
Helper: FloweryPathHelpers - Added programmatic
Path/Geometryhelpers with a library of common icon path data (including weather icons and various Daisy icon keys) and utility methods for parsing/creating geometries (with fallbacks).Helper: FloweryPatternSvgLoader - Added pattern asset loader for
DaisyPatternedCard, selecting black/white pattern asset variants based on current theme and building a tiledCanvasofImagetiles.Helper: FloweryPatternTileGenerator - Added generators for seamless pattern tiling (Canvas + SVG) for
DaisyCardPatternvariants (carbon fiber, dots, grid, stripes, honeycomb, circuit, twill, diamond plate, mesh, perforated, bumps, scales, etc.).Helper: FlowerySlideClasses - Added shared slideshow/transition/effect parameter types + parsers (
FlowerySlideEffectParams,FlowerySlideTransitionParams,*Parser) andFlowerySlideChangedEventArgs.Helper: FlowerySlideEffects - Added attached properties to apply
FlowerySlideEffectanimations to anyControl(auto-start/stop on attach/detach, duration/intensity parameters), delegating toFloweryAnimationHelpers.Helper: FlowerySlideTransitionHelpers - Added transition helper for switching slides (fade/slide/push/zoom + random selection) between two
Controls in aGrid, delegating animation primitives toFloweryAnimationHelpers.Helper: FloweryTextFillEffects - Added attached properties for filling
TextBlocktext with anImageBrush(image source + optional auto-start behavior on attach/detach).Helper: FloweryTimeHelpers - Added time/duration formatting + parsing helpers (localized unit labels/AM-PM, numeric/label formats, next-occurrence helpers, and ISO-8601 duration/timestamp exchange).
Helper: FloweryTimerHelpers - Added
ManagedTimer(pause/resume wrapper aroundDispatcherTimer) plusTimerPool/ScheduledActionutilities andControlextensions for pooled timers with automatic unload cleanup.Pattern Compliance
New/ported controls follow Flowery.NET established patterns:
IScalableControl Implementation (where applicable)
ApplyScaleFactor(double scaleFactor)for FloweryScaleManager integration.DaisyClock,DaisyIconText,DaisyPasswordBox,DaisySlideToConfirm.DaisyProductThemeDropdownintentionally remains aComboBox-derived selector without custom scaling hooks.Design Token Usage
DaisyTokens.axamlfor heights, padding, font sizes, corner radiiDaisySizeMediumHeight,DaisyInputMediumPadding,DaisySizeMediumCornerRadiusCentralized Icon Management
DaisyIcons.axaml:DaisyIconPowerOff(for DaisySlideToConfirm)DaisyIconEyeOpen(for DaisyPasswordBox)DaisyIconEyeClosed(for DaisyPasswordBox)Theme Integration
DaisyUITheme.axamland related theme includes.DaisyPrimaryBrush,DaisySuccessBrush, etc.)Files Changed
New Files (Notable)
Flowery.NET/Controls/DaisyIconText.csFlowery.NET/Controls/DaisyPasswordBox.csFlowery.NET/Controls/DaisyProductThemeDropdown.csFlowery.NET/Controls/DaisySlideToConfirm.csFlowery.NET/Controls/DaisyClock.csFlowery.NET/Controls/DaisyPatternedCard.csFlowery.NET/Controls/DaisyStatusIndicator.Animations.csFlowery.NET/Controls/DaisyStatusIndicator.StatusGlyphs.csFlowery.NET/Controls/DaisyStatusIndicator.Overlays.csFlowery.NET/Themes/DaisyIconText.axamlFlowery.NET/Themes/DaisyPasswordBox.axamlFlowery.NET/Themes/DaisyProductThemeDropdown.axamlFlowery.NET/Themes/DaisySlideToConfirm.axamlFlowery.NET/Themes/DaisyClock.axamlFlowery.NET/Themes/DaisyPatternedCard.axamlFlowery.NET/Themes/DaisyLoading/DaisyLoading.Business.axamlFlowery.NET/Themes/DaisyLoading/DaisyLoading.Win95.axamlFlowery.NET/Themes/DaisyStatusIndicator/DaisyStatusIndicator.Glyphs.axamlFlowery.NET/Theming/DaisyPaletteFactory.csFlowery.NET/Theming/ProductPaletteFactory.csFlowery.NET/Theming/ProductPalettes.Generated.csModified Files (Notable)
Flowery.NET/Controls/DaisyCarousel.cs- Ported/refactored carousel slide management + navigation/slideshow propertiesFlowery.NET/Controls/DaisyExpandableCard.cs- Added "Batteries-Included" mode, dynamic corner radius, and configurable animation durationFlowery.NET/Controls/DaisyCountdown.cs- AddedSize(DaisySize) styled property + CLR wrapper (defaultMedium)Flowery.NET/Controls/DaisySteps.cs- Fixed JSON-driven items update hook and null-safety onJsonStepsFlowery.NET/Controls/DaisyLoading.cs- Added 15 new enum values for Business and Win95 variantsFlowery.NET/Controls/DaisyThemeManager.cs- Added runtime theme registration (palette factories) and refactored theme storage/listing to support many additional themesFlowery.NET/Controls/DaisyStatusIndicator.cs- Core control (refactored)Flowery.NET/Themes/DaisyCountdown.axaml- Added size-based stylesFlowery.NET/Themes/DaisyLoading.axaml- Included new Business and Win95 theme filesFlowery.NET/Themes/DaisyIcons.axaml- Added new iconsFlowery.NET/Themes/DaisySteps.axaml- Added default outline and moved sizing to design tokensFlowery.NET/Themes/DaisyTabs.axaml- Tokenized container/border sizing and default borders for non-ghost variantsFlowery.NET/Themes/DaisyTokens.axaml- Added DaisyTabs container/border tokens and DaisySteps sizing tokensFlowery.NET/DaisyUITheme.axaml- Registered new control themesFlowery.NET.Gallery/Examples/FeedbackExamples.axaml- Added examples for Business and Win95 loading variantsllms-static/DaisyLoading.md- Updated documentation with new variants (42 total)llms-static/DaisySteps.md- Added JSON usage examples (XAML and C#)llms-static/DesignTokens.md- Documented new DaisyTabs and DaisySteps tokens