-
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
Link Control: Add content and media filtering tabs #68439
base: trunk
Are you sure you want to change the base?
Link Control: Add content and media filtering tabs #68439
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 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. |
I've implemented a solution in this PR that introduces "Content" and "Media" tabs to help users more efficiently find and select links. I would greatly appreciate you could test and review this implementation. Please let me know if you'd like me to make any adjustments. Looking forward to your feedback. cc: @jameskoster, @getdave, @jasmussen, @t-hamano, @richtabor, @noisysocks, @fabiankaegy, @SainathPoojary |
Thank you for this PR! I’ve tested it and everything is working well for me. The implementation feels seamless. 2025-01-02.12-45-27.mp4 |
This looks like a good initial implementation. I'd love to be able to dig into this but unfortunately I won't have the time to look into this in the near future as I have reduced availability over the upcoming months. |
Have you thought about the edge case where there are no items in the media library (for example a new install)? |
Closes: #63683
What?
This update adds tab-based filtering to the link control interface, introducing "Content" and "Media" tabs to better organize link suggestions.
Why?
The current link control interface displays all link suggestions in a single list, making it challenging for users to find specific types of content quickly. By introducing tabs to filter between content types and media, we can improve the user experience by:
How?
Added two new tabs to the link control interface:
Implemented tab-based filtering using the existing WordPress tab control component
Testing Instructions
Open the Block Editor
Insert any block that supports links (e.g., Paragraph)
Click the link button from the block toolbar
Verify that you see two tabs: "Content" and "Media"
Test the Content tab:
Test the Media tab:
Screencast
Screen.Recording.2025-01-02.at.11.45.51.AM.mov