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

Unable to find/add reusable blocks via inline + button #68752

Closed
3 of 6 tasks
xpurichan opened this issue Jan 17, 2025 · 8 comments · Fixed by #69028
Closed
3 of 6 tasks

Unable to find/add reusable blocks via inline + button #68752

xpurichan opened this issue Jan 17, 2025 · 8 comments · Fixed by #69028
Assignees
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@xpurichan
Copy link

xpurichan commented Jan 17, 2025

Description

On Gutenberg version 19.9 and older we're able to use the "+" button inline in the editor to search for and add reusable blocks. Since version 20.0 the results come up empty.

Workaround: Reusable blocks can still be added by using the "+" button at the top of the editor/toolbar and with the / command on a new line.

Screenshots:

When using the inline "+" button of the editor, we see "No results" come up when searching for an existing reusable block to add:
Image

When using the / command to search for a reusable block we do see results.
Image

Step-by-step reproduction instructions

  1. Create a reusable block, or identify a pre-existing reusable block to use
  2. In the post editor use the "+" function found within the body of the post (not at the top of the editor/toolbal) to open the block menu.
  3. Search for your reusable block by name
  4. The reusable block will not appear, and you'll instead see "no results" instead

Note that reusable blocks can be added by other means, including the "+" button at the top of the editor, and via the / command.

Screenshots, screen recording, code snippet

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@xpurichan xpurichan added the [Type] Bug An existing feature does not function as intended label Jan 17, 2025
@yogeshbhutkar
Copy link
Contributor

Hi @xpurichan, this change appears intentional and is implemented in this PR: #67738. It's better described in the discussion of this related issue: #67693.

@xpurichan
Copy link
Author

Great find, and thanks for bringing that to light @yogeshbhutkar.

Tagging in @richtabor, @rohitmathur-7, and @talldan for further consideration on #67693

I suppose I feel like this is a bit short-sighted. While I do understand the concerns presented in #67693 and how this could lead to a confusing user experience, I feel as though we did not consider that users use patterns inside of blog posts every day. Now this flow no longer exists for them.

Is there more than can be done to guide users on choosing appropriate blocks in certain contexts? IE a list of Suggested blocks which appear first based on being inside certain template areas, for example?

How can we evaluate the number of users who have a flow that can no longer be used, vs confusion caused by forcing patterns inside unlikely/unwanted places?

While I believe that / commands are a much more efficient way to add these patterns inline above anything else, many users aren't familiar with this flow. The inline inserter is so much more intuitive and now simply does not work.

@t-hamano
Copy link
Contributor

I think it's worth discussing again whether this new behavior is acceptable in the upcoming WordPress 6.8 release.

Let's add this to the project board.

@t-hamano t-hamano added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Discussion For issues that are high-level and not yet ready to implement. and removed [Type] Bug An existing feature does not function as intended labels Jan 21, 2025
@fabiankaegy
Copy link
Member

Agree that the / inserter and the + inline inserter should showcase the same elements.

I for one really dislike that I cannot use the / inserter to add regular non synced patterns. We should standardize this across the two so both show all kinds of blocks and all kinds of patterns.

@Mamaduka Mamaduka moved this to 🗣️ In Discussion / Needs Decision in WordPress 6.8 Editor Tasks Jan 22, 2025
@Mamaduka
Copy link
Member

Agreed. Items displayed in "inline" and "quick" inserter should be consistent.

While the new pattern insertion flows (Zoom out) are being polished, allowing them back in "Quick Inserter" might be more manageable.

Proposed requirements for reverting:

  • Ensure patterns respect the block context. It should be available for block insertions like "Social Links" and "Buttons".
  • Do not prioritize patterns, but allow searching by keyword.

What do you think?

@t-hamano
Copy link
Contributor

In the current main inserter, if the block/pattern cannot be inserted there, it seems to insert the block/pattern next to the parent block. For example:

  • Insert a Social Icons Block.
  • Insert a WordPress icon block.
  • Open the main inserter.
  • Attempt to insert a Heading block or pattern.
  • Neither are allowed as children of the Social Icons block, so they will be inserted next to the Social Icons block.

Does this mean that we apply this logic to the quick inserter as well?

@Mamaduka
Copy link
Member

Mamaduka commented Jan 22, 2025

Does this mean that we apply this logic to the quick inserter as well?

I think it should display "No results found." in Quick Inserter when a pattern can't be inserted in the current container.

In the current main inserter, if the block/pattern cannot be inserted there, it seems to insert the block/pattern next to the parent block.

This behavior needs some polishing. There's no indicator that the block will be inserted below the current container. Btw, this is a separate issue.

@Mamaduka
Copy link
Member

Mamaduka commented Feb 4, 2025

Created a PR that restores patterns in Quick Inserter - #69028.

@Mamaduka Mamaduka moved this from 🗣️ In Discussion / Needs Decision to 📥 Todo in WordPress 6.8 Editor Tasks Feb 5, 2025
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended and removed [Type] Discussion For issues that are high-level and not yet ready to implement. labels Feb 5, 2025
@Mamaduka Mamaduka moved this from 📥 Todo to 🏗️ In Progress in WordPress 6.8 Editor Tasks Feb 5, 2025
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Done in WordPress 6.8 Editor Tasks Feb 6, 2025
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 [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging a pull request may close this issue.

5 participants