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 Menu: render item without link #18442

Closed
wants to merge 11 commits into from

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Nov 11, 2019

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
@retrofox retrofox added this to 👀 PRs to review in Navigation editor via automation Nov 11, 2019
Copy link
Member

@obenland obenland left a comment

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().

Copy link
Contributor

@tellthemachines tellthemachines 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 working on this! Just a few fairly minor comments/questions below.

packages/block-library/src/navigation-menu/index.php Outdated Show resolved Hide resolved
packages/block-library/src/navigation-menu/index.php Outdated Show resolved Hide resolved
mtias and others added 8 commits November 14, 2019 15:51
If we end up going with a different term, at least we'll have a better idea what it all is that needs updating.
It handles the case when the item has not defined a linl, rendering the item with an <span> element instrad of an anchor <a>.
@retrofox retrofox moved this from 👀 PRs to review to 💻 Issues in progress in Navigation editor Nov 19, 2019
@noisysocks noisysocks moved this from Issues in progress to PRs in progress in Navigation editor Mar 11, 2020
@noisysocks noisysocks removed this from PRs in progress in Navigation editor Mar 17, 2020
@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
Contributor

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

nav

@retrofox
Copy link
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
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.

None yet

7 participants