-
Notifications
You must be signed in to change notification settings - Fork 101
Missing title field in JSON schema for plans #519
Comments
@pkosiec thanks for the issue (and the PR). I'm open to discussing this change, but still feel a bit reluctant. My rationale here is that while you may perceive fallback field titles that match parameter key names (e.g. Also note... There are some existing GUIs that work with our broker (and other brokers, too). For instance, OpenShift and KubeApps. Whether it is for better or worse, I'm going to guess that adding At the end of the day, as I said, I'm open to discussing this change, but I don't want to rush blindly into merging it. I'm going to delegate some decision on this to @seanmck. |
Hi @krancour, thanks for your answer! Generally, in my point of view, GUI should be an abstraction for an user. If he uses GUI, then he shouldn't be bothered with parameter names etc. All labels should be clear, concise and in readable form. But I understand your concerns. We have different opinion on this topic and that's absolutely fine! I just would like to have a choice, how to display those titles. This change is an improvement, because it gives an user ability to display label for a field in a different form than just raw object key name. Adding |
@pkosiec suppose the existing GUIs are using the same library as you. (React and Angular are both really popular.) Wouldn't it then be likely that if Disclaimer: I am not a JS / front-end guy at all. So if the question seems naive, realize that I haven't personally used React or Angular. |
I know that one React solution does the fallback. One solution for Angular doesn't display label at all, if the title isn't provided. I don't know about others. However, I think this is issue of a developer, if he is not explicitly declare that he want to use key names as field labels. I've just checked They also display friendly field labels (not raw object key names): |
I think this is sensible. The PR needs a rebase, but after that, g2g. |
@krancour Thank you! I've just rebased my PR. |
The
title
field is missing in plan schemas fields. It's good to have it, especially if some uses front-end libraries for displaying forms from JSON schema.I've used a few solutions for React and Angular and all of them displays title as label - for example, https://github.com/mozilla-services/react-jsonschema-form. It fallbacks to object key name, so it results in a rather ugly form:
I'm working right now on a pull request that introduces titles for all fields for plans.
Hope you'll like it 🙂 Cheers!
The text was updated successfully, but these errors were encountered: