Page List: Rename the Edit action to Detach and confirm it in a dialog - #80847
Conversation
|
I like this one too in principles of unification. I personally think it's a better term. But I do recall "Edit" being chosen specifically, so I'd prefer a broader gut-check on this one. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -1.41 kB (-0.02%) Total Size: 7.76 MB π¦ View Changed
|
We can easily swap button labels; the remaining changes are still worth shipping, IMO. |
ramonjd
left a comment
There was a problem hiding this comment.
Looking good to me. Approving with some questions that can be dealt with here or in follow ups if required.
Undo works as expected, the page list converts to individual Page Link blocks ππ»
Clicking or dragging a page inside the list still prompts the same dialog.
This I couldn't quite get working, and I could be testing it wrong.
I tried dragging a new page link block into the page list (inside a nav block).
Tried list view / block inspector list view and the canvas. Tested against trunk and what I'm doing is the same behaviour so no biggie.
Clicking on a page link inside the page list triggers the modal though.
| onClick={ () => setIsConfirmingDetach( true ) } | ||
| > | ||
| { __( 'Edit' ) } | ||
| { __( 'Detach' ) } |
There was a problem hiding this comment.
Optional, non-blocking: Gallery has "Detach Gallery" for this button. Worth naming what gets detached here as well? E.g., "Detach Page List"
There was a problem hiding this comment.
I think you probably meant this comment for the inspector controls button above rather than the toolbar button? In any case, yes I like the idea of "Detach Page List" here for the sidebar button, because of the placement of the button. It's next to the Parent control, so without the added block name in the label it might be ambiguous like the Detach button is for detaching the parent:
There was a problem hiding this comment.
Oh true! Thanks for calling that out. Proof I didn't rely on AI for this review - all dumb mistakes are my own. π
andrewserong
left a comment
There was a problem hiding this comment.
This is testing nicely for me, too, thanks again for these consistency PRs! No real notes from me other than what's already been mentioned π
| onClick={ () => setIsConfirmingDetach( true ) } | ||
| > | ||
| { __( 'Edit' ) } | ||
| { __( 'Detach' ) } |
There was a problem hiding this comment.
I think you probably meant this comment for the inspector controls button above rather than the toolbar button? In any case, yes I like the idea of "Detach Page List" here for the sidebar button, because of the placement of the button. It's next to the Parent control, so without the added block name in the label it might be ambiguous like the Detach button is for detaching the parent:
|
|
||
| - Playlist: Shorten the track toolbar button label from "Add track" to "Add". | ||
| - Gallery: Rename the dynamic variation's "Convert to images" action to "Detach", and confirm it in a dialog explaining that the gallery will keep its current images but stop updating automatically ([#80727](https://github.com/WordPress/gutenberg/pull/80727)). | ||
| - Page List: Rename the "Edit" action to "Detach", and confirm it in a dialog explaining that the list will keep its current pages but stop adding new ones automatically, matching the Gallery block. |
There was a problem hiding this comment.
Tiny nit: should we add the PR number in here? (I often miss this as we don't have the PR number before pushing the branch π)
There was a problem hiding this comment.
Chicken and egg situation :D
I could get this work by selecting the Navigation block and then using the list view tab in the right hand sidebar. When I go to pick up pages within the non-detached version of the Page List, it shows the prompt for me: 2026-07-30.14.22.05.mp4 |
andrewserong
left a comment
There was a problem hiding this comment.
Just gave it a quick re-test and this is looking good to me!
But I do recall "Edit" being chosen specifically, so I'd prefer a broader gut-check on this one.
On this, I do slightly prefer "Detach" over "Edit" because "Edit" makes me think of switching modes, rather than actually changing how the block works, which we're now describing as "Detach". So my vote (though not a strongly held opinion) is to go with "Detach". It'd be easy to change back again if we think folks are finding it confusing.
LGTM π
Good point. Let's go with "Detach" at least for now. We can always change back later. |
What?
See discussion in #80613.
Related #80844.
Aligns the Page List block's convert-to-links action with the "Detach" convention used by the Gallery and ToC blocks.
ConvertToLinksModalwith aConfirmDialog("Detach Page List" / "Detach"), matching the Gallery's copy structure: what the block does now, what detaching enables, what stops working.convert-to-links-modal.jsand its now-unused modal styles.Why?
"Edit" didn't say what the action does. It permanently converts the list into individual navigation links and stops it from picking up new pages. "Detach" names the change, and the confirmation makes the trade-off explicit before it happens. Same wording and dialog shape as the Gallery block, so the pattern reads consistently.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
Use of AI Tools
Assisted by Claude.