Repository navigation
Chore: vendor dragablz and apply some bug fixes & improvements - #3717
Merged
Merged
Conversation
The library (fork BornToBeRoot/Dragablz 5415e71, based on upstream ButchersBoy/Dragablz e493913) is now maintained in Source/3rdparty/Dragablz, flattened to one project. No demos, tests, solution or NuGet package. LICENSE (MIT) is kept, README.md documents the origin, CHANGELOG.md all changes compared to the original. Assembly, namespaces and pack URIs are unchanged. AppVeyor stamps the file version at the new path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppVeyor and CodeQL no longer init submodules, README / AGENTS.md no longer clone with submodules. The rule "don't modify 3rdparty" is replaced by how to maintain the vendored Dragablz (small changes, CHANGELOG.md, keep the LICENSE) and a rule for third-party licenses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Licenses/ControlzEx.txt contained the Dragablz license and LibraryManager linked the Dragablz license. Now the ControlzEx license (MIT, Jan Karger, Bastian Schmidt) from github.com/ControlzEx/ControlzEx (develop). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Not used by NETworkManager (MahApps theme only). Ripple was only used by the MaterialDesign theme; Dockablz.xaml was empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NETworkManager uses MahApps windows for the tab host windows. Removes the window, its icon, the window message / system command enums, the SendMessage / PostMessage imports and the window styles in Generic.xaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HeaderedItemViewModel, TabablzItemStyleSelector, Horizontal/Vertical- PositionMonitor and HitTest are not referenced by the library or NETworkManager; Properties/Resources.* and Settings.* only contain project template samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NETworkManager only uses MahAppsFocusVisual, MahAppsInvisibleThumbStyle and MahAppsTabablzControlStyle (as base of DefaultTabablzControl, which sets its own ItemContainerStyle). The other styles were merged into the application resources without being used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The license file still had "Copyright (c) 2016 MahApps"; MahApps.Metro (2.4.11, develop, master) is now "Copyright (c) .NET Foundation and Contributors". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SetWindowPlacement, WINDOWPLACEMENT, RECT, SW_SHOWNORMAL and GetRawCursorPos were only used by the removed DragablzWindow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rolStyle (review #4) AdjacentHeaderItemOffset=-12 belonged to the removed trapezoid tab style; without it the default tab items would overlap. NETworkManager sets 0 in DefaultTabablzControl, so no visible change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew #6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the new AGENTS.md rule: Dragablz is maintained in the repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching to a commit without the submodule aborts while the old submodule is checked out (tested). README of the folder has the steps, next-release.md an entry under Dependencies, Refactoring & Documentation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…z review #1) Layout.ItemDragCompleted returned before resetting _currentlyOfferedDropZone when the item was merged (IsDropTargetFound) or its tab control had more items. A later drag could branch into that stale zone (closed window). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…z review #5) The merge targets are collected when the drag starts. If one of their windows closed during the drag, PointToScreen threw (no PresentationSource). GetMergeTargetScreenBounds now returns null for hidden / disconnected targets, which also excludes hidden tab controls in MonitorReentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ragablz review #2) ReceiveDrag used the difference of two screen positions (pixels) as item X / Y (DIPs). PointFromScreen converts the cursor position to DIPs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review #7) The default value of HeaderItemsOrganiser was a single HorizontalOrganiser shared by all controls (NETworkManager sets AdjacentHeaderItemOffset to the default 0, so the per-control organiser was never created). Its drag state kept the last dragged items and their window alive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InterTabController.InterTabClient can be null (binding to a view model property without a value); the items holder is an optional template part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skips tab controls without template and tabs without content, and materializes the list before closing (the close modifies the items). Not called by NETworkManager, cheap to make safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review #1) The offered drop zone of a layout whose window closed during the drag was still used on drop: Branch moved the item into the closed window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#4) _siblingItemLocationOnDragStart was never cleared (kept the items of the last drag alive) and indexed without TryGetValue (KeyNotFoundException for an item added during the drag). Cleared after the drag, current location as fallback. Organisers shared by a style are harmless now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview #6) The completion of a replaced storyboard set its old target location and removed the target of the newer storyboard. It now only acts if its target is still the active one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) The tabs slid to their new position while a tab was dragged regardless of Settings > Appearance > Animations. StackOrganiser.AnimationsEnabled (set in App.xaml.cs from AppearanceManager.AnimationsEnabled) moves them directly without animations; quadratic ease-out like the other animations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#9) Margin -3,-3 (all sides) let the splitter overlap the neighbouring branch on the left / right; 0,-3 like the column splitter's -3,0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inal review #7) TrapezoidDragableTabItemStyle, SizableFromBottomRightDragablzItemStyle, CloseItemCommandButtonStyle and CloseCommandHighlightColor were not referenced; Trapezoid and ShowDefaultCloseButtonConverter only by them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ContinuationIndex, _rightMouseUpCleanUpDisposable (+ the right mouse up override that only reset it), a Debug.WriteLine leftover and the empty ItemsChanged handler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… review #10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#1, #2, #4) - SendToLocation compares with the target of a running slide, so a drag back to the original location during the slide is no longer ignored. - A direct placement to another location (Organise after a breach / merge) or animations off stops the running slide. - The organiser forgets removed items (ClearContainerForItemOverride), also when the drag ended with a breach or merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The explicit FocusVisual.Ring setter duplicated the global default (SystemParameters.FocusVisualStyleKey in Theme.xaml). Changelog entry for the changed focus visual (was the dotted MahApps rectangle). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DefaultTabablzControl set Foreground to the theme background (taken over from the removed Dragablz MahApps theme), so content without its own foreground was drawn in the background color. Changelog entry for the back-and-forth reorder fix (final review 2 #1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tyle Only contained a commented-out setter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EmbeddedWindowDragPresenter gets IsDragging from its style: the window of the tab is dragged (TabablzControl.IsDraggingWindow) or a dragged window can be dropped into its layout (Layout.IsParticipatingInDrag). Removes the five ConfigurationInfo.Is*WindowDragging flags and the two switches in DragablzTabHostWindow (set / reset on close). Differences: a single tab dragged in the main window's tab bar now also shows the placeholders of the other windows (their drop zones were active but covered); after a merge the placeholders stay until the mouse is released (before: until the dragged window closed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DragablzTabItem.GetTabItems(window) and FocusSelectedEmbeddedWindow(window) replace the seven visual tree loops in MainWindow, DragablzTabHostWindow and the PuTTY / PowerShell host view models (same behaviour in the main window and the tab windows). The visual tree is kept instead of TabablzControl.GetLoadedInstances: a branch that was just created is not loaded yet, its tabs must still be closed with the window. The list is materialized, so closing tabs while iterating is safe. SetTabHeader searches all windows instead of only the active one: a tab in a tab window that is not active kept its old header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The FindAncestor bindings of the drag state (68bc5d6) are resolved only once (BindingExpression.AttachToContext, no re-attach on a visual parent change). Tear out / merge / split move the view of a tab, so it stayed bound to the tab control and layout of the old window (wrong, or never true once that window closed). EmbeddedWindowDragPresenter now binds to the ancestors of its current place on every Loaded and clears the binding on Unloaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…her window" This reverts commit 6f802f7.
This reverts commit 68bc5d6.
…HeaderPanel) With MergeTargetArea.HeaderPanel the whole tab bar accepts a dragged tab, but MonitorBreach measured against the area of the tabs. A tab merged into an empty tab bar is placed at the start, the cursor was outside of it and the tab was torn out again at once (with tabs it is placed behind the last tab, near the cursor). The breach now uses the header panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While an item was removed from the source, UpdateSelectedItem could create a new ContentPresenter for a stale SelectedItem (the removed item, e.g. merged and torn out again right away); RemoveItem / MonitorBreach only removed the presenter they found before. CreateChildContentPresenter skips items that are no longer in the control, and all presenters of the removed item are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This pull request is merged. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew 4 #2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#3, #9) With the header panel as breach area, the horizontal grace (8) beyond it can't be reached when the panel ends at the screen edge (maximized window). No grace for the header panel. Renamed the mouse position variable to the breach area. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l review 4 #4, #8) The sweep of all presenters of a removed item now runs in OnItemsChanged (every removal path) instead of only in RemoveItem / MonitorBreach. An item without content gets no presenter (FindChildContentPresenter can't find it, so a new one was added on every selection change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SetTabHeader stops at the first match (scan start), OnClosing materializes the list itself before closing the tabs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al review 4 #1) OnClosing always set Is<Tool>WindowDragging to false, also when another window of the tool was dragged (e.g. this one closed because its last session ended): the embedded windows covered the drop zones again. Only reset it if this window is dragged (closed while merged). OnClosing materializes GetTabItems before closing the tabs. 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.
Description
Replace forked dragablz (git submodule) with (minimal) implementation of dragablz in the code
See commits.
Related issue
#3609