Skip to content

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

Merged
retrofox merged 7 commits into
masterfrom
update/rename-navigation-menu-item
Nov 15, 2019
Merged

Rename "Navigation Menu Item" to "Link".#18422
retrofox merged 7 commits into
masterfrom
update/rename-navigation-menu-item

Conversation

@mtias

@mtias mtias commented Nov 10, 2019

Copy link
Copy Markdown
Member

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

@getdave getdave 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.

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

getdave commented Nov 13, 2019

Copy link
Copy Markdown
Contributor

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

mtias commented Nov 13, 2019

Copy link
Copy Markdown
Member Author

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
@mtias mtias requested review from nerrad and ntwb as code owners November 14, 2019 00:51
@shaunandrews

Copy link
Copy Markdown
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

mtias commented Nov 14, 2019

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@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.

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