Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Make sure inner blocks are sent to the frontend even if the Save/View component doesn't render them initially #59

Closed
DAreRodz opened this issue Aug 25, 2022 · 3 comments

Comments

@DAreRodz
Copy link
Collaborator

Right now, when inner blocks are hidden in the editor, they are not serialized and stored in the WP database, so that information is lost. Thus, the block cannot interactively show inner blocks later in the browser.

There were some previous attempts to solve this by adding a <template> tag.

However, we removed the <template> tag on #28 (see fc6fa92).

Related to #29.

@luisherranz
Copy link
Member

luisherranz commented Aug 26, 2022

Should we try to do this in the Gutenberg repo instead? Maybe in the serializer?

I'm not sure if it makes sense to do it in user land when it won't be necessary, and here we have already tested that the <template> approach works fine.

@luisherranz
Copy link
Member

For anyone interested in taking a look at this, I think that what needs to happen is:

image

Excalidraw

Non-interactive blocks don't need this because those "hidden" inner blocks won't ever be shown, and therefore they don't need to be sent to the client.

@luisherranz
Copy link
Member

Closed as we're not actively working on this experiment anymore and this works fine in the Directives Hydration.

@luisherranz luisherranz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants