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 Query From Docs should recuse to expand all sub sections #245

Closed
sganz opened this issue Mar 15, 2018 · 4 comments
Closed

Add Query From Docs should recuse to expand all sub sections #245

sganz opened this issue Mar 15, 2018 · 4 comments

Comments

@sganz
Copy link
Contributor

sganz commented Mar 15, 2018

This is a feature enhance request - When using the ADD QUERY from the DOC page to insert a query into the query panel it would be cool to also have it also show all sub section fields, or at least show them as empty { } elements so you know you may need to fill in fields.

Expected Behavior

Current Behavior

When you use the ADD QUERY from the doc page you get just the first level of fields, no indication that fields need a sub section

Possible Solution

Either add an empty sub section or recurse into the sub sections and fill in their fields.

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and application type (e.g. Chrome 39, chrome extension v1.4.7):
  • Operating System and version (e.g. Linux, v1.4.7):
@imolorhe
Copy link
Collaborator

imolorhe commented Mar 15, 2018

It supports this feature inherently. I only limited it because it was a beta feature. I could increase the add_query_depth_limit to make it show more.

https://github.com/imolorhe/altair/blob/staging/src/app/config.ts#L9:3

@imolorhe
Copy link
Collaborator

I could also make this a setting, so the user can update it themselves. The reason why it is limited is because the schema can be very deep, and even cyclic. If I don't limit it, there are some cases where it would never stop finding new fields.

@sganz
Copy link
Contributor Author

sganz commented Mar 15, 2018

Yes, what's interesting is the structure I'm working with is a tree, and has self referring sub-structures. A setting would be good to have, like a depth limit as mentioned. Most of the stuff I have has only one additional depth with a structure, except for the tree that I'm working on.

Maybe also add a comment if additional levels exist, i.e. if the depth is set to 2 and their is substructures beyond that, put a comment. All you would have to do is look to depth 3 and if you find it, then add a comment.

Just tossing out some ideas, making more work :)

@imolorhe
Copy link
Collaborator

I'd make it a setting. :)

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

2 participants