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

Theme block type (preset) completion #628

Open
Tracked by #545
charlespwd opened this issue Nov 28, 2024 · 0 comments
Open
Tracked by #545

Theme block type (preset) completion #628

charlespwd opened this issue Nov 28, 2024 · 0 comments

Comments

@charlespwd
Copy link
Contributor

charlespwd commented Nov 28, 2024

In theme and section block presets. We should complete block types.

In sections

  • if section defines local blocks,
    • complete local block types
  • if section accepts @theme
    • complete theme blocks
  • If section accepts specific theme blocks
    • complete specific theme blocks

In blocks

  • if block accepts @theme
    • complete theme blocks
  • if block accepts specific theme blocks
    • complete specific theme blocks
{% schema %}
{
  "name": "Header Announcement",
  "blocks": [{ "type": "slide" }, { "type": "other-slide" }],
  "settings": [],
  "presets": [
    {
      "name": "Header Announcement",
      "blocks": [
        {
          "type": "", // <-- should complete "slide", "other-slide"
        },
        {
          "type": "slide",
          "blocks": [
            { "type": ""} // <-- should complete what slide accepts
          ]
        },
       {
          "type": "other-slide",
          "blocks": [
            { "type": ""} // <-- should complete what other-slide accepts
          ]
        },
      ]
    }
  ]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant