Closed ddryo closed 1 year ago
The same problem can be seen on the style preview screen of the list block. Since it is forcibly fixed to the ul tag, the style preview of the ol tag cannot be confirmed.
▼ The following gif image is when the style is changed
Of course, eliminating the example setting solves this problem, but without the example setting, the preview in the block inserter help menu (.block-editor-inserter__menu-help-panel) cannot be displayed.
I think that there is a problem with the processing method that the "preview screen in the help menu of the block inserter" and the "block style preview screen" refer to the same "example".
I think it would be nice to be able to divide the process well between the two types of preview screens, but I'm not mature enough to come up with a concrete good solution. I'm sorry, can the core team consider it?
Created a plugin that adds a simple block style to heading and list blocks.
I hope you can use it for verification.
▼ The plugin. my-guten.zip
Hey @ddryo, Thanks for reporting this and sorry that there hasn't been a reply for a while.
What you mention about the previews not updating is by design. They were previously dynamic, but the issue is that a lot of blocks require content to be previewed so the static examples
were a way to solve that.
The issue you mentioned with the heading doesn't seem like something the preview could accurately portray. If I remember correctly, the preview is scaled, so increasing the size would probably scale down the preview and it'd look pretty similar.
I see your point in terms of the list block, and probably any block were a setting might change what the block looks like considerably could result in a preview that isn't quite right.
I'll label this as an enhancement, though as you mention it might be something that's difficult to resolve.
As this has been sitting formant for 3 years, and the preview mechanism for variations has changed - I'm going to close this issue. If it is still something worth having as an enhancement - we can open a new issue considering the current state of things.
Since the level is set to 2 in the “example” setting of the heading block, H3 and H4 cannot be confirmed on the preview screen of the style panel.
▼ The following gif image is when the style is changed