diff --git a/assets/javascripts/discourse/lib/wizard-schema.js.es6 b/assets/javascripts/discourse/lib/wizard-schema.js.es6 index b9a47a61..09841579 100644 --- a/assets/javascripts/discourse/lib/wizard-schema.js.es6 +++ b/assets/javascripts/discourse/lib/wizard-schema.js.es6 @@ -63,14 +63,17 @@ const step = { * type: step * number: 2 * title: Add the attribute to the wizard schema - * description: Custom Wizard templates are modeled in the client via - * the wizard-schema, which, along with the serialization in - * wizard-json and models/custom-wizard, models and serializes - * data on the client. Normally when adding an attribute, you - * just need to add it to the schema, for the rest of the - * modeling and serialization to work. + * description: Custom Wizard templates are modeled and serialized in the + * client via the Wizard Schema. In some cases, when adding a new + * attribute, you just need to add it to the schema for the + * attribute to be loaded from, and sent back to, the server. + * However, if you are adding a new type-specific field attribute, + * currently you only need to add it to the field type schema on + * the server. The field schema on the server is loaded into the + * empty ``types`` object below. + * refernces: plugins/discourse-custom-wizard/discourse/lib/wizard-json + * plugins/discourse-custom-wizard/discourse/models/custom-wizard */ - const field = { basic: { id: null, diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index de162c6f..6b8a11fc 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -98,7 +98,23 @@ class="small"}} - + + {{!-- + /* learning_step + * unit: custom_wizard:templates_and_builder + * type: step + * number: 1 + * title: Add the attribute to the template + * description: First, add a new setting block to allow the site admin to + * administer how the attribute will work. Here we can see the + * controls for the Character Counter field attribute. Note + * the attribute is only available for text type fields (see + * isTextType conditional above this block). Note the + * consistent use of the ``setting``, ``setting-label`` and + * ``setting-value`` HTML structure throughout this component, + * and other Custom Wizard admin components. + */ + --}}