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

Ability to determine source information from constructors #1123

Open
Zoramite opened this issue Oct 1, 2020 · 0 comments
Open

Ability to determine source information from constructors #1123

Zoramite opened this issue Oct 1, 2020 · 0 comments

Comments

@Zoramite
Copy link
Member

Zoramite commented Oct 1, 2020

Currently constructors (ex: something: !g.string ...) completely replace the value of the constructor so there is no way to determine what the source of the constructor is.

Looking to add in some meta information from the original sourcing of the constructor to make it easier to determine the source of the value. For example:

test: !g.yaml /data/somefile.yaml?test

Could be accessed in the template:

{{doc.test._source_.filename}}
_source_ = {
  'file_name': '/data/somefile.yaml',
  'query': 'test',
  'raw': '/data/somefile.yaml?test',
}

Also, could look into the idea of having the dev server modify the _() shortcut to output the source of the string instead of translating if a param is provided (ex: ?constructor_source=true). Then all of the source information could easily be toggled on for an entire page.

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

No branches or pull requests

1 participant