Repository navigation
Replace AtomUI with TKCode.Arc.Foundation (MIT-only dependency chain) - #27
Merged
Merged
Conversation
…ns, themes and localization TKCode.Arc.Foundation depends only on Avalonia and provides what Arc took from AtomUI: token declarations and their source generator (token kinds, markup extensions, reflection-free writers and override parsers), the theme runtime (ArcThemeManager, ArcThemeState, scoped themes, presets), lazy control-theme loading, package registration (AppBuilder.UseArc), and localization (xlf catalogs, live language switching, coverage checks). Diagnostics ARCF001-027 report token, theme and translation errors at build time. NativeAOT and trimming safe; tools/dev/FoundationAotSample checks it. Written clean-room from Avalonia's public API and Arc's own design docs. Refs #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every TKCode.Arc package now depends only on Avalonia and the MIT TKCode.Arc.Foundation; AtomUI (LGPL-3.0) is gone from the dependency tree, so closed-source NativeAOT single-file apps are no longer constrained by it. Switch-over (tools/dev/migrate_atomui.py does the mechanical part): - Token classes and XAML token references are unchanged; theme files get a flat x:Class; packages register through ArcBuilder extensions. - Startup is AppBuilder.UseArc(arc => arc.UseArcControls()...); themes are applied with ArcTheme.Apply / ArcThemeManager; Pixel and Corners are presets. - Localization moves to TKCode.Arc.Localization with the same catalogs. - Mobile token identities become MobileButton, MobileCheckbox, MobileDialog, MobileSwitch and MobileToast. Replaced AtomUI pieces: - ArcPopup derives from Avalonia's Popup (ArcPopupFrame, ArcPopupMotion). - ArcImage and TKCode.Arc.ImageSource replace AsyncImage (IsImageLoaded). - ArcOverlayHost replaces the scoped overlay layer. - The palette generator follows @ant-design/colors (MIT). - ArcBaseTheme supplies ScrollViewer/ScrollBar (hidden until hover, like ScrollArea), ItemsControl, PathIcon, TextSelectionHandle, popup hosts, EmbeddableControlRoot and Window; it gives way to Fluent and Simple. Also: - The gallery desktop window draws its own title bar again. - Fixes: toast stack re-entrancy while pausing, the DataGrid filter and EventLog search boxes had no template, the browser root missed its base theme, the first ThemeSwitcher reveal in a plain Window, MarkdownHost's outline before the template, and pool-thread posts now go to the owning control's dispatcher. - Tests: token values are checked against a baseline recorded under AtomUI (30 variants, no differences); test isolation fixes for GC tests. BREAKING CHANGE: startup, theme and localization APIs changed; see the 0.3 to 0.4 migration guide in the changelog. Refs #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… guide Guides (installation, theming, introduction, motion, AI and MCP, changelog) in all three languages, component pages, README, AGENTS.md, third-party notices and the llms files now use UseArc / ArcTheme and describe the MIT dependency chain. The changelog gains a 0.4.0-preview.1 (unreleased) section with the migration guide; API translations follow the changed summaries. Refs #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avalonia's OverlayPopupHost and the LayoutTransformControl in its template clip by default, and the host is exactly as large as the surface, so the shadow ArcPopup paints past it was cut to a rectangle and menus, selects and popovers showed square corners. The base theme turns clipping off on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inbox now has its title and a live "left to triage" count, an avatar on every row, Arc's type sizes, two unread messages, and the hint line; Undo and Reset appear only after a row is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…text only when needed - Button: the spinner is created the first time IsLoading turns true instead of with every template, so most buttons carry one element less. - SelectValueRoll: the unconstrained text layout is cached and reused for the arranged layout when the text fits, instead of being built twice per pass. - FieldMessage: an empty message no longer shapes the space and the digits; they are measured when a segment needs them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #25.
Every TKCode.Arc package now depends only on Avalonia and the new MIT package TKCode.Arc.Foundation. AtomUI (LGPL-3.0) no longer appears anywhere in the dependency tree, so closed-source Native AOT single-file apps are no longer constrained by it.
What changed
ArcThemeManager,ArcThemeState, scoped themes, presets), lazy control-theme loading, package registration (AppBuilder.UseArc), localization (xlf catalogs, live switching, coverage checks), build-time diagnostics ARCF001–027. Written clean-room from Avalonia's public API.tools/dev/migrate_atomui.pydoes the mechanical part (usings,x:Classon theme files, project files).ArcPopupon Avalonia'sPopup;ArcImage/TKCode.Arc.ImageSourceinstead ofAsyncImage;ArcOverlayHost; palette generator following@ant-design/colors;ArcBaseThemefor the Avalonia built-ins AtomUI used to style (ScrollViewer/ScrollBar hidden until hover, ItemsControl, PathIcon, TextSelectionHandle, popup hosts, EmbeddableControlRoot, Window), giving way to Fluent/Simple.Breaking changes (0.4.0)
UseAtomUI(b => b.UseDesktopControls().UseArc())+partial App→UseArc(arc => arc.UseArcControls()).ThemeConfigBuilder/IThemeManager→ArcTheme.Apply(t => …)/ArcThemeManager; corners and Pixel are presets (t.Corners(style),t.Pixel()).AtomUI.Localization→TKCode.Arc.Localization.ImageSourceisTKCode.Arc.ImageSource;IsLoaded→IsImageLoaded.MobileButton,MobileCheckbox,MobileDialog,MobileSwitch,MobileToast.The full old → new table is in the changelog's migration section.
Verification
dotnet build TKCode.Arc.slnx: 0 errors, no new warnings.dotnet list package --include-transitive: no AtomUI.Before release (not in this PR)
🤖 Generated with Claude Code