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

In the new Navigation screen LinkControl does not show suggestions #21620

Closed
draganescu opened this issue Apr 15, 2020 · 3 comments · Fixed by #21873
Closed

In the new Navigation screen LinkControl does not show suggestions #21620

draganescu opened this issue Apr 15, 2020 · 3 comments · Fixed by #21873
Assignees
Labels
Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@draganescu
Copy link
Contributor

Describe the bug
Here is a screen recording:

no-suggest

Expected behavior
I expected the same behavior that the block has in posts:

with-suggest

@draganescu draganescu added this to Inbox in Navigation editor via automation Apr 15, 2020
@draganescu draganescu moved this from Inbox to Needs dev in Navigation editor Apr 15, 2020
@draganescu draganescu added the Needs Dev Ready for, and needs developer efforts label Apr 15, 2020
@noisysocks noisysocks added [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended labels Apr 15, 2020
@getdave
Copy link
Contributor

getdave commented Apr 22, 2020

It's probably that you're missing the @wordpress/editor package which is where the data comes from to populate that list

const fetchLinkSuggestions = async ( search, { perPage = 20 } = {} ) => {
const posts = await apiFetch( {
path: addQueryArgs( '/wp/v2/search', {
search,
per_page: perPage,
type: 'post',
} ),
} );
return map( posts, ( post ) => ( {
id: post.id,
url: post.url,
title: decodeEntities( post.title ) || __( '(no title)' ),
type: post.subtype || post.type,
} ) );
};

@talldan
Copy link
Contributor

talldan commented Apr 23, 2020

I think this is due to the endpoint for fetching the suggestions being part of the editor settings:

const { getSettings } = select( 'core/block-editor' );
return {
__experimentalFetchLinkSuggestions: getSettings()
.__experimentalFetchLinkSuggestions,
};

It's possibly not specified as part of the settings in the navigation menu page?

@adamziel
Copy link
Contributor

I proposed a solution in #21873

@noisysocks noisysocks removed the [Priority] High Used to indicate top priority items that need quick attention label Apr 26, 2020
Navigation editor automation moved this from Issues in progress to Done Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants