Skip to content

Conversation

dmcallejo
Copy link

This allows the addition of more detailed descriptions for each property of the schema. Usage is as simple as adding a "tooltip" field into the property, as stated in the examples:

  "properties": {
     "name": {
       "type": "string",
       "description": "First and Last name",
       "tooltip": "First and last name of the simple person",
       "minLength": 4
     }, (...)

@jdorn
Copy link
Owner

jdorn commented Nov 19, 2015

I like the idea. A couple comments:

  • Move 'tooltip' under options since it isn't a standard JSON Schema keyword
{
  "type": "string",
  "minLength": 4,
  "options": {
    "tooltip": "This is a tooltip"
  }
}
  • Instead of adding another argument to getFormControl, I would create a new theme function addTooltip that takes a DOM node as an argument. That way it can be reused elsewhere and it will be easier for themes to override.
this.control = this.theme.getFormControl(this.label, this.input, this.description);
this.theme.addTooltip(this.control, this.tooltip);

@nipunarora
Copy link

has this item been merged in the base branch? I would really like this feature as well.

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

Successfully merging this pull request may close these issues.

4 participants