csdms / wmt-client

A GWT client for the CSDMS Web Modeling Tool
MIT License
0 stars 0 forks source link

Change "separator" key into "heading" type #110

Open mdpiper opened 7 years ago

mdpiper commented 7 years ago

Currently, in the WMT client's ParameterTable class, when a parameter has a key named "separator", it's rendered as a separator between groups of parameters. For example, in Hydrotrend, this parameter

{
  "key":"separator",
  "name":"Temperature",
  "description":"Temperature",
  "value":{
  "type":"string",
  "default":""
}

is rendered as

screen shot 2017-08-28 at 10 12 48 am

A better description for this behavior is a header. Such parameters should be refactored so that

  1. a new type, 'header" is used;
  2. the parameter key should describe the section -- e.g., a set of temperature parameters would have the key temperature_section, or something of the sort.

For example:

{
  "key":"temperature_section",
  "name":"Temperature",
  "description":"Temperature",
  "value":{
  "type":"header",
  "default":""
}

This will require some refactoring, both of model BMIs and the ParameterTable code. However, it also presages a "subheader" type.

mdpiper commented 7 years ago

I've implemented the "subheading" type in #111.