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

Improve using Blueprints #1137

Open
rhukster opened this issue Oct 27, 2016 · 7 comments
Open

Improve using Blueprints #1137

rhukster opened this issue Oct 27, 2016 · 7 comments
Assignees

Comments

@rhukster
Copy link
Member

While discussing this with @mahagr and @w00fz we decided we need to make the business of actually using custom blueprints with custom data files a simpler process.

@matthew-dean
Copy link

Also, the way you get extremely-nested YAML with blueprints I think is problematic. Lots of repeated fields: keys.

@mahagr
Copy link
Member

mahagr commented Nov 9, 2016

You only nest fields when you are grouping fields together. And there's no other way to do it than to create nested blueprints -- basically in the same way as you would nest HTML. In fact the mapping between YAML and HTML is 1:1.

@matthew-dean
Copy link

Okay. It's just that this pattern was visually a little eye-blurring:

      fields:
        advanced:
          fields:
            overrides:
              fields:

Maybe it's because nesting is easier to visually follow in HTML than YAML.

@OleVik
Copy link
Contributor

OleVik commented Jun 8, 2017

@mahagr In the same vein of simplification, could programmatic generation and definition of blueprints be facilitated? That is, rather than define both a plugin.yaml and each associated option in blueprints.yaml, generate the options in the latter from the former. This would alleviate many issues with definitions in blueprints.yaml and could more easily provide error-checking, as well as greatly reduce the time spent writing and testing blueprints.

@karfau
Copy link

karfau commented Jun 9, 2017

Just a thought, not knowing if it helps/goes into the right direction:

Maybe adding a CLI command to devtools plugin can generate blueprint.yaml from a config.yaml and./or page.yaml from page[.lang].md( to add custom fields in admin panel for template page) and put it into the right place.
As a starting point for site developers to work with.

@mahagr
Copy link
Member

mahagr commented Jun 9, 2017

@OleVik Some blueprints are being generated very, very early during the page load, which means that plugins etc aren't yet loaded. With page blueprints, it would work and in fact, you can modify blueprints from the code, though it is not really efficient.

On the other hand, if you just mean generating blueprints from admin, it is possible, but not an easy task to do.

@paulmassen
Copy link
Contributor

paulmassen commented Jun 9, 2017 via email

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

No branches or pull requests

6 participants