Skip to content

Conversation

@jorgefilipecosta
Copy link
Member

Fixes: #49319

Currently, the navigation submenu block does not support typography styles, while the navigation link block supports them.
This has several issues:

  1. The user is not able to configure the typography of submenu links as they can on normal links.
  2. When a normal link is converted to a submenu its styles are lost which is a buggy behavior.

This PR adds the same typography styles supported in the navigation link to the navigation submenu block.

cc: @cuemarie, @annezazu

Testing Instructions

I added a navigation submenu and verified I could change its typography. The styles are applied on both the frontend and the editor.

I added a navigation link with some typography styles. I transformed that link into a submenu and verified the styles were kept (on the trunk they are discarded).

@jorgefilipecosta jorgefilipecosta added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block [Feature] Navigation Menus Any issue relating to Navigation Menus labels Sep 4, 2024
@github-actions
Copy link

github-actions bot commented Sep 4, 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: jorgefilipecosta <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: annezazu <[email protected]>
Co-authored-by: cuemarie <[email protected]>

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

@annezazu
Copy link
Contributor

annezazu commented Sep 5, 2024

Thanks so much for the quick work here! Tested this and can confirm it works (keep styling of parent menu and applies it to submenu):

style.menu.and.submenu.mov

@jorgefilipecosta jorgefilipecosta added the Needs Technical Feedback Needs testing from a developer perspective. label Sep 10, 2024
@jorgefilipecosta jorgefilipecosta force-pushed the add/equivalent-navigation-link-styles-to-the-navigation-submenu-block branch from e1ff48d to 42bd8c1 Compare September 12, 2024 15:02
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

This looks good and matches similar settings for other blocks.

@jorgefilipecosta jorgefilipecosta merged commit 1df91fb into trunk Sep 13, 2024
@jorgefilipecosta jorgefilipecosta deleted the add/equivalent-navigation-link-styles-to-the-navigation-submenu-block branch September 13, 2024 21:13
@github-actions github-actions bot added this to the Gutenberg 19.3 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Affects the Navigation Block [Feature] Navigation Menus Any issue relating to Navigation Menus Needs Technical Feedback Needs testing from a developer perspective. [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Block] Navigation - Equip Submenu parent items with typography styles

4 participants