WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.32k stars 4.12k forks source link

Post navigation link block is missing a block icon in the Styles sidebar #49630

Open carolinan opened 1 year ago

carolinan commented 1 year ago

Description

When you go to the Site Editor > Styles > Blocks and search for the post navigation link block, it has no block-specific icon, it is showing the "lego" icon.

The post navigation link block has two variations: next post and the previous post. They do not show in the Styles sidebar: Should they? I think users are more likely to search for the variations.

Step-by-step reproduction instructions

Go to the Site Editor > Styles > Blocks and search for the post navigation link block

Screenshots, screen recording, code snippet

post navigation link with a lego style icon

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

t-hamano commented 1 year ago

I think the block variation is a function to set initial attirbutes to specific blocks.

Since block variations have the same block name, it seems difficult to set a style for each block variation in the current global style system. For example, the Query Title block has "Archive Title" and "Search Results Title" as variations, but it is not possible to apply a global style to them individually.

The Post Navigation Link block doesn't have an icon because the icon property is not specified in registerBlockType. However, there are currently no icons that represent both "previous" and "next" meanings.

My idea is to register either "previous" or "next" icon, or create a new icon, what do you think?

carolinan commented 1 year ago

I think that using one of the existing icons would be fine, but creating one that uses both would not be wrong :p (not very helpful)

megane9988 commented 1 year ago

Hi I thought of an icon that combines the two. If it put the two side by side, the width will be too large, so it seems necessary to narrow the space between them. Which one looks better when compared with existing icons?

image

Before making the icon, I thought it would be nice to have the two side by side, but when I made it, I felt that the existing one would be fine.

my opinion also not very helpful too.

kutsu123 commented 1 year ago

Hi all. My personal image is an existing icon rather than the default block, but I felt that it would be more obvious to create a new icon rather than the default block. (Sorry I don't have a concrete example)