Skip to content

Add flat proportional dock presentation - #1103

Closed
wieslawsoltes wants to merge 31 commits into
masterfrom
feature/flat-proportional-dock-panel
Closed

Add flat proportional dock presentation#1103
wieslawsoltes wants to merge 31 commits into
masterfrom
feature/flat-proportional-dock-panel

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds a flat proportional dock presentation mode for Dock.Avalonia while keeping the Dock model tree unchanged. The existing nested UI presentation remains the default, and consumers can opt into the new flat UI layer through DockControl.PresentationMode="Flat" or by using the new DockFluentFlatTheme.

The work is based on the split-layout idea of preserving a logical/model tree while flattening the rendered presentation surface. In Dock this means IProportionalDock and splitter relationships still live in the model, but the Avalonia visual layer can render proportional dock descendants as direct children of a single flat panel.

Changes

  • Added DockPresentationMode with Nested and Flat modes.
  • Added DockControl.PresentationMode and rebuilt auto-created default data templates when the mode changes.
  • Added FlatProportionalDockControl, FlatProportionalDockPanel, FlatProportionalDockSplitter, and the preview adorner.
  • Implemented flat recursive layout that creates direct child visuals for nested proportional dock content, splitters, and proportional dock drop surfaces.
  • Added compositor-backed flat panel layout transitions for move, insert, remove, and resize flows while keeping direct child visuals stable across rebuilds.
  • Scoped panel transitions to the affected dockables so adding, removing, or moving one dockable does not animate unrelated sibling presenters.
  • Added connected-animation retargeting so in-flight move/insert transitions stay disabled until the latest visual transition completes and composition offsets/sizes are normalized afterward.
  • Preserved model-side resize semantics by updating adjacent IDockable.Proportion and CollapsedProportion values from flat splitter drags.
  • Added Fluent resources and DockFluentFlatTheme to enable flat presentation by theme.
  • Added the flat Fluent dock target template with compositor opacity/scale motion and edge-only global dock target hit zones.
  • Updated DockFluentThemeManager so preset lookup also works when the base Fluent theme is nested inside DockFluentFlatTheme.
  • Added flat splitter/control theme resources and density tokens.
  • Added DockReactiveUIFlatSample, copied from DockReactiveUISample, wired to DockFluentFlatTheme, PresentationMode="Flat", and Debug-only ProDiagnostics devtools.
  • Enabled all flat sample tools, documents, docks, splitters, and generated dockables to be draggable/droppable/dockable, including CanDockAsDocument.
  • Updated shared Avalonia packages to 12.0.5.
  • Added ProDiagnostics as a separate centrally managed version (12.0.4) because it has an independent release schedule.
  • Replaced the old Debug diagnostics package path with ProDiagnostics in build/Avalonia.Diagnostics.props.
  • Wired DockDeferredContentSample through the shared diagnostics props so its existing AttachDevTools() call continues to build.

Validation

  • dotnet build samples/DockReactiveUIFlatSample/DockReactiveUIFlatSample.csproj
  • dotnet build samples/DockDeferredContentSample/DockDeferredContentSample.csproj
  • dotnet test tests/Dock.Avalonia.UnitTests/Dock.Avalonia.UnitTests.csproj
  • dotnet test tests/Dock.Avalonia.Themes.UnitTests/Dock.Avalonia.Themes.UnitTests.csproj
  • dotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj
  • dotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj --no-restore --filter "FullyQualifiedName~DockTargetTests|FullyQualifiedName~FlatProportionalDockPanelTests" -maxcpucount:1
  • dotnet test tests/Dock.Avalonia.Themes.UnitTests/Dock.Avalonia.Themes.UnitTests.csproj --no-restore --filter "FullyQualifiedName~ThemeDensityControlSizingTests" -maxcpucount:1
  • dotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj --configuration Release --no-restore -maxcpucount:1
  • dotnet build samples/DockReactiveUIFlatSample/DockReactiveUIFlatSample.csproj --no-restore -maxcpucount:1
  • dotnet run --project samples/DockReactiveUIFlatSample/DockReactiveUIFlatSample.csproj --framework net10.0 --no-build
  • git diff --check
  • GitHub PR checks for commit f36f9231 passed: build/test matrix, leak tests, AOT source-gen sample, and pack.

All commands completed successfully. The first parallel headless run hit a transient file-lock during concurrent builds of Dock.Avalonia.Themes.Simple; rerunning the headless test project by itself passed.

Notes

  • The existing nested proportional dock presentation remains the default behavior.
  • Flat mode is opt-in through DockControl.PresentationMode or DockFluentFlatTheme.
  • ProDiagnostics opens with F12; existing Dock debug overlays remain on F9 and F11 in the sample.

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

Copy link
Copy Markdown

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: edf48d5cfd

ℹ️ 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".

Comment thread src/Dock.Avalonia/Controls/FlatProportionalDockPanel.cs Outdated

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

Copy link
Copy Markdown

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: 9ec14e48b4

ℹ️ 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".

Comment thread src/Dock.Avalonia/Controls/FlatProportionalDockPanel.cs Outdated

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

Copy link
Copy Markdown

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: f36f9231ff

ℹ️ 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".

Comment thread src/Dock.Avalonia/Controls/FlatProportionalDockPanel.cs Outdated
Comment thread build/Avalonia.Diagnostics.props

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

Copy link
Copy Markdown

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: fa1f1aea04

ℹ️ 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".

Comment thread src/Dock.Avalonia/Controls/FlatProportionalDockPanel.cs Outdated
Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs

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

Copy link
Copy Markdown

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: 2153d17007

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated

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

Copy link
Copy Markdown

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: 411b24addd

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated
Comment thread src/Dock.Avalonia/Internal/DockFlatProportionalAdapter.cs

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

Copy link
Copy Markdown

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: a37c9f9777

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated

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

Copy link
Copy Markdown

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: 29c5571406

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated
Comment thread src/Dock.Avalonia.Themes.Simple/Dock.Avalonia.Themes.Simple.csproj

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

Copy link
Copy Markdown

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: a70f0d26b1

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated

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

Copy link
Copy Markdown

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: 655e1df12c

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs
Comment thread samples/DockReactiveUIFlatSample/Views/MainView.axaml.cs Outdated

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

Copy link
Copy Markdown

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: 0cb025e71e

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated

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

Copy link
Copy Markdown

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: 655c683093

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs Outdated

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

Copy link
Copy Markdown

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: d2148c7f57

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs
Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs
@wieslawsoltes
wieslawsoltes marked this pull request as draft June 30, 2026 10:09
@wieslawsoltes
wieslawsoltes marked this pull request as ready for review July 14, 2026 21:46

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

Copy link
Copy Markdown

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: 50245ce85d

ℹ️ 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".

Comment thread src/Dock.Controls.Flat/FlatProportionalPanel.cs
@wieslawsoltes

Copy link
Copy Markdown
Owner Author

Closing as this need better approach.

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