Nested field access in name
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
It would be very nice to have the possibility to have nested fields access in field names.
Currently when I am configuring a nested field like this;
```yml
files:
- file: 'site/content/_index.md'
name: sections
label: 'Sections'
fields:
- name: about
label: 'About'
widget: object
fields:
- { name: title, label: 'Title', widget: string }
- { name: body, label: 'Body', widget: markdown }
```
It gives me the following;
```bash
-section-----
|--about----|
|----title--|
|----body---|
-------------
```
But if would be nice if I can just do this;
```yml
files:
- file: 'site/content/_index.md'
name: about
label: 'About'
fields:
- { name: 'about.title', label: 'Title', widget: string }
- { name: 'about.body', label: 'Body', widget: markdown }
```
And having this output;
```bash
-about-------
|--title----|
|--body-----|
-------------
```
Contributor guide
Research direction
No file, test, or entry point is named in the issue. Start by locating the field configuration handling for the `name` property and existing nested/object-field tests, then compare the two YAML examples; done means dotted names produce the requested nested `about` output without breaking the current object-field form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100