-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add Post Type Archive in Link UI and Navigation Link via Types API endpoint #67793
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jonnynews, @gwwar, @mgratch, @walton-alex, @nathan-schmidt-viget, @Bricobit. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +164 B (+0.01%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
.filter( ( result ) => !! result.archive_link ) // Filter out results with falsy archive_link, including empty strings | ||
.map( ( result, index ) => { | ||
return { | ||
id: index + 1, // avoid results being filtered due to falsy id |
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.
Having to use a manual id
isn't ideal here.
aedb880
to
9d95779
Compare
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 can't speak much to whether or not the rest endpoint architecture is any good. But the functionality itself is exactly as it should be 🎉 Really excited to see this getting fixed :)
packages/core-data/src/fetch/__experimental-fetch-link-suggestions.ts
Outdated
Show resolved
Hide resolved
That's a good start 👍 Confirming we're providing the correct functionality is useful to allow us to refine the implementation here and include tests...etc. Thank you. |
61c4d87
to
88142ef
Compare
Co-authored-by: Jonny Harris <[email protected]>
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.
One nitpic but other this looks good.
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.
Just a minor suggestion. Thank you.
Co-authored-by: Jonny Harris <[email protected]>
Before this can be merge I will need to complete the steps outlined in |
Flaky tests detected in 5d6da1a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12389685141
|
What?
Alternative to #66821.
Provides ability to link to Post Type Archives via the Link UI.
Closes #31452
Why?
Parity with Classic Menus where you could search for and add links to the Post Type Archives.
This also ensures that when visiting the Archives pages the current-menu-item class is added to the menu item.
How?
Note: I appreciate that the extension to the Types endpoint will need to be undertaken in Core.
Testing Instructions
Please follow testing steps from #66821.
Testing Instructions for Keyboard
Screenshots or screencast