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

Fix/remove empty space from inserter #56926

Closed

Conversation

n2erjo00
Copy link
Contributor

What?

This PR is removing unnecessary empty space(s) in the Inserter panel.

Why?

Closes #56802

In the inserter panel the goal is to remove space between content area and search results

How?

The InserterPanel component takes a title property. After checking Gutenberg codebase revealed that property is either plain string or VisuallyHidden component. Added logic now checks whether title property is specifically VisuallyHidden component and use proper classes after that

Testing Instructions

  1. Open a post or page.
  2. Open Inserter panel
  3. Observe the labels before block listing
  4. Search for "Social" and observe there is no empty space before the list(s).
  5. Search for "Social with" this returns pattern list and again observe no empty space before the list and hover effect still works on the pattern list items

This one hard to describe. Please also check the linked issue there are some really good screenshots (one picture versus million words)

Testing Instructions for Keyboard

Screenshots or screencast

@cbravobernal cbravobernal added [Type] Enhancement A suggestion for improvement. [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Dec 10, 2023
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Feb 20, 2024
@richtabor
Copy link
Member

Hey @n2erjo00, stumbled upon this while exploring #61051. If that idea goes through, we won't need to check for visibility as those labels would be persistent throughout.

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: n2erjo00 <[email protected]>
Co-authored-by: richtabor <[email protected]>

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

@richtabor
Copy link
Member

I think we should close this; but I could use a hand with the Inserter optimizations visualized as a part of #61051.

@n2erjo00
Copy link
Contributor Author

@richtabor Makes sense, let's close this one.

I can checkout the linked issue later this week. Is there anything specific you'd need help with?

@richtabor
Copy link
Member

I think the search results for patterns and blocks from the block directory could use cleaning up. The results in general are difficult to parse as-is.

@richtabor richtabor closed this Apr 25, 2024
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 [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extraneous space above inserter search results
4 participants