-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Show initial suggestions in rich text Link UI #57743
Show initial suggestions in rich text Link UI #57743
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Size Change: +50 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is much better.
packages/core-data/src/fetch/__experimental-fetch-link-suggestions.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
Once the navigation link block variations suggestions is resolved, this is good to go.
Currently page suggestions are established as the most recent pages published on the site. I'm interested in perhaps exploring what a reverse order would feel like, with your site's first created pages surfaced highest in the suggestions (assuming that when the site was created, the most important pages were created first).
packages/core-data/src/fetch/__experimental-fetch-link-suggestions.js
Outdated
Show resolved
Hide resolved
I think this is a positive change and it might make more obvious that users can type to search for internal content, instead of copying and pasting links.
+1. Another interesting way of ordering content suggestions could be displaying pages already linked to the site's menu. A use-case to justify would be an SMB owner creating posts for their company blog and cross-linking to pages in the site's menu like Contact or Services/Shop as a way to direct visitors coming from search engines to the rest of the site. |
I was thinking that too, but technically it's likely a heavy lift. |
What does this mean? |
Prioritizing the items in your header navigation for example. |
Why is prioritising items already linked to good? |
…ges" This reverts commit b7cb1fe.
0eff53b
to
ba8eaa3
Compare
@draganescu @richtabor I updated the PR to limit the configuration of initial suggestions to the rich text implementation only. |
Flaky tests detected in ba8eaa3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7639111344
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this small update is advancing the main goal so it's good to go IMO
Rich said only blocker was Navigation. That's now not effected by changes in this PR.
What?
Upon opening the Link UI to create a new link in a rich text, the component will now display a set of initial suggestions. These are defaulted to pages.
Why?
Part of #50884.
How?
Set the defaults for all initial suggestions queries to be pages.
Enable the correct prop on the LinkConrol used in rich text links.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast