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

Feature: make required properties more obvious #71

Open
tj opened this issue Dec 10, 2017 · 3 comments
Open

Feature: make required properties more obvious #71

tj opened this issue Dec 10, 2017 · 3 comments

Comments

@tj
Copy link

tj commented Dec 10, 2017

First of all this is really awesome thanks! I was wondering if maybe the required properties should be highlighted some how, or maybe even pre-filled (just the keys) so you can go through and define the values.

It's super handy as-is but it's hard to tell which are required.

screen shot 2017-12-10 at 9 41 19 am

Maybe it makes more sense to validate the entire JSON file as you're writing it and show errors or something.

@bali182
Copy link
Owner

bali182 commented Dec 10, 2017

I guess it would make sense. I don't want to mix validation into this package, but I'm absolutely ok with making the required fields more obvious. This is the complete list of customizations that autocomplete-plus allows: https://github.com/atom/autocomplete-plus/wiki/Provider-API#suggestions

From this what I currently use is:

displayText - what you see as key name or value (like statistics on the screenshot)
snippet - this is what is being added to the document when the suggestion is selected
description - schema description if available
rightLabel - the type like enum or number
type - marks the type of the suggestion (p on the left). should be replaced by an icon but for some reason it isn't.

What do you think should be added? Maybe just order the required ones first? Or add leftLabel with the text required or optional?

@tj
Copy link
Author

tj commented Dec 11, 2017

Hmm the required ones first and maybe having some icon or label like you mentioned would be killer. Might be nice to display the examples in that description part as well. Your call of course :D it's already awesome but that'd help!

@bali182
Copy link
Owner

bali182 commented Dec 11, 2017

Ok will take a look at it. Can't promise anything before the weekend though. Also about the examples, that is a json schema v6 feature right? It might be interesting to explore the new draft for json schema, since currently it only supports stuff that's available in v4.

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

3 participants