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

Thought experiment: Better ergonomics for repeated input configurations #107

Open
bglw opened this issue Apr 13, 2022 · 0 comments
Open
Labels
cms structures Related to the generation of structures for hydrating the CMS enhancement New feature or request

Comments

@bglw
Copy link
Contributor

bglw commented Apr 13, 2022

Envisioning the components:

# hero.bookshop.yml
blueprint:
  title: Hello World
  alignment: Left

_inputs:
  alignment:
    type: select
    options:
      values:
        - Left
        - Center
        - Right
# paragraph.bookshop.yml
blueprint:
  text: Hello World
  alignment: Left

_inputs:
  alignment:
    type: select
    options:
      values:
        - Left
        - Center
        - Right

Multiple components having to re-specify the select values for alignment is not ideal.

This could be solved currently by defining that input configuration, or indeed a _select_data array, in the site's global config. That, however, has the downside of making the components less portable since the bookshop no longer defines everything.

One could imaging an optional configuration file for the whole bookshop that can specify values to either merge into a global site config, or merge into all component structures.

@bglw bglw added enhancement New feature or request cms structures Related to the generation of structures for hydrating the CMS labels Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cms structures Related to the generation of structures for hydrating the CMS enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant