Skip to content

Site overview: move pages by dragging them - #259

Merged
getdave merged 3 commits into
trunkfrom
getdave/drag-drop-page-navigation
Nov 20, 2026
Merged

getdave merged 3 commits into
trunkfrom
getdave/drag-drop-page-navigation

Conversation

@getdave

@getdave getdave commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Someone suggested the Site overview could let you drag pages around to change their parent or order. This PR adds that, with no mode to switch on, so you can pick up a page card and move it any time the map is open.

An earlier version of this PR also let you edit the main menu from here. Thanks to @scruffian's review it's clear that made the screen harder to read (is the menu on every page? what do the lines mean?), and it added yet another way to show and edit menus, so I've taken it out. Moving pages felt like the part worth keeping.

What does it do?

  • Drag a page onto the middle of another page to put it under it, or onto its left or right edge to put it beside it.
  • Drop it on the homepage to move it to the top level.
  • A label follows the pointer to say what will happen, and the target card shows where the page will land.
  • Dragging the background still pans the map, and a click on a card still opens its details.

Nothing saves until you press Save, and each move has an Undo snackbar. It uses the same usePageOrder helper as the Pages screen, so a move here is the same edit as a move there.

What's still rough?

  • The map doesn't scroll when you drag near its edge, so on a large site you need to zoom out first.
  • There's no keyboard way to move a page here yet. The Pages screen still has one.

Tests

Unit tests in src/routes/site-overview/test/arrange.js cover where a drop puts a page. A smoke test in tests/e2e/interactions/site-overview.spec.js drags one page under another and checks the move waits for Save, and that a plain click still selects a page.

How do I test it?

  1. Open Site overview.
  2. Drag a page onto another page. It should move under it straight away.
  3. Drag a page onto the left or right edge of another to put it beside it, and onto the homepage to move it back to the top level.
  4. Open Review changes to see the moves waiting, then discard or save them.

🤖 Generated with Claude Code

@getdave
getdave requested a review from scruffian November 16, 2026 10:51
@github-actions

Copy link
Copy Markdown

Try this branch in WordPress Playground, with a WooCommerce shop, for an AI agent to drive, or on a blank site with WordPress's default theme. All run the latest build of getdave/drag-drop-page-navigation and update with every push, a few minutes after the Plugin zip build finishes.

To start in a workspace other than Default, open it in Writing, Builder or Selling.

@patriciabt

Copy link
Copy Markdown

Hello @getdave, I’m the one who suggested this in the comments on your YouTube video. I’m thrilled to see that you’ve started working on it, even if it’s just a "rough first pass at that idea :)
Cheers

@getdave

getdave commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@scruffian You might like to try this one. It's quite nice for building out your menu and managing pages.

@scruffian

Copy link
Copy Markdown
Member

When I tried this I was asking myself questions like:

  • Is the Main Menu on all the page or just the homepage?
  • Do the lines represent links from one page to another, or a relationship between the pages?

My concern with this approach is that it highlights some confusion in the Site Overview model. I'm still not really clear what the lines represent or what the relationship between the pages is...

@getdave

getdave commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

I'm thinking perhaps we don't really want to edit Menus here. It's yet another UI and representation.

I still like the drag to order pages...etc.

I also think we could make more of this UI. I think having a "birds eye view" of your site is underrated.

getdave and others added 2 commits November 20, 2026 23:09
Adds a Rearrange mode to the Site overview. Drag a page onto another to
put it under it, onto its edge to put it beside it, or onto the homepage
to move it to the top level. A Main menu tray along the top takes pages
dropped on it, reorders by dragging its pills, and takes items out with
their ×, by dragging them off, or from a switch on each card.

The menu stays tied to the pages: an auto menu stays an auto menu, its
order follows page order, and pages are left out rather than the menu
being set by hand. Every change is an unsaved edit, through the same
helpers the Pages screen uses, so it waits for Save and can be undone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Main menu tray gave the Site overview another way to show and edit
menus, which made it harder to read. Moving pages stays, without a mode
to turn on: a page card can be dragged whenever the map is open, and the
background still pans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@getdave
getdave force-pushed the getdave/drag-drop-page-navigation branch from 70d16f6 to 8a93e51 Compare November 20, 2026 23:11
@getdave getdave changed the title Site overview: rearrange pages and the main menu by dragging Site overview: move pages by dragging them Nov 20, 2026
Unit tests for where a drop puts a page, and an e2e smoke test that drags
one page under another and checks that a click still selects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@getdave
getdave merged commit dedf58f into trunk Nov 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants