gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

LinkControl: Add blank icon for custom post type menu items

Open richtabor opened this issue 3 years ago • 7 comments

Instead of omitting the icon entirely, the search result title and URLs should always be aligned vertically. This way it’s easier to scan the results to find the correct item.

We should add a blank icon to wordpress/icons that can be used in cases like this (and the command palette).

Portfolio 1

richtabor avatar Oct 25 '23 08:10 richtabor

I see a customPostTypes icon in the library; is that a good fit instead of a blank one?

Image

vcanales avatar Oct 25 '23 08:10 vcanales

I still think a blank icon would work better perhaps. We do the same in the command palette (but manually spaced with CSS):

CleanShot 2023-10-25 at 11 16 19

richtabor avatar Oct 25 '23 09:10 richtabor

I've found that custom post types don't show up in the suggestions for the Link Control, since Gutenberg v16.8.0 — I haven't been able to track down the reason...

16.8.0 Image

16.7.0 Image

vcanales avatar Oct 25 '23 10:10 vcanales

Did you add a plugin with a custom post type, like https://wordpress.org/plugins/portfolio-post-type/?

richtabor avatar Oct 26 '23 12:10 richtabor

Yeah, the videos above are the same WordPress instance, with different Gutenberg versions loaded, with a couple of custom types added through the CPT UI Plugin.

vcanales avatar Oct 26 '23 12:10 vcanales

I've found that custom post types don't show up in the suggestions for the Link Control, since Gutenberg v16.8.0 — I haven't been able to track down the reason...

As of Gutenberg 21.6.0, I noticed that it can been seen when choosing to add a custom link (doesn't show on default which I assume only shows the pages)

Image

@vcanales Are you still working on this? If not, I have a working patch ready and would love to create a PR

BugReportOnWeb avatar Sep 15 '25 15:09 BugReportOnWeb

@vcanales Are you still working on this? If not, I have a working patch ready and would love to create a PR

@BugReportOnWeb feel free to take over

vcanales avatar Sep 15 '25 15:09 vcanales