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

Add support for @@girders-elements/children property #51

Open
1 of 2 tasks
ognen opened this issue Jul 14, 2017 · 0 comments
Open
1 of 2 tasks

Add support for @@girders-elements/children property #51

ognen opened this issue Jul 14, 2017 · 0 comments
Labels

Comments

@ognen
Copy link
Member

ognen commented Jul 14, 2017

An element can include a property @@girders-elements/children which denotes which of it's properties contain children elements. These properties can either contain an element or an array of elements.

This property can contain:

  • a string denoting a single property name, (e.g. '@@girders-elements/children': 'children')
  • an array of strings denoting which properties are child elements
    E.g.
{
   kind: ['container', 'two-column'],
  '@@girders-elements/children': ['main', 'aside'],

  main: [
    { 
       kind: 'tile',
       content: [ ],
    },
    // ...
  ],
  aside: {
    kind: 'weather',
    content: [],
  }
}

Support required:

  • uiFor with no arguments produces the UI for all child elements
  • adjust the element zipper to take into account this property (defaulting back to the one in configuration), after which the zipper can be positioned:
    • on an element
    • on a named collection of element
@ognen ognen added the zippers label Jul 14, 2017
ognen added a commit that referenced this issue Aug 18, 2017
An element can include a property  `@@girders-elements/children` which denotes *which of it's properties contain children elements*. 

This is an optional property, and can contain:
- a *string* denoting a single property name, (e.g. `'@@girders-elements/children': 'children'`) 
- an *array of strings* denoting which properties contain child elements

*A property containing child elements* can either:
- contain a single element 
- contain an array of elements 

E.g.

```javascript
{
   kind: ['container', 'two-column'],
  '@@girders-elements/children': ['main', 'aside'],

  main: [
    { 
       kind: 'tile',
       content: [ ],
    },
    // ...
  ],
  aside: {
    kind: 'weather',
    content: [],
  }
}
```

This feature enhances the `zip.elementZipper`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant