Repository navigation
Site overview: move pages by dragging them - #259
Conversation
|
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 To start in a workspace other than Default, open it in Writing, Builder or Selling. |
|
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 :) |
|
@scruffian You might like to try this one. It's quite nice for building out your menu and managing pages. |
|
When I tried this I was asking myself questions like:
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... |
|
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. |
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>
70d16f6 to
8a93e51
Compare
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>
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?
Nothing saves until you press Save, and each move has an Undo snackbar. It uses the same
usePageOrderhelper as the Pages screen, so a move here is the same edit as a move there.What's still rough?
Tests
Unit tests in
src/routes/site-overview/test/arrange.jscover where a drop puts a page. A smoke test intests/e2e/interactions/site-overview.spec.jsdrags 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?
🤖 Generated with Claude Code