Esatto.Umbraco.Backoffice.TreeDragAndDrop
1.0.2
dotnet add package Esatto.Umbraco.Backoffice.TreeDragAndDrop --version 1.0.2
NuGet\Install-Package Esatto.Umbraco.Backoffice.TreeDragAndDrop -Version 1.0.2
<PackageReference Include="Esatto.Umbraco.Backoffice.TreeDragAndDrop" Version="1.0.2" />
<PackageVersion Include="Esatto.Umbraco.Backoffice.TreeDragAndDrop" Version="1.0.2" />
<PackageReference Include="Esatto.Umbraco.Backoffice.TreeDragAndDrop" />
paket add Esatto.Umbraco.Backoffice.TreeDragAndDrop --version 1.0.2
#r "nuget: Esatto.Umbraco.Backoffice.TreeDragAndDrop, 1.0.2"
#:package Esatto.Umbraco.Backoffice.TreeDragAndDrop@1.0.2
#addin nuget:?package=Esatto.Umbraco.Backoffice.TreeDragAndDrop&version=1.0.2
#tool nuget:?package=Esatto.Umbraco.Backoffice.TreeDragAndDrop&version=1.0.2
Esatto.Umbraco.Backoffice.TreeDragAndDrop
Drag-and-drop and keyboard moving for the Umbraco 17/18 backoffice Content, Media and Dictionary trees. One package, and each tree can be switched off.
- Move items by dragging them in the section sidebar tree
- Real ordering for content and media: drop above, inside or below an item
- Instant visual feedback when reordering, rolled back if saving fails
- A spinner on the item while it's being saved
- Hover over the middle of a collapsed item mid-drag to expand it (its top and bottom edges leave it closed)
- Cycle guard: an item can't be dropped into itself or its own descendants
- Keyboard-accessible "grab & place" (WCAG 2.2 AA) with screen-reader announcements
- Pickers (such as "Move to…") and the recycle bin are left alone
Replaces ContentTreeDragAndDrop and MediaTreeDragAndDrop. See Replacing the old packages.
Install
dotnet add package Esatto.Umbraco.Backoffice.TreeDragAndDrop
Restart the site and hard-refresh the backoffice.
How dropping works
Content and Media: each row has three drop zones.
| Drop on | Result |
|---|---|
| Top third of a row | Placed above that item (same parent) |
| Middle of a row | Moved inside that item |
| Bottom third of a row | Placed below that item (same parent) |
Dictionary: Umbraco has no sort order for dictionary items and always lists them alphabetically, so a drop only chooses the parent.
| Drop on | Result |
|---|---|
| Middle of a row | Moved inside that item |
| Top or bottom edge of a row | Moved next to that item (same parent). On a top-level item, that means the root |
Settings
Everything is on by default. To switch a tree off:
{
"Esatto": {
"TreeDragAndDrop": {
"Content": true,
"Media": true,
"Dictionary": false
}
}
}
Restart the site after changing it. A disabled tree's script isn't loaded at all.
Keyboard
| Key | Action |
|---|---|
| Space | Grab the focused item / drop it at the chosen position |
| Enter | Drop (while an item is grabbed) |
| ↑ / ↓ | Move between rows |
| → | Target the highlighted item itself ("inside this item") |
| ← | Jump to the parent row |
| Esc | Cancel |
Each step is announced through an aria-live region. Clicking or typing outside the tree also cancels the move.
Replacing the old packages
Remove Esatto.Umbraco.Backoffice.ContentTreeDragAndDrop and Esatto.Umbraco.Backoffice.MediaTreeDragAndDrop when you install this package. While one of them is still installed, this package leaves that tree to it and logs a warning, so a tree never gets two sets of drag handlers.
Compatibility
| Umbraco | Status |
|---|---|
| 17.x | Supported |
| 18.x | Verified |
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MailKit (>= 4.16.0)
- MimeKit (>= 4.16.0)
- System.Security.Cryptography.Pkcs (>= 10.0.13)
- Umbraco.Cms.Core (>= 17.0.0)
- Umbraco.Cms.Infrastructure (>= 17.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.