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

Support for tabs #1

Closed
jasonvarga opened this issue Jul 24, 2023 · 4 comments · Fixed by #2
Closed

Support for tabs #1

jasonvarga opened this issue Jul 24, 2023 · 4 comments · Fixed by #2
Assignees

Comments

@jasonvarga
Copy link

In Statamic 4, blueprints were updated a little. PHPStorm users (and probably other editors using this schema) are now seeing validation errors.

CleanShot 2023-07-24 at 14 58 18

Blueprints can have a top level tabs key. The tabs are keyed by handle.

Each tab has multiple sections, which do not have named keys.

title: My Blueprint
tabs:
  tab_one:
    display: Tab One
    sections:
      -
        display: My Section # optional
        instructions: Some instructions #optional
        fields: [] # Same as existing fields.
      -
        fields: []

The top level sections as used on Statamic 3.x is still valid.

If I can help, let me know. But I'm sure you can update this more easily than me.

@Konafets Konafets self-assigned this Jul 25, 2023
@Konafets
Copy link
Owner

@jasonvarga Thanks for bringing this up. One question: Does the top level section must still be present?

@jasonvarga
Copy link
Author

Does the top level section must still be present?

Nope.

In v4, only tabs will be at the top level, if you are using the Control Panel to save your blueprint.
But we still support sections at the top level in order for v3 blueprints to be backwards compatible.

Does that make sense?

@Konafets
Copy link
Owner

After an upgrade from v3 to v4 a v3 blueprint with the old structure can still be used but will updated to the new form only if the user saves it via CP? In essence the schema must allow both versions at once. Is that correct?

@jasonvarga
Copy link
Author

Correct!

Konafets added a commit that referenced this issue Jul 27, 2023
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

Successfully merging a pull request may close this issue.

2 participants