Skip to content

Migrate Dock to Avalonia 12.0.0#1083

Merged
wieslawsoltes merged 10 commits intomasterfrom
codex/avalonia-12-rc1-migration
Apr 7, 2026
Merged

Migrate Dock to Avalonia 12.0.0#1083
wieslawsoltes merged 10 commits intomasterfrom
codex/avalonia-12-rc1-migration

Conversation

@wieslawsoltes
Copy link
Copy Markdown
Owner

@wieslawsoltes wieslawsoltes commented Mar 20, 2026

Avalonia 12.0.0 Migration

Overview

This PR migrates Dock from Avalonia 11.x to Avalonia 12.0.0 and updates the supporting stack so the libraries, themes, tests, docs, and samples work on the final stable API surface.

What Changed

1. Package and release metadata

  • Upgraded the central Avalonia package references to 12.0.0.
  • Kept VersionPrefix at 12.0.0 and cleared VersionSuffix for the stable release.
  • Switched ReactiveUI integration from Avalonia.ReactiveUI to ReactiveUI.Avalonia.
  • Updated the repo build/test stack used by the migration.

2. Runtime and theme migration

  • Migrated HostWindow chrome handling to the Avalonia 12 window-decoration APIs.
  • Added Fluent WindowDrawnDecorations resources and aligned host window templates with Avalonia 12 behavior.
  • Preserved Dock-managed floating tool/document chrome by keeping the relevant host windows BorderOnly.
  • Simplified host-window template assumptions around title bar and overlay handling.

3. Top-level, drag, and hit-testing fixes

  • Replaced lingering GetVisualRoot() assumptions with Avalonia 12-compatible top-level and presentation-source access.
  • Fixed floating-window drag interactions so tool chrome drags move the floating host window instead of entering Dock's internal drag-preview path.
  • Updated selector and dock-target hit testing for Avalonia 12 composition behavior.
  • Added focused headless regressions around host-window themes, floating adorners, selector resolution, and floating tool chrome drags.

4. Samples, docs, and stable follow-ups

  • Updated sample startup code, imports, and compiled-binding scopes for Avalonia 12.
  • Refreshed docs for the current host-window and decoration approach.
  • After syncing with the latest master, aligned the deferred-content sample and package with the stable Avalonia 12 lane:
    • removed the unavailable prerelease diagnostics package import from DockDeferredContentSample
    • limited Dock.Controls.DeferredContentControl to net8.0 and net10.0

Behavior Notes

Floating host windows

  • Floating tool windows no longer rely on the old fake title-bar path.
  • Standard caption chrome now comes from Avalonia's drawn-decoration system where appropriate.
  • Dock-managed tool windows stay border-only so Dock's own tool chrome remains authoritative.

Dock target / selector behavior

  • Dock-target overlays continue to show through the floating adorner path.
  • Selector activation uses subtree hit testing plus a local-bounds fallback to tolerate Avalonia 12 hit-testing changes.

Testing

Verified with:

./build.sh

Results:

  • Repository restore succeeded.
  • Repository build succeeded.
  • Repository tests succeeded.

Reviewer Guide

Suggested review order:

  1. Directory.Packages.props, Directory.Build.props, build/
  2. src/Dock.Avalonia/Controls/HostWindow.axaml.cs
  3. src/Dock.Avalonia.Themes.Fluent/Controls/HostWindow.axaml
  4. src/Dock.Avalonia.Themes.Fluent/Controls/WindowDrawnDecorations.axaml
  5. src/Dock.Avalonia/Internal/AdornerHelper.cs
  6. src/Dock.Avalonia/Internal/DockHelpers.cs
  7. src/Dock.Avalonia/Controls/DockTargetBase.cs
  8. src/Dock.Controls.DeferredContentControl/ and samples/DockDeferredContentSample/
  9. tests/Dock.Avalonia.HeadlessTests/
  10. samples/

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 348e2fa9b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…c1-migration

# Conflicts:
#	Directory.Build.props
#	src/Dock.Avalonia.Themes.Fluent/Controls/HostWindow.axaml
#	tests/Dock.Avalonia.HeadlessTests/HostWindowThemeChangeTests.cs
@wieslawsoltes wieslawsoltes changed the title Migrate Dock to Avalonia 12.0.0-rc1 Migrate Dock to Avalonia 12.0.0 Apr 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af8dc5b761

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d346c5bcd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant