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

Rename "Navigation Menu Item" to "Link". #18422

Merged
merged 7 commits into from
Nov 15, 2019

Conversation

mtias
Copy link
Member

@mtias mtias commented Nov 10, 2019

Closes #18521

Revise how we name and refer to navigation items in different places.

@mtias mtias added the [Status] In Progress Tracking issues with work in progress label Nov 10, 2019
@mtias mtias added the [Block] Navigation Affects the Navigation Block label Nov 10, 2019
Copy link
Contributor

@getdave getdave left a comment

Choose a reason for hiding this comment

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

I like the idea of making the nomenclature consistent with what a user would expect rather than thinking about this technically as a "child Block of the Nav Menu Block" (which is developer-centric).

Question: is it always the case that the "item" is a link? Or am I splitting hairs here? Could we not have nav items which aren't actually linked and therefore do not technically constitute "links"?

@getdave
Copy link
Contributor

getdave commented Nov 13, 2019

Looks like this will need a rebase now.

@mtias Do you consider this Blocking and do you want someone to take this over for you or will you continue?

@mtias
Copy link
Member Author

mtias commented Nov 13, 2019

Yes, we should settle on names here before switching the experimental flag off.

@obenland obenland force-pushed the update/rename-navigation-menu-item branch from eec040f to ba15e66 Compare November 13, 2019 19:48
@shaunandrews
Copy link
Contributor

Seems to me that we should not assume an item within the Navigation block will be a link. It’s a fairly common (even if not recommended) pattern to use a non-link item to create a group within a Navigation. To me, “Menu Item” seems obvious.

@mtias
Copy link
Member Author

mtias commented Nov 14, 2019

pattern to use a non-link item to create a group within a Navigation

A non-link item should likely be a different block — paragraph, heading, etc.

@retrofox
Copy link
Contributor

A non-link item should likely be a different block — paragraph, heading, etc.

So the idea to render in the front-end an item which doesn't have defined a link with an <span> element doesn't make sense. #18442

We need to re-define the behavior and workflow for the nav menu. Wondering for instance how to switch between the Nav Item to another block (paragraph, heading, etc) according to whether the item has defined a link or not.

@shaunandrews
Copy link
Contributor

A non-link item should likely be a different block — paragraph, heading, etc.

How would you add a different block? We don’t show the block inserter anymore, we just add the menu item block. As @retrofox mentions, I guess we could do some magic to change the block depending on if it has a link, but that seems very opaque and confusing.

@retrofox retrofox force-pushed the update/rename-navigation-menu-item branch from 2f773d5 to 9726170 Compare November 14, 2019 19:00
@retrofox retrofox removed the [Status] In Progress Tracking issues with work in progress label Nov 14, 2019
@obenland
Copy link
Member

How would you add a different block? We don’t show the block inserter anymore, we just add the menu item block.

For now the navigation only allows one type of inner block, so there's no need for a selector. Once support for other types of blocks gets added, I'd anticipate the selector to come back.

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.

I think that should cover it! Next up: core/navigation-menu => core/navigation.

@retrofox retrofox force-pushed the update/rename-navigation-menu-item branch 3 times, most recently from ca3be18 to 2a42582 Compare November 15, 2019 14:43
@retrofox retrofox force-pushed the update/rename-navigation-menu-item branch from 2a42582 to 11b2967 Compare November 15, 2019 15:03
@retrofox retrofox merged commit 9c34fc9 into master Nov 15, 2019
@retrofox retrofox deleted the update/rename-navigation-menu-item branch November 15, 2019 15:32
@youknowriad youknowriad added this to the Gutenberg 7.0 milestone Nov 25, 2019
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.

Update "Navigation Menu Item" terminology
6 participants