Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Submenu Block: Add dropdown menu props to ToolsPanel component #68015

Conversation

im3dabasia
Copy link
Contributor

Follows up: #67969

What?

Enhances the Navigation Submenu block's ToolsPanel by adding support for dropdown menu functionality through the useToolsPanelDropdownMenuProps hook.

Before After
image Screenshot 2024-12-16 at 2 13 11 PM

Copy link

github-actions bot commented Dec 16, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@im3dabasia
Copy link
Contributor Author

Hey @fabiankaegy,

Would it be a good idea to create a single PR to add all the dropdown menu props? I realize it’s going to take a lot of PRs, and this fix can be done in one PR. What do you think about this? If you agree, I can create a single PR to fix this for all the PRs that have already been merged.

Thank you

@fabiankaegy
Copy link
Member

@im3dabasia Yeah happy to also review one that patches all the instances we were missing initially

@im3dabasia
Copy link
Contributor Author

@im3dabasia Yeah happy to also review one that patches all the instances we were missing initially

Sure I will add that in one PR

@im3dabasia
Copy link
Contributor Author

Hi @talldan, could you please review this PR when you have a moment?

@talldan talldan added [Type] Bug An existing feature does not function as intended [Block] Submenu Affects the Submenu Block - for submenus in navigation labels Dec 23, 2024
@@ -394,6 +396,7 @@ export default function NavigationSubmenuEdit( {
rel: '',
} );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be worth reconsidering what resetting some of these attributes means.

In a lot of cases, the block will have a post id (also kind and type), meaning it's linked to a particular post, and I think reset could set the value back to that post's title. Resetting to an empty string is quite destructive in that situation.

It'll take a bit of work as there's no code in the block at the moment to make that happen so it's something that can be handled in a separate PR/issue.

I think @getdave might be looking at some related issues at the moment.

Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 😄

@talldan talldan merged commit 068660c into WordPress:trunk Dec 23, 2024
69 of 71 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Submenu Affects the Submenu Block - for submenus in navigation [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants