Repository navigation
Template actions with DropDownMenuV2 - #51043
ntsekouras wants to merge 1 commit into
Conversation
|
Size Change: +47 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in be357c90e5c0442472ed5e92e71a4a5b8f837ca6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5110234176
|
|
Thank you Nik, you anticipated my next move! I'll try to have a look at this PR today/tomorrow. Just a head-up that you may want to rebase this PR after #51046 lands, which should align the behavior of |
Glad to hear!
Absolutely, I'm planning on working on that very soon (edit: opened #51097) |
be357c9 to
178e7e1
Compare
| <> | ||
| <MenuItem | ||
| <UsedComponent | ||
| onClick={ () => { |
There was a problem hiding this comment.
I'm not sure if onClick works at this point on DropdownMenuItemV2 — you may need to use onSelect instead (here and everywhere else in the PR)
| export default function RenameMenuItem( { | ||
| template, | ||
| onClose, | ||
| as: UsedComponent = MenuItem, |
There was a problem hiding this comment.
Any reason why we're not using DropdownMenuItemV2 directly here?
| ) } | ||
| { isRevertable && ( | ||
| <DropdownMenuItemV2 | ||
| info={ __( |
There was a problem hiding this comment.
DropdownMenuItemV2 doesn't expose an info prop — you'll have to use children and add/style that text separately

What?
This is a real quick draft PR to start exploring the integration of DropDownMenuV2(see component's main issue). It's related to this issue, but I'll probably implement it with the current DropDown because we're close to 6.3 deadlines.
I'm happy to iterate on this to start pinpointing what's missing.
Testing Instructions
Templatesin site editor navigation sidebar select a custom created templaterename/delete/optionsThings noticed so far
Renameitem on click opens a Modal, but here we close the DropDown, so we cannot render it. We need to check the focus handling and what would be the best way to handle these use cases.