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

Reusable Blocks: Incorrect label appears in block breadcrumb component #12079

Closed
holtjohnson opened this issue Nov 19, 2018 · 5 comments · Fixed by #27887
Closed

Reusable Blocks: Incorrect label appears in block breadcrumb component #12079

holtjohnson opened this issue Nov 19, 2018 · 5 comments · Fixed by #27887
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@holtjohnson
Copy link

holtjohnson commented Nov 19, 2018

When I hover over a reusable block before I click on it shows the label in the top right corner to be "Reusable Block" as expected. When I'm editing the reusable block and hover over a block inside the reusable block the label in the top right corner shows "Reusable Template" as the parent when I would expect "Reusable Block". I'm a site developer working to understand exactly how Gutenberg is put together and works. When using Gutenberg I've started to use the hover labels in the top right to tell me where I am and is incredibly helpful when working with block nesting (inner blocks). If this is intentional and part of how reusable blocks work could you link me to the documentation? If this is only a labeling mistake, would you mind mending it? It would help with clarity for me during this change of editor.

Thanks for your work!

To Reproduce

  1. Create a post using Gutenberg.
  2. Insert a reusable block.
  3. Hover over the reusable block and observe the label in the top right corner.
  4. Click on the reusable block.
  5. Click on the "edit" button in the top right.
  6. Hover over one of the blocks inside the reusable block and observe the label in the top right corner.

Expected behavior

I was expecting the labels to both use "Reusable Block".

Screenshots

48733424-49643e80-ec08-11e8-9225-e840897d3cd6
48733431-4bc69880-ec08-11e8-9932-58c56b5a535b

Desktop

  • Gutenberg: v4.4.0
  • OS: macOS v10.13.5
  • Browser: Firefox
  • Version: 63.0.3
@designsimply designsimply added [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Testing Needs further testing to be confirmed. labels Nov 19, 2018
@designsimply
Copy link
Member

I tried testing exactly with the steps you provided (maybe too exactly!) and I found that if I create a reusable block, open a new post, add the reusable block, it is still correctly labeled "Reusable Block." I noticed that in your screenshot you've inserted a group of blocks—looks like it's some headings and paragraphs and social media icons—which I think may actually be a template and so it may be labeled correctly. Can you walk me through how to create the exact same reusable block (or group of blocks) that you have in your screenshot? Was that technically created as a template?

@designsimply designsimply added [Status] Needs More Info Follow-up required in order to be actionable. and removed Needs Testing Needs further testing to be confirmed. labels Nov 21, 2018
@holtjohnson
Copy link
Author

holtjohnson commented Nov 26, 2018

Thanks for your quick reply and following what I asked. I followed my steps exactly as well and didn't see what I was getting at. I guess I assumed someone would figure out the finer details from the images. I wasn't expecting someone to follow them exactly, I must have assumed too much.

The social media icons are a custom block. No templates are used or in effect. The exact steps are:

  1. Create a post using Gutenberg.
  2. Add two paragraph blocks and fill them both with "Hello World".
  3. Select both paragraph blocks and add/create a reusable block out of the two selected blocks.
  4. Hover over one of the blocks inside the reusable block and observe the label in the top right corner.

@holtjohnson
Copy link
Author

holtjohnson commented Nov 28, 2018

Also I'm seeing the inaccurate label "Reusable Template" when I use the block navigation as well. I see it when I have selected a block within a reusable block and then click the "Block Navigation" button. In this image I've selected a Heading Block inside a reusable block and then clicked the "Block Navigation" button.
49168123-7695a880-f2fc-11e8-9b0d-5a7c1424cbfc

@designsimply designsimply added Needs Testing Needs further testing to be confirmed. [Type] Question Questions about the design or development of the editor. and removed [Status] Needs More Info Follow-up required in order to be actionable. Needs Testing Needs further testing to be confirmed. labels Dec 18, 2018
@designsimply
Copy link
Member

Thank you for the addition information. Okay. I think I understand the problem better now.

The label for a reusable block is "Reusable Block" (screenshot) but if you create a reusable block with multiple blocks in it then edit the reusable block and hover over one of the blocks inside then the label is something like "Reusable Template → Paragraph".

screen shot 2018-12-17 at 5 20 17 pm
Tested with WordPress 5.0.1 and Gutenberg 4.7.0 using Firefox 63.0.3 on macOS 10.13.6.

Adding the [Type] Question label to ask: is the label is intentionally set to "Reusable Template" if a reusable block has multiple blocks inside of it?

@noisysocks
Copy link
Member

There has been some changes to the interface here but a similar bug still exists.

Now, if you select multiple blocks, turn them into a Reusable Block, edit that Reusable Block, and select one of the inner blocks, you'll see an empty label in the status bar navigator:

Screen Shot 2020-04-20 at 14 47 59

Instead of Document → it should say Document → Reusable Block → Paragraph.

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended Needs Dev Ready for, and needs developer efforts and removed [Type] Question Questions about the design or development of the editor. labels Apr 20, 2020
@noisysocks noisysocks changed the title Reusable Blocks: Labeling Inconsistency? Reusable Blocks: Incorrect label appears in block breadcrumb component Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants