Feature: Enable drag and drop reordering for Pinned Sidebar items#18320
Open
kalmix wants to merge 1 commit intofiles-community:mainfrom
Open
Feature: Enable drag and drop reordering for Pinned Sidebar items#18320kalmix wants to merge 1 commit intofiles-community:mainfrom
kalmix wants to merge 1 commit intofiles-community:mainfrom
Conversation
abd09bc to
7456ba8
Compare
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.
Resolved / Related Issues
Code Changes
Implemented direct drag-and-drop reordering for pinned sidebar items using the new
IDraggableSidebarItemModelinterface and the related sidebar drag/drop event flow updates.Added
UpdateOrderSilentlyandSuspendSync()toPinnedFoldersManagerso pinned items can be reordered safely while temporarily pausing sync side effects.Updated the Home Page Quick Access widget to reorder items with
Items.Move()instead of clearing and rebuilding the collection, reducing UI flicker during reorder operations.Added
Move(int oldIndex, int newIndex)toBulkConcurrentObservableCollectionso observable collections can shift items in place instead of forcing a full reload.Added a
forceparameter toWindowsQuickAccessService.PinToSidebarAsyncso Windows Shell pins can be reapplied in the exact intended order when syncing reorder changes back to the OS.Replaced the previous app-level COM exception workaround with localized drag-and-drop exception handling in the sidebar pipeline, including a dedicated
DragDropExceptionHelperfor expected stale OLE/COM drag failures.Hardened
FilesystemHelpersto validate drag payload availability and safely handle dead OLE payload access without crashing the app.Fixed a null crash in
StorageFileExtensions.AreItemsAlreadyInFolder()by safely handlingPath.GetDirectoryName(...)results before comparison.Wrapped sidebar drag/drop deferral and payload access paths in guarded
try/catch/finallyflows so interrupted or stale drops fail gracefully instead of tearing down the app.Before:
before.mp4
After:
after.mp4
Steps used to test these changes
COMExceptionand no longer crashes