Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

wip handle code bundles #2

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

wip handle code bundles #2

wants to merge 9 commits into from

Conversation

jaked
Copy link

@jaked jaked commented Dec 7, 2022

Add back support for code bundles sent via setProps; the code is a mess but it mostly works (including nested blocks). I had to add back some React stuff since existing blocks need it; I think we might want to add a descriptor to blocks.config.json so we know how to render a block (via React or elsewise).

@Wattenberger
Copy link

Wattenberger commented Dec 7, 2022

we might be able to rely on the parent tag from a quick API call to see if the blocks repo was forked from the React template?

https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository:~:text=parent%20is%20the%20repository%20this%20repository%20was%20forked%20from

I wonder what we can do to make rendering the existing structure backwards compatible without requiring a new config key

@jaked
Copy link
Author

jaked commented Dec 7, 2022

we might be able to rely on the parent tag from a quick API call to see if the blocks repo was forked from the React template?

I wonder what we can do to make rendering the existing structure backwards compatible without requiring a new config key

Hmmm checking how the repo was created seems pretty fragile to me, but I hear you on not requiring a new key.

It just occurred to me that we can probably compile something into the bundle to indicate how a block should be rendered, I'll explore that path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants