Skip to content
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

Inserter: Remove block default icon from no results message #68693

Conversation

SainathPoojary
Copy link
Contributor

@SainathPoojary SainathPoojary commented Jan 15, 2025

Closes: #68688

What?

This PR removes the block default icon from the “No results found” message in the Inserter.

Why?

The icon appears to be a leftover and does not add significant value to the UI. Additionally, it is shown in cases where it feels inappropriate, such as when there are no results for patterns or media. Removing the icon ensures a cleaner and more consistent experience.

How?

The PR removes the component displaying the blockDefault icon from no-results.js in both the block-editor and block-directory packages.

Testing Instructions

  1. Open the main Inserter.
  2. Search for a non-existing block and verify that only the “No results found” message is displayed, without an icon.
  3. Repeat the search for patterns and media, ensuring the same behavior.

Screenshots or screencast

2025-01-16.12-27-44.mp4

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Feedback Needs general design feedback. labels Jan 16, 2025
@SainathPoojary SainathPoojary marked this pull request as ready for review January 16, 2025 07:01
Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SainathPoojary <[email protected]>
Co-authored-by: afercia <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@carolinan carolinan merged commit 36690dc into WordPress:trunk Feb 3, 2025
73 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.3 milestone Feb 3, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you delete a React component, it's a good idea to also delete the CSS selector that the component has.

This means we should be able to remove this style:

.block-editor-inserter__no-results-icon {
fill: $gray-600;
}

@SainathPoojary
Copy link
Contributor Author

Hey @t-hamano,
Thank you for your suggestion. I will raise a follow-up PR shortly to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inserter: Remove inappropriate icon from 'no results' message
4 participants