Skip to content

Navigation Menu: render item without link#18442

Closed
retrofox wants to merge 11 commits into
trunkfrom
update/nav-menu-no-link-menu
Closed

Navigation Menu: render item without link#18442
retrofox wants to merge 11 commits into
trunkfrom
update/nav-menu-no-link-menu

Conversation

@retrofox

@retrofox retrofox commented Nov 11, 2019

Copy link
Copy Markdown
Contributor

It handles the case when the item has not defined a link, rendering the item with a <span> element instead of an anchor <a>.

Description

How has this been tested?

Add an item without a link from the Editor canvas.
Confirm the markup sets an anchor element to those items that have defined a link, and sets a element when there aren't. Pay attention to the CSS class as well.

Screen Shot 2019-11-13 at 12 02 06 PM

Screenshots

image

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@retrofox retrofox added [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Block] Navigation Affects the Navigation Block labels Nov 11, 2019

@obenland obenland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All values being output into an element attribute need to be run through esc_attr().

@tellthemachines tellthemachines left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this! Just a few fairly minor comments/questions below.

Comment thread packages/block-library/src/navigation-menu/index.php Outdated
Comment thread packages/block-library/src/navigation-menu/index.php Outdated
Comment thread packages/block-library/src/navigation-menu-item/editor.scss Outdated
@retrofox retrofox force-pushed the update/nav-menu-no-link-menu branch from ef26329 to 1a980dd Compare November 13, 2019 13:24
Comment thread packages/block-library/src/navigation-menu/index.php Outdated
Comment thread packages/block-library/src/navigation-menu/index.php Outdated
@retrofox retrofox force-pushed the update/nav-menu-no-link-menu branch from 4d61148 to 8c5bc36 Compare November 14, 2019 19:44
@retrofox retrofox requested review from nerrad and ntwb as code owners November 14, 2019 19:44
@talldan talldan removed the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Jun 11, 2020
@draganescu draganescu mentioned this pull request Dec 8, 2020
37 tasks
Base automatically changed from master to trunk March 1, 2021 15:42
@jasmussen

Copy link
Copy Markdown
Contributor

@retrofox is this one outdated now that we have a placeholder state for empty menu items?

nav

@retrofox

Copy link
Copy Markdown
Contributor Author

@retrofox is this one outdated now that we have a placeholder state for empty menu items?

Yeah, pretty sure it is! let me close it. Thanks for the ping 👍

@retrofox retrofox closed this Mar 18, 2021
@sirreal sirreal deleted the update/nav-menu-no-link-menu branch June 20, 2024 11:50
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants